Skip to content

Commit fdd5ac7

Browse files
committed
feat: write doc for python code intelligence
1 parent b2587e9 commit fdd5ac7

1 file changed

Lines changed: 28 additions & 0 deletions

File tree

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
---
2+
title: Python
3+
slug: "/Features/python-code-intelligence"
4+
---
5+
6+
**Phoenix Code** supports full code intelligence for Python: completions with documentation, parameter hints, hover info, Go to Definition, Find Usages, and type error checking with quick fixes in the Problems panel.
7+
8+
Everything works the same way as in [JavaScript & TypeScript](./js-ts-code-intelligence).
9+
10+
:::info Desktop Only
11+
Python code intelligence runs in the desktop app.
12+
:::
13+
14+
## Automatic Setup
15+
16+
Python support is powered by [Pyrefly](https://pyrefly.org), a language server built by Meta. Phoenix Code downloads it (~25 MB) the first time you open a Python file. The progress shows in the status bar, with a stop button to cancel.
17+
18+
<!-- TODO: PLUTO - add image here showing the python setup task in the status bar -->
19+
20+
> Updates are automatic, and if you are offline, the download waits for a connection.
21+
22+
To turn Python code intelligence off, set the `python.codeIntelligence` [preference](/docs/editing-text#editing-preferences) to `false`. Setting it back to `true` downloads the server again.
23+
24+
## Formatting with Ruff
25+
26+
The download also includes [Ruff](https://docs.astral.sh/ruff/), a Python formatter. The [Beautify Code](/docs/Features/beautify-code) command uses it to format your Python files.
27+
28+
If your project has its own Ruff config (`pyproject.toml` or `ruff.toml`), it is respected, so formatting matches what you get on the command line.

0 commit comments

Comments
 (0)