-
-
Notifications
You must be signed in to change notification settings - Fork 21
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
Neovim lsp functionality doesn't work until after file is edited. #43
Comments
I "see" See (the rather long, ~3 minutes) screencast. 2021-11-15_17h05_15.mp4The Just to clarify what I mean by |
@klcarlton it seems like it has something to do with the fact FSAC is kind of "slow" to launch, so that FSAC can't respond to the initial CodeLens request. I noticed when I use @OmanF can you try |
@OmanF Also, if you restore/build your project in Windows anf try to edit it from WSL, FSAC tends not to work. Make sure to do |
I have tried your suggestions to no avail.
The interesting thing is that this happened right after the previous fix for an issue I posted. And, as always, thank you a lot for your effort! |
I think all issues are part of FSAC "childhood issues" with .Net 6... VSCode's Ionide's plugin is experiencing some issues as well (so much so, that they have a meta-issue to track .Net 6 specific issues). Weird thing is that using a .Net 5 SDK doesn't remove those issues. |
A/B test for FSACInstall an older version of FSAC as a .NET tool:
(if you have already installed it before, replace Then use the following to force Ionide-vim to use the one from .NET tool: let g:fsharp#fsautocomplete_command =
\ [ 'dotnet',
\ 'fsautocomplete',
\ '--background-service-enabled'
\ ] A/B test for Ionide-vimI've created new tags Plug 'ionide/Ionide-vim', {
\ 'do': 'make fsautocomplete',
\ 'tag': 'issue43',
\} Plug 'ionide/Ionide-vim', {
\ 'do': 'make fsautocomplete',
\ 'tag': 'issue43-2',
\} Try both 🙂 My setup
I'm using the latest Ionide-vim (no tag), and everything is working for me (besides the initial CodeLens etc). I suspect it is because the latest FSAC has some problem and you are using it. Also, I'm actually failing to run the latest FSAC in my WSL environment. |
@OmanF Also, from the next time, please create a new issue when you are not experiencing exactly the same problem as the original poster is. Your problem here is clearly different from what @klcarlton is experiencing.
|
See: #44 @klcarlton the problem you are experiencing is different from what is described in #44. I'll keep track of it in this issue. (try #44 if you are now affected by it too!) |
Will test once I'm off the work clock. |
@cannorin Looks like it's not an Ionide-Vim problem :) |
Upgrading Neither of the A/B branches for testing the plugin worked! Great, thank you very much! |
I'm having the same problem. I've tried the version 0.48.2 for |
A fix for the language server not launching should have been pushed in 0.49.2, please let me know if it works out for you! |
@LooserName404 I see the same rapid blinking. The lsp_client sends the "signature" request on every keystroke which seems to "restart" codelens. My workaround is to disable updating the signature on every cursor move and not start codelens automatically: let g:fsharp#show_signature_on_cursor_move = 0 Then I mapped the codelens.refresh request and I only call it when I want. A bit hacky but it works nicely. |
Describe the bug
Lsp functionality (go to definition, find references, etc) doesn't work when a .fs file is first opened. Codelens for function definitions show "Unresolved lens ..."
Once I have edited the file and exited insert mode for the first time, all functionality starts working.
The lsp log file shows:
[ERROR][2021-11-14 14:11:16] .../vim/lsp/rpc.lua:462 "rpc" "dotnet" "stderr" "[14:11:16.356 WRN] [LSP] CodeLensResolve - Cached typecheck results not yet available for /home/kcarlton/dev/fsharp/FTest/src/App/Program.fs\n"
Environment
Additional context
Installed with vim-plug. Using nvim-lsp. No configuration set other than keybindings.
It looks like the InsertLeave autocmd is running condelens.refresh(). At this point lsp functionality starts working.
But manually running :lua vim.buf.codelense.refresh() before this doesn't do anything.
If I disable codelense:
let g:fsharp#lsp_codelens = 0
Then the lack of lsp functionality happens. But in this scenario running :lua vim.buf.codelense.refresh() restores functionality.
Plugin is working wonderfully otherwise!
I'm pretty new to neovim. Sorry if I've missed something dumb.
The text was updated successfully, but these errors were encountered: