-
Notifications
You must be signed in to change notification settings - Fork 16
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
Completion doesn't work in Neovim #104
Comments
Hi - sorry to it’s not working for you; there are a couple of environment variables you can set for the language server process to enable verbose logging
You can also (depending on your LSP client implementation) turn on LSP request tracing: |
thank you!! I was trying to enable logging via the init params and/or configuration instead of environment variables. So it looks like the server handles the initialization request from neovim fine, and I'm even getting some NuGet completion results such as:
But all those requests are from |
okay, I turned on request tracing in neovim, and it appears the language server does not respond to the request for completion. Neovim is sending the
I'll see if I can debug this server |
Try turning the server log level up to verbose and you should see messages about handlers running (you can pass logging config when sending the init message sequence to the language server. |
(
|
I struggled for a while figuring out which section of the init parameters I should send config on, but I eventually used
(in case someone else wants to try this). Here's the log file. I redacted some URLs, but essentially it seems like the language server never gets the completion requests from neovim. I haven't been able to figure out how to debug the server yet. |
In VSCode there is the concept of trigger characters for a language; when typing |
yep, people bind it to different things depending on the plugin but you can manually trigger completion. Your post gave me the idea to try this by directly calling
so now I'm thinking that somehow neovim might not be getting the correct set of capabilities for the server |
When I manually set the capabilities of the server to include For any neovim users following this thread, I used the following command: lua vim.lsp.get_clients()[3].server_capabilities.completionProvider = { resolveProvider = true, triggerCharacters = {" "} } This could potentially be a workaround until I figure out how to get Neovim/this language server to agree about capabilities. For reference, Omnisharp works, and here is how they register completion capabilities: https://github.com/OmniSharp/omnisharp-roslyn/blob/ac7b9b8509356e39583de2b9fdf363005e6c8595/src/OmniSharp.LanguageServerProtocol/Handlers/OmniSharpCompletionHandler.cs#L87 Which seems very similar to how this project sets the capability: msbuild-project-tools-server/src/LanguageServer.Engine/Handlers/CompletionHandler.cs Line 247 in 49bc6f6
|
The logging isn't really helpful on initialization:
But I think this is an issue upstream in https://github.com/OmniSharp/csharp-language-server-protocol |
on a second pass-through, seems I was mistakenly looking at the wrong language server client as a red-herring. The capabilities for
It's just that completion can only be triggered manually, and in some cases no results are returned. I'll go ahead and close out this issue, since it seems like that problem is already mentioned in #52. My PR to include this server in neovim's default set of language server configurations was also just merged in case you wanted to take a look neovim/nvim-lspconfig#3176 |
Just out of curiosity, which language identifier are you using - XML or MSBuild? |
by I seem to only get completions when I manually trigger them, and even then they only show up when I manually trigger on an empty line. For other LSPs, I get competions while I'm typing |
I wonder if it’s because our implementation of LSP |
Hello! Thank you for your awesome project! I'm trying to use it on neovim. For the most part, everything works out of the box... other than completion.
Completion won't work for any well-known tasks/properties or any imports. I see some errors about the plugin ignoring my repositories from work because they don't support the NuGet V3 API, but no other logs, even when I run on
Debug
log level. I'll keep messing with the server and update here if I figure things out. I'm guessing there might be some other pipe over which the server is sending completion information.The text was updated successfully, but these errors were encountered: