Open markusbrammer opened 4 months ago
@cannorin , I dug into this a little bit, to the extent of changing the default to this in autoload/fsharp.vim
, trying to implement the CodeLens
property, which also mentions the reference count. I also removed all properties referencing this reference code lens. I tried these variations with each change:
:so $MYVIMRC
If you have any pointers, I can continue digging on this one. I didn't have time yet, but my next step will be checking the LSP log when starting up and changing these options.
@greggyb It should be enough to call :FSharpUpdateServerConfig
to update the LSP server configuration, which calls workspace/didChangeConfiguration
under the hood.
My concern is that CodeLens options may not work in workspace/didChangeConfiguration
and have to be specified in initializationOptions
(which is init_options
in Neovim's LSP client). If that is the case, we would have to explicitly add it to initializationOptions
as we do for AutomaticWorkspaceInit
.
https://github.com/ionide/Ionide-vim/blob/master/lua/ionide/init.lua#L38-L54
I'm going to take a look at this issue on this weekend (since I suspect that setting the CodeLenses
option would fix this), but I really appreciate it if you can continue investigating it! Feel free to open a PR if you manage to fix it at your end before I do :)
According to the changelog, the setting was renamed from FSharp.EnableReferenceCodeLens
to FSharp.codeLenses.references.enabled
: https://github.com/ionide/FsAutoComplete/blob/edca0ecf0c081b80aec1a135d4fffddcf28fe449/CHANGELOG.md?plain=1#L420.
Here's where it's accessed: https://github.com/ionide/FsAutoComplete/blob/edca0ecf0c081b80aec1a135d4fffddcf28fe449/src/FsAutoComplete/LspServers/AdaptiveFSharpLspServer.fs#L1539
Describe the bug It doesn't seem possible to disable reference code lens for FSAutoComplete (FSAC). The FSAC setting
FSharp.EnableReferenceCodeLens
is included in the Ionide's list of FSAC configs/settings: https://github.com/ionide/Ionide-vim/blob/8435bae84b26b602dbb68399661b3989915cc4d3/autoload/fsharp.vim#L178 I am also usinglspconfig
.To Reproduce NA, see expected behaviour
Expected behaviour I would expect to behave like disabling other FSAC settings:
But it doesn't work, the reference counter is still there, see screenshot.
Screenshots Want to disable the![image](https://github.com/ionide/Ionide-vim/assets/62746606/bd8ef8ce-f5ee-4b27-8bd3-254bdc01280e)
1 References
part.Environment (please complete the following information):
Additional context This might not be a bug if it is not implemented.