This documentation provides valuable insights, tips, and workarounds from my personal experience transitioning from JetBrains PyCharm—my primary IDE for the past five years—to Cursor. It's designed to help Python developers navigate this shift smoothly while maintaining productivity.
If you're working on Linux (Ubuntu in my case), I recommend you to follow this tutorial to install Cursor effectively on your machine.
For the easiest possible setup experience:
-
Clone this project
git clone [email protected]:lucasalvarezlacasa/jetbrains_to_cursor.git
-
Run the setup script
cd /folder/where/jetbrains_to_cursor/was/cloned bash setup.sh --path /path/to/your/project # If you use "fish" run: # "bass source setup.sh --path /path/to/your/project"
This script will:
- Create all necessary configuration files in the target project, including:
- Configure the
PYTHONPATH
in a.env
file - Validate the setup to ensure everything is properly installed
-
Install recommended extensions
- Open your target project in Cursor
- After running the script, open the Extensions panel (
Ctrl+Shift+X
) - Type
@recommended
in the search bar - Click 'Install All' to install the full suite of recommended extensions
-
Restart Cursor for all settings to take effect
-
There are some minor configurations you cannot set programatically. Find them in editor-customization
If you prefer to set up manually, follow these steps:
-
Install the PyCharm Theme
- Get the PyCharm Theme extension.
- Choose the Dark+ mode to maintain visual consistency.
- If some of the colours are still a bit off, you can always tune via the
settings.json
file.
-
Install the JetBrains Icon Theme
- Get the JetBrains Icon Theme extension.
- Choose the UI Dark mode to maintain visual consistency.
-
Preserve Your Shortcuts
- Install the IntelliJ IDEA Keybindings extension. This keeps most familiar shortcuts from JetBrains.
-
Install Essential Extensions
- Core Python Support
- Python: Core language support from Microsoft.
- Python Debugger: Enhanced debugging capabilities.
- Python Test Explorer for VS Code: Visual interface for testing. You can run Python tests in the Sidebar of Cursor.
- Pylance: Fast Python language server. Enhanced IntelliSense experience.
- Code Quality Tools
- Python Docstring Generator: Generate Python docstrings automatically.
- Python Path: Python import utils.
- MagicPython: Syntax highlighter for Python.
- Black Formatter: Formatting support for Python files using black formatter.
- Extra:
- Jupyter: Jupyter notebook support, interactive programming and computing that supports IntelliSense, debugging and more.
- vscode-pdf: Display "pdf" files in Cursor.
- markdownlint: Markdown linting and style checking for Cursor.
- Docker: Build, manage and deploy containerized applications in Cursor.
- Even Better TOML: Fully-featured TOML support.
- GitLens: Supercharge Git within Cursor. Very useful for being able to generate links from specific lines of code (pointing to the server URL) and so on.
- Core Python Support
Some additional considerations:
- Use uv as a modern Python Package Manager.
- Use ruff as a modern Python linter and formatter.
- Use mypy for type checking.
- In my case, I run validations via tox, but consider running these validations every time you save changes into your files with Cursor.
More useful recommendations can be found in the following link.
Set up run and debugging configurations. Notice that PyCharm by default will prepend the PYTHONPATH
to the script execution. This is something we have to configure in Cursor.
-
Create .vscode/launch.json
-
Create an
.env
file in the project's root with your environment variables:PYTHONPATH=path_to_your_project_root
-
Now you can easily run or debug your code with Cursor.
In case you want to use it as a baseline, this are my fine-tuned settings.json file. Apart from these, tune the following settings:
-
View Optimization: Go to the top menu,
View → Appearance → Align Panel → Left
to optimize your workspace layout. This will make the Terminal panel extend horizontally, as it does in PyCharm. -
Large context: For larger projects, go to
Cursor Settings → Features → Large context
and enable it for improved readability.
Rules are key to customize the behavior of the underlying model. They need to be stored un .cursor/rules
.
Here are the rules I'm currently using for Python.
You're all set! Cursor is now optimized to deliver a smooth, productive experience similar to PyCharm. Happy coding!