-
Notifications
You must be signed in to change notification settings - Fork 486
feat(python-lsp)!: replace the old pylsp with zuban and ruff #1528
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 4 commits
Commits
Show all changes
12 commits
Select commit
Hold shift + click to select a range
0b3b6d6
feat(lsp): replace the old pylsp with pyrefly and ruff
Cloud0310 cb0f44c
fix: enable ruff formatter
Cloud0310 feee434
chore(linter): remove used var is_windows
Cloud0310 e82cc22
added(python): align with previous ruff config.
Cloud0310 a7f405a
chore(linter): fix line length and align with other configs
Cloud0310 c3272a6
Merge branch 'ayamir:main' into main
Cloud0310 bb1e26a
Merge branch 'ayamir:main' into main
Cloud0310 d7505e8
Merge branch 'ayamir:main' into main
Cloud0310 0c97179
Merge branch 'ayamir:main' into main
Cloud0310 2859709
Merge branch 'ayamir:main' into main
Cloud0310 865a73b
changes: switch to zuban
Cloud0310 3996741
chore(core.settings): `:sort` `lsp_deps` and `server_formatting_block…
charliie-dev File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,56 @@ | ||
| ---@brief | ||
| --- | ||
| --- https://github.com/astral-sh/ruff | ||
| --- | ||
| --- A Language Server Protocol implementation for Ruff, an extremely fast Python linter and code formatter, written in Rust. It can be installed via `pip`. | ||
| --- | ||
| --- ```sh | ||
| --- pip install ruff | ||
| --- ``` | ||
| --- | ||
| --- **Available in Ruff `v0.4.5` in beta and stabilized in Ruff `v0.5.3`.** | ||
| --- | ||
| --- This is the new built-in language server written in Rust. It supports the same feature set as `ruff-lsp`, but with superior performance and no installation required. Note that the `ruff-lsp` server will continue to be maintained until further notice. | ||
| --- | ||
| --- Server settings can be provided via: | ||
| --- | ||
| --- ```lua | ||
| --- vim.lsp.config('ruff', { | ||
| --- init_options = { | ||
| --- settings = { | ||
| --- -- Server settings should go here | ||
| --- } | ||
| --- } | ||
| --- }) | ||
| --- ``` | ||
| --- | ||
| --- Refer to the [documentation](https://docs.astral.sh/ruff/editors/) for more details. | ||
|
|
||
| ---@type vim.lsp.Config | ||
| return { | ||
| cmd = { "ruff", "server" }, | ||
| filetypes = { "python" }, | ||
| root_markers = { "pyproject.toml", "ruff.toml", ".ruff.toml", ".git" }, | ||
|
|
||
| -- the following are added by nvimdots | ||
| settings = { | ||
| init_options = { | ||
| settings = { | ||
| lint = { | ||
| select = { | ||
| -- enable: pycodestyle | ||
| "E", | ||
| -- enable: pyflakes | ||
| "F", | ||
| }, | ||
| extendSelect = { | ||
| -- enable: isort | ||
| "I", | ||
| }, | ||
| -- the same line length as black | ||
| lineLength = 88, | ||
| }, | ||
| }, | ||
| }, | ||
| }, | ||
| } | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.