Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Auto-import when accepting auto-completion suggestion #143

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

Auto-import when accepting auto-completion suggestion #143

jakobkhansen opened this issue Mar 12, 2024 · 2 comments

Comments

@jakobkhansen
Copy link

Hello,

I am using this LSP server in Neovim with nvim-cmp auto-completion. In many LSP servers, accepting an auto-completion suggestion will also insert the import at the top of the file. I do not get this with csharp-language-server so I have to trigger a code-action on the symbol to get the import. Is auto-importing supposed to work in csharp-language-server or is it a missing feature/bug?

I have used roslyn.nvim plugin before which directly uses Roslyn LSP server, and auto-imports are working in that one (without any code for that on the plugin-side AFAIK), so it seems to be possible to do with Roslyn?

@jakobkhansen
Copy link
Author

Tested also with #141 that this does not work, so it does not work with a newer Roslyn version either.

@razzmatazz
Copy link
Owner

It is a missing feature/bug. IIRC the issue was that Roslyn does not (did not) provide completion APIs that does this.
This may have changed since.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants