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

New files not getting picked up by LSP #27

Open
jakobkhansen opened this issue Mar 12, 2024 · 2 comments
Open

New files not getting picked up by LSP #27

jakobkhansen opened this issue Mar 12, 2024 · 2 comments

Comments

@jakobkhansen
Copy link

Hello,

this plugin works great, the only issue I am having is that creating a new file requires me to restart Neovim in order for Roslyn to pick up the new file. Creating files with either :e Filename or Neotree plugin seems to not work. I believe Neovim needs to fire some sort of didCreate event to the LSP server, not sure if that is happening. It seems like the Roslyn LSP attaches to the new buffer, but no LSP capabilities are working (diagnostics, hover, etc). Is there any way to fix this?

@jakobkhansen
Copy link
Author

jakobkhansen commented Mar 13, 2024

FYI: When a new file is created by the LSP (code-action -> Move type to (new file)), there is no difference, it does not work.

But I have discovered that one thing is working, hovering something which is already defined in the current file:

image

So it seems that the LSP server is actually attached and knows of the new file, but stuff like auto-completion, diagnostics and hovering external dependencies (or symbols defined in other files) still does not work until Neovim is restarted. It's almost as if the LSP server is running in some kind of standalone mode for the current file.

@WillEhrendreich
Copy link

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

2 participants