Open antosha417 opened 1 year ago
If params.lsp_params.range
is wrong, then this is likely an issue with Neovim itself, since we don't modify those at all. Can you check Neovim's LSP log to see whether this issue is specific to null-ls? It should be possible to reproduce with other language servers.
@jose-elias-alvarez I was able to reproduce it with rust-analyzer. So it happens on neovim side. Not sure if it is a bug or a feature.
FAQ
Issues
Neovim Version
NVIM v0.8.1
Dev Version?
Operating System
MacOs
Minimal Config
Steps to Reproduce
nvim --clean -u minimal_init.lua
:e test.lua
Put into your
test.lua
visual-line select (with capital
V
) inside[[
and]]
so all three lines are selected from beginning until the end. And move the cursor to the end ofline3_elem1
.press
<space>ca
to callvim.lsp.buf.code_action
and selectprint range code action params
.the params are
Notice that the
end
of our range in the cursor position and not the end of the line.Reproducibility Check
minimal_init.lua
template and that my issue is reproducible by runningnvim --clean -u minimal_init.lua
and following the steps above.Expected Behavior
lsp_params.range
would include all selected textActual Behavior
lsp_params.range
includes only text up until the cursorDebug Log
Help
Yes, but I don't know how to start. I would need guidance
Implementation Help
I'm not sure it is the issue with null-ls. I think it might be neovim behaviour for all language servers.
Requirements