Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Standalone file support #25

Closed
emi2k01 opened this issue Jun 20, 2021 · 8 comments
Closed

Standalone file support #25

emi2k01 opened this issue Jun 20, 2021 · 8 comments

Comments

@emi2k01
Copy link

emi2k01 commented Jun 20, 2021

I wonder if standalone file support 1 could be supported with this plugin or if that's the work of another plugin like lsp-config.

@runiq
Copy link

runiq commented Jun 25, 2021

Support for that may be a little preliminary at the moment: For now, the list of files r-a considers standalone has to be supplied at LSP server start. This implies a LSP server restart whenever a new standalone file is being opened in a buffer.

This behavior is subject to change soon, but for now it is what it is 🤷

@simrat39 simrat39 pinned this issue Jul 19, 2021
@simrat39
Copy link
Owner

This works as expected but please let me know if there any problems, it might be a bit wonky

@simrat39
Copy link
Owner

As of now, the language server will start automatically if you open a rust file directly (nvim abc.rs), but you can manually start it for a buffer with the RustStartStandaloneServerForBuffer command.

@p00f
Copy link
Contributor

p00f commented Jul 21, 2021

For me the default lsp handlers are used instead of the overriden ones on standalone files (hover, diagnostics, signature help)

@simrat39
Copy link
Owner

@p00f can you try again now? it seems to work fine for me

@p00f
Copy link
Contributor

p00f commented Jul 22, 2021

Yes, thanks

@emi2k01
Copy link
Author

emi2k01 commented Oct 11, 2021

It seems on_attach is not called when I run RustStartStandaloneServerForBuffer

@simrat39
Copy link
Owner

It seems on_attach is not called when I run RustStartStandaloneServerForBuffer

Should work now

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants