-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add docs for Ruff language server #12344
Conversation
|
68b6ab1
to
9163ad8
Compare
Thanks for putting the entire documentation together. It's very pretty and I like the overall structure. I haven't read through the original PR, so it's likely that some of what I bring up here has been discussed on that PR. My first impression is that we shouldn't set I don't think the documentation has to change significantly. It's just the structure that needs to change a little. I suggest renaming the top-level Ruff Server navigation entry to Editors, similar to Prettier, and change Integrations only to cover what's Other integrations today. I think this will also help to reduce some overlap between Integrations and Ruff Server today where both cover the server and Ruff LSP. This raises a few questions.
A small side note. Why is the ruff server section expandable and the other sections aren't? |
I see what you mean. I like that way of framing Ruff's editor integration.
I'm assuming that integrations using the
I think it might be ok to remove
By this, I'm assuming you mean editors like PyCharm and Textmate. If so, then I think it should just be included in the "Editors" section given the rename. It wasn't included alongside other editors because the "The Ruff Language Server > Setup" section was specific to setting up the language server in those editors.
It's because each section is in it's own file, otherwise the entire page becomes too cluttered with a lot of information. This is inspired by the uv docs. Internal message thread: https://discord.com/channels/1039017663004942429/1080996377611489350/1262939217437261907 |
Thinking about it a bit more... Overall, there are two ways one could setup Ruff in their editor (except for VS Code where we provide an official extension):
If there's just an "Editors" section, then we could include all different ways to setup Ruff in individual editors. But then I'm not sure if other sections (features, settings, etc.) goes under "Editors" because those sections are specific to the language server. |
I tried to find other projects that document their editors along with the tool itself and couldn't find any good examples.
I think the features section fits well because it's the features you (might) get when using Ruff in your editor. Assuming the editor supports the required LSP features. I agree, that the settings are a bit more LSP specific. But I think we have a VS code setting for every LSP setting? We could even discuss the Common settings, followed by the editor specific settings. |
9163ad8
to
90571bb
Compare
@MichaReiser I've updated the structure and changed some wording as well. I might need to read through it once to update the "Ruff Language Server" references. What do you think of the new structure? |
Thank you for this PR, this is amazing, perfect for me. |
Summary
This PR adds documentation for the Ruff language server.
It mainly does the following:
For (2), the settings documentation is done manually but a future improvement (easier after
ruff-lsp
is deprecated) is to move the docs in to Rust struct and generate the documentation from the code itself. And, the VS Code extension specific options can be generated by diffing against thepackage.json
inruff-vscode
repository.Structure
ruff-lsp
Note
The settings page is manually written but could possibly be auto-generated via a macro similar to
OptionsMetadata
on theClientSettings
structresolves: #11217
Test Plan
Generate and open the documentation locally using:
python scripts/generate_mkdocs.py
mkdocs serve -f mkdocs.insiders.yml