Master AI-Powered Development: Configure Python, JavaScript, Swift, and Java in Cursor on macOS
This guide walks you through setting up Cursor, an AI‑enhanced VS Code‑based editor, on macOS and configuring full development environments for Python, JavaScript/TypeScript, Swift, and Java, including essential tools, virtual environments, plugins, and VS Code settings to boost productivity.
Cursor basic configuration
Download and install the latest Cursor from the official website.
Log in with a Google account for quick authentication.
Import settings if migrating from VS Code to retain extensions and themes.
Set global Rules ; see the Cursor Rules Best Practices article for detailed options.
Python development environment
1. Install Python
https://www.python.org/downloads/
After installation, add the Python binary to your PATH by editing ~/.zshrc:
export PATH="/Library/Frameworks/Python.framework/Versions/3.13/bin:$PATH"Verify the installation:
$ python3 --version
Python 3.13.1
$ pip3 --version
pip 24.3.1 from /Library/Frameworks/Python.framework/Versions/3.13/lib/python3.13/site-packages/pip (python 3.13)Optional aliases for convenience:
alias python='python3'
alias pip='pip3'2. Virtual environment management
uv – fast package installation and environment handling.
poetry – modern dependency management and packaging.
Install them:
# Install uv (via Poetry installer script)
curl -sSf https://install.python-poetry.org | python3 -
# Install poetry
pip install poetry3. Cursor extensions for Python
Python (Microsoft) – language support.
Python Debugger – breakpoints, step‑through, variable inspection.
Pylance – static type checking and intelligent suggestions.
Black Formatter – automatic code formatting.
Pylint – code linting.
Mypy – type checking.
Configure settings.json for Python:
{
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter",
"editor.formatOnSave": true
},
"pylint.enabled": true
}Select the interpreter via the command palette (Cmd + Shift + P → “Python: Select Interpreter”).
JavaScript/TypeScript development environment
1. Install Node.js via nvm
# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.40.2/install.sh | bash
# Load nvm without restarting
source "$HOME/.nvm/nvm.sh"
# Install Node 22
nvm install 22
node -v # v22.14.0
npm -v # 10.9.22. Choose a package manager
npm – bundled with Node, most widely used.
yarn – faster installs, better caching.
pnpm – disk‑space efficient, high‑performance.
npm install -g yarn
npm install -g pnpm3. TypeScript setup
Install TypeScript globally and initialise a project:
# Global install
npm install -g typescript
# Initialise
tsc --init
# Compile a file
tsc your-file.ts4. Cursor extensions for JavaScript/TypeScript
ESLint – code quality checking.
Prettier – code formatting.
JavaScript and TypeScript Nightly – latest TypeScript features.
Configure settings.json:
{
"[javascript]": {
"editor.tabSize": 2,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
},
"[typescript]": {
"editor.tabSize": 2,
"editor.defaultFormatter": "esbenp.prettier-vscode",
"editor.formatOnSave": true
}
}Swift iOS/macOS development environment
1. Install Xcode
Download the latest Xcode from the Mac App Store.
Install command‑line tools:
xcode-select --install2. Auxiliary tools
# Build without opening Xcode
brew install xcode-build-server
# Beautify xcodebuild output
brew install xcbeautify
# Advanced Swift formatting
brew install swiftformat3. Cursor extensions for Swift
SweetPad – compile, run, and debug Swift code.
Swift – syntax highlighting and basic language features.
After installing SweetPad, create a .sweetpad file at the project root to specify build and run parameters.
Java development environment
1. Install Java via SDKMAN
# Install SDKMAN
curl -s "https://get.sdkman.io" | bash
# List and install JDK 21
sdk list java
sdk install java 21.0.1-oracle
# Install build tools
sdk install gradle 8.7
sdk install maven 3.8.1
# Set default JDK
sdk default java 21.0.1-oracle2. Cursor extensions for Java
Extension Pack for Java – comprehensive Java support.
Gradle for Java – Gradle build integration.
Maven for Java – Maven build integration.
Spring Boot Extension Pack – Spring Boot development.
Configure settings.json for Java:
{
"java.jdt.ls.java.home": "/path/to/jdk",
"java.configuration.runtimes": [
{
"name": "JavaSE-21",
"path": "/path/to/jdk-21",
"default": true
}
],
"[java]": {
"editor.formatOnSave": true
}
}References: Cursor official site: https://cursor.com Python downloads: https://www.python.org/downloads/ VS Code Python migration guide: https://github.com/microsoft/vscode-python/wiki/Migration-to-Python-Tools-Extensions SweetPad documentation: https://sweetpad.hyzyla.dev/docs/intro/
Eric Tech Circle
Backend team lead & architect with 10+ years experience, full‑stack engineer, sharing insights and solo development practice.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
