-
Notifications
You must be signed in to change notification settings - Fork 46
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
Is there interest in moving ruff-lsp
implementation into rust?
#300
Comments
Very interesting! We do have interest in moving the LSP to Rust and building it directly into Rust. It would make development much easier, and also make the LSP more efficient -- plus, we could store long-lived state in Ruff itself. I can't comment on that specific crate yet, but @MichaReiser did a proof-of-concept here with further notes: astral-sh/ruff#7262. |
The intent of this |
There are some marked advantages for doing this in An issue with formatting notebooks directly to disk is the loss of edit data. The editor will have to reload the file from disk, and useful information can get lost in the process. This can also prevent other extensions that user might have setup from contributing into this process during formatting. |
Sounds interesting. How would it compare to the lspserver and lsptower crates? |
The Example of changes to spec, this one I did replacing anonymous types with named types for better stability in types names: https://github.com/microsoft/vscode-languageserver-node/pull/1308/files That is an example of a major change to how types are defined in the spec. We also refine the document string and type values more often than such large changes. Once we have enough confidence in this package. we will approach server implementations to switch to this package. Similar to how we did with python. |
@MichaReiser The owner of the Tower-LSP (https://crates.io/crates/tower-lsp) asked for rust types, see here: microsoft/lsprotocol#151 |
So it's similar to lsp-types but with recent updates? It sounds interesting, depending on when it becomes available and how customizable it is (async vs custom scheduling) |
Yes. and this will be auto generated.
This is open for feedback, we want to shape it based on consumer feedback. So, my ask is if we could get some input from rust users who have experience with build LSP would be very helpful. |
I just published an initial alpha build of |
Thanks for the update. We'll consider it when having a closer look on implementing our LSP in rust. I'll close this issue for now since we answered the initial question. |
I work on the
lsprotocol
package which is used bypygls
as the types implementation for LSP in python. I am working on a similar package for rust, and the intent is that general purpose rust LSP servers would use that as the base package.This is a work in progress (and in initial phase): https://github.com/microsoft/lsprotocol/tree/main/packages/rust/lsprotocol
If you have any interest in adopting this to implement rust based servers please provide feedback on this.
PS: posted this as an issue since discussions are not enabled on this repo.
The text was updated successfully, but these errors were encountered: