ionide / Ionide-vim

F# Vim plugin based on FsAutoComplete and LSP protocol
MIT License
163 stars 20 forks source link

RPC errors when trying to connect to the LSP server #73

Open OmanF opened 11 months ago

OmanF commented 11 months ago

Describe the bug When starting an F# file, or running an operation that requires the LSP server being queried, I get RPC[Error] of varying types:

  1. When starting a file, the error is it couldn't find the last non-whitespace char
  2. When trying to comment a line using Tim Pope's vim-commentary plugin (which I've bound to gcc, for example), the error is it can't find a triggering char.
  3. For auto-complete dropdown, it's a coin toss: sometimes I get the same results as I get using Ionide for VSCode, and sometimes I get very partial results.

To Reproduce As indicated in the description, either open an F# or perform an operation that requires LSP server interaction.

Expected behaviour No RPC errors so the LSP communication is fluid and I get the full benefits of using the plugin.

Screenshots

ksnip_20230729-103018

ksnip_20230729-103102

Environment (please complete the following information):

Additional context I don't know if it's important, but I've fsautocomplete installed globally, version 0.61.1 and am starting the plugin in NVIM via the following call:

let g:fsharp#fsautocomplete_command = [ "fsautocomplete" ]
let g:fsharp#lsp_codelens = 0
TheAngryByrd commented 10 months ago

@baronfel is this another case of missing more places to return null instead of an error?

baronfel commented 10 months ago

Yeah, I think so - I bet we could search for these errors and return more gracefully!