BUG: insert above the first line
ocfox opened this issue · comments
When I edit rs files with rust-analyzer, use O
at first line will get an error message:
Error executing lua callback: ...unwrapped-master/share/nvim/runtime/lua/vim/lsp/sync.lua:142: attempt to get length of local 'line' (a nil value)
stack traceback:
...unwrapped-master/share/nvim/runtime/lua/vim/lsp/sync.lua:142: in function 'compute_start_range'
...unwrapped-master/share/nvim/runtime/lua/vim/lsp/sync.lua:359: in function 'compute_diff'
...ovim-unwrapped-master/share/nvim/runtime/lua/vim/lsp.lua:427: in function 'incremental_changes'
...ovim-unwrapped-master/share/nvim/runtime/lua/vim/lsp.lua:460: in function 'fn'
...ovim-unwrapped-master/share/nvim/runtime/lua/vim/lsp.lua:164: in function 'for_each_buffer_client'
...ovim-unwrapped-master/share/nvim/runtime/lua/vim/lsp.lua:1184: in function <...ovim-unwrapped-master/share/nvim/runtime/lua/vim/lsp.lua:1176>
After press ENTER, new line is inserted and the cursor is in the right place.
If LspStop
then LspStart
, there no error message.(But not work with LspRestart
.)
Which version of the neovim you are using? It is okay with 0.6.1 version.
v0.7.0-dev
I switch to 0.6.1 now, it's work well.