-
Notifications
You must be signed in to change notification settings - Fork 237
Only Snippets in intellisense (no modules) #2048
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
Comments
How are you setting up "IntelliSense" aka completion requests in NeoVim? The only "snippets" that should exist in the realm of using just PSES are from PSSA, which comment-help is, so at least the analysis service (PSSA) is working. |
I suppose that's where I'm stuck. I've checked the default config and nothing immediately stands out to me that says "this will enable code-completion". I've not run into this problem when installing other LSPs (yet) so I was hoping to get some advice from someone who has had success with this in the past. |
I think you need to set it up then...from the
For
|
My best guess...the default configuration you're loading from https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/server_configurations/powershell_es.lua probably needs to be revised to advertise completion capabilities, I sort of found an example of that in https://github.com/neovim/nvim-lspconfig/blob/master/lua/lspconfig/server_configurations/clangd.lua. |
That's what I'm doing in my config (I think). I pull in the default capabilities from the NVChad lsp config with this line: local capabilities = require("plugins.configs.lspconfig").capabilities Which should look something like this: M.capabilities = vim.lsp.protocol.make_client_capabilities()
M.capabilities.textDocument.completion.completionItem = {
documentationFormat = { "markdown", "plaintext" },
snippetSupport = true,
preselectSupport = true,
insertReplaceSupport = true,
labelDetailsSupport = true,
deprecatedSupport = true,
commitCharactersSupport = true,
tagSupport = { valueSet = { 1 } },
resolveSupport = {
properties = {
"documentation",
"detail",
"additionalTextEdits",
},
},
} I've had success with this method using go and bicep LSPs but PowerShell eludes me... |
I think you're missing this part:
|
Thanks, unfortunately, no luck getting this going on my end. I've also raised this as an issue on the nvim-lsp repo: I did come across a log file generated by PSES with this line:
Not sure if this helps at all. |
Hm, the thing that reminds me of is OmniSharp/csharp-language-server-protocol#588 That was a bug in our LSP library because the spec is very confusing about the ordering of the initialize and initialized requests. Might be worth looking into for nvim-lspconfig, but could also be a red herring. |
same issue, any updates? |
No progress on Windows 11. However, PSES on Linux is working. Tested in Ubuntu 22.04 (WSL) and Arch running essentially identical neovim configurations. The language server starts on Windows, but doesn't attach to the active buffer. Every other LSP-compatible language I've tried on Windows works fine, but PSES does not. I also tried turning on verbose logging to see if I could see anything that might be useful. No errors or warnings. Also I'm no longer able to replicate the error in my previous comment. Seems like to LSP implementation just isn't Windows-friendly. |
Hm, are there over LSP plugins for Vim that could be tried? |
I can confirm that coc-powershell works on Windows. But it's not as good as the native nvim lsp. I'm not the first person to run into this issue. |
@andyleejordan @ogios I've opened a new issue in the nvim-lspconfig repo. If you have anything you can add that the maintainers might find helpful that would be appreciated 👍🏻 |
Uh oh!
There was an error while loading. Please reload this page.
Prerequisites
Steps to reproduce
Using PowerShell Editor Services in neovim with the following LSPConfig:
As part of troubleshooting, I set the cmd to include my profile which had this line:
However, still no modules in Intellisense.
Expected behavior
Typing `Get-C` in a ps1 buffer should display Get-ChildItem in autocomplete
Actual behavior
Type `Get-C` in a ps1 buffer only shows snippets
Error details
No response
Environment data
Version
3.8.7 - Mason Registry
Visuals
Example of missing IntelliSense

Output of :LspInfo

The text was updated successfully, but these errors were encountered: