-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Gnome Builder support #3758
Comments
More details: unsurprisingly, I had to open the project folder, not a source code file. That takes care of the wrong root directory. Then:
The source code is: fn main() {
let s = "hello".to_owned();
s.<|>
println!("{}", s);
} |
I can't reproduce this in vscode. In fact in vscode it always seems to send down the entire file in |
With Code:
|
It doesn't look like the gnome builder lsp client is respecting our text synchronization choice of "full" (see caprs.rs) https://microsoft.github.io/language-server-protocol/specifications/specification-current/#textDocument_synchronization |
My guess is that |
Hey all. I will help here. Actually i implement the necessary client functionality to react to the server capabilities and send the full buffer instead just the incremental changes.
Do i have to set some specific environment variables to be able to use rust-analyzer correctly? This file exists of course. |
It sounds like cargo is not on your PATH. That's common with DEs, since it's added the by .bash_profile and that's not sourced if you run the editor from the DE. Try running it from a terminal. |
Got it. Seems to work at least without specific errors. Completion is still not valid - will investigate whats the problem here. Thank you @lnicola |
@gwutz it works fine for me 😛: |
Did you implemented the full text synchronization? I got it already to work too. Right now i make my PoC product ready here: https://gitlab.gnome.org/GNOME/gnome-builder/-/merge_requests/268 |
No, I added incremental synchronization support in #4153. |
Ha, this super awesome. What will be the default for the future? Full or incremental? I still will finish this plugin (as there is no implementation for analyzer nevertheless) and maybe i can drive some specific language server client things (messages, installation automatic etc.) |
I hope we'll default to incremental, but my PR wasn't even reviewed yet, so don't take it for granted. |
@lnicola FYI I'm not sure if you've worked on Gnome Builder but it should support all three modes: see microsoft/language-server-protocol#967 (comment) |
@kjeremy yes but this is not the case right now |
Add `miri_start` support This PR uses a function with the exported symbol `miri_start` as a drop-in alternative to `#[start]`. So the signature stays the same as suggested in [this comment](rust-lang/miri#3498 (comment)). <del>I’ve also removed Miri’s restriction to only work on bin crates as I don’t think this is necessary anymore.</del> Closes rust-lang#3758
It seems that Gnome Builder supports LSP, but doesn't allow users to configure the path to the server. Replacing
rls
withrust-analyzer
in/usr/lib/gnome-builder/plugins/rls_plugin.py
should work, but after doing that I ran into a snag.rust-analyzer
starts, but uses the wrong project directory and doesn't work very well. It's worth looking into this as it would improve compatibility with at least one editor. One way to debug it would be to trace the LSP communication and compare Gnome Builder with Code.The text was updated successfully, but these errors were encountered: