website/docs/IDE-features.mdx
{/*
Pyrefly’s language server powers a complete editing experience while fully disabling Pylance, ensuring no interference between checkers.
Each feature below links to the official LSP specification and shows what’s currently supported by Pyrefly.
Jump to where a symbol was originally defined with a click or <kbd>F12</kbd>. If there is both a .pyi and .py file, we will jump to the .py.
<video
src="/videos/go-to-definition.mp4"
width="720"
muted
loop
autoPlay
playsInline
preload="metadata"
/>
Navigate to the underlying type of any expression. If the expression is a type, we will navigate to the .pyi file if both a .py and .pyi exist.
<video
src="/videos/go-to-type-definition.mp4"
width="720"
muted
loop
autoPlay
playsInline
preload="metadata"
/>
Navigate to where the type was defined, but stop at imports. <video src="/videos/go-to-declaration.mp4" width="720" muted loop autoPlay playsInline preload="metadata" />
List all usages of a symbol across your codebase. <video src="/videos/find-all-references.mp4" width="720" muted loop autoPlay playsInline preload="metadata" />
See an outline of all top-level items in the current file. <video src="/videos/document-symbols.mp4" width="720" muted loop autoPlay playsInline preload="metadata" />
Search globally for functions, classes, and variables. <video src="/videos/workspace-symbols.mp4" width="720" muted loop autoPlay playsInline preload="metadata" />
See type info and docstrings when hovering over code. <video src="/videos/hover.mp4" width="720" muted loop autoPlay playsInline preload="metadata" />
Highlights all other instances of the symbol under your cursor. <video src="/videos/document-highlights.mp4" width="720" muted loop autoPlay playsInline preload="metadata" />
Live function signatures as you type, with parameter hints. <video src="/videos/signature-help.mp4" width="720" muted loop autoPlay playsInline preload="metadata" />
Autocomplete suggestions for project-specific symbols and imports. <video src="/videos/autocomplete.mp4" width="720" muted loop autoPlay playsInline preload="metadata" />
Safely rename symbols project-wide. <video src="/videos/rename.mp4" width="720" muted loop autoPlay playsInline preload="metadata" />
Type errors and warnings from Pyrefly’s checker appear in the diagnostics pane ("Problems" pane in VSCode). <video src="/videos/diagnostics.mp4" width="720" muted loop autoPlay playsInline preload="metadata" />
Rich syntax highlighting based on token type and origin. <video src="/videos/semantic-highlighting.mp4" width="720" muted loop autoPlay playsInline preload="metadata" />
Inline hints for types, parameter names, and return values.
You can turn inlay hints on or off using the VS Code setting editor.inlayHints.enabled.
We reuse Pyright's python.analysis.inlayHints.* settings for backwards compatibility. If you have or had Pyright installed, check these settings if inlay hints do not appear as expected.
| Setting | Type | Default | Description |
|---|---|---|---|
python.analysis.inlayHints.callArgumentNames | "all" | "off" | "partial" | "off" | Show parameter names at call sites. "partial" only shows names for arguments where the name is not obvious from the value. |
python.analysis.inlayHints.functionReturnTypes | boolean | true | Show return type hints on functions without a return type annotation. |
python.analysis.inlayHints.variableTypes | boolean | true | Show type hints on variable assignments without a type annotation. |
python.analysis.inlayHints.pytestParameters | boolean | false | Show type hints for pytest fixture parameters. |
Inlay hints can be double clicked to insert them as an annotation. <video src="/videos/double-click-inlay-hint.mp4" width="720" muted loop autoPlay playsInline preload="metadata" />
Go-to-definition can be used on a type in an inlay hint to jump its definition. This works even if the type isn't explicitly imported by the current file. <video src="/videos/cmd-click-inlay-hint.mp4" width="720" muted loop autoPlay playsInline preload="metadata" />
Pyrefly provides language services for Jupyter notebooks directly in VS Code and also in Jupyter Lab. In Jupyter Lab, once you install the jupyterlab-lsp extension, and Pyrefly will appear on the list of automatically-detected language servers.
Pyrefly also provides language services to Marimo notebooks. See Language Server Protocol for how to enable it.
Notebook support is experimental. Please report any bugs on our Github.
See all incoming functions calls to a particular function, as well as all outgoing function calls from a function. Call Hierarchy provides a full picture of how a particular function is used within a call stack.
See all subclasses and superclasses of a selected class.
Pull a method from a subclass to a superclass, or push a method from a superclass to a subclass.
Pull Member Up <video src="/videos/pull-up-refactor.mp4" width="720" muted loop autoPlay playsInline preload="metadata" />
Convert to Package takes .py file and moves it to a package directory with all logic moved into an init.py file.
<video src="/videos/convert-to-package.mp4" width="720" muted loop autoPlay playsInline preload="metadata" />
Convert to Module takes an existing package with all logic defined in its init.py and creates a named .py file from it.
Takes a function nested within another function or statement and moves it to the top level of the module.
Adds a new parameter to a function definition and update all call sites to pass the new parameter.
Removes redundant variables by replacing them with their value.
Declare a new field on a class with the value of the selected expression.
Declare a new variable with the value of the selected expression.
Flips the value of a boolean and updates all usages to work with new value.
See planned features and request your own on GitHub.