nvim --version:位 nvim --version
NVIM v0.5.0-dev
Build type: Release
LuaJIT 2.1.0-beta3
Compilation:
Compiled by nixbld
Features: +acl +iconv +tui
See ":help feature-compile"
system vimrc file: "$VIM/sysinit.vim"
fall-back for $VIM: "
/nix/store/0ksh7zkgn9463c3wgpcz0axy192hz1ga-neovim-unwrapped-0.4.3/share/nvim
"
Run :checkhealth for more info
:checkhealth result: everything seems ok except for missing python/ruby/node/perlkitty 0.16.0$TERM: xterm-kitty位 cat ~/.config/nvim/init.vim
call plug#begin('~/.local/share/plugged')
Plug 'neovim/nvim-lsp'
call plug#end()
lua <<EOF
require'nvim_lsp'.rust_analyzer.setup{}
EOF
install rust-analyzer
open hello-world rust project and start typing
Transient syntax errors shift the whole character grid and in general feel very disruptive
https://asciinema.org/a/gwwim5tVtoORsg5cekqdCYXn8
Language servers provide immediate feedback about syntax errors, so it is important that this feedback is not distracting from writing the code. The perfect solution would be a red squiggly. My undestanding is that this is impossible to do in a terminal, but:
It might be useful to see what emacs does in default (modulo color theme) configuration:
https://asciinema.org/a/Hgcp8Zlzk1wtgFeUYCqOxCAoN
It just colors the erroneous code in red. With this color scheme it is probably too subtle, but at least the editing itself is not interrupted.
Also, I must say otherwise the out-of-the-box experience of nvim-lsp feels better: the server is started automatically, and the delay between edits and error pop-ups is much smaller!
I also like how IntelliJ does this: it uses red squigly for the text span, and than it displays the actual syntax error message in the modline.
either you can assign a fixed width to your signcolumn or you can choose to disable mark creation in lsp. https://github.com/haorenW1025/diagnostic-nvim is helpful to tweak this. Maybe the default should be changed to be less disruptive.
Indeed, set signcolum=yes fixes the most problematic issue for me, thanks. Is there perhaps a similar easy config to move virtual text (?) of error message to an area not directly adjacent to the editor code?
And yes my +1 vote to make the default behavior more useful.
I don't like virtualtext either (on small screen I can't read the message). You can disable it with the aforementioned plugin. I use popups instead.
I don't like virtualtext either (on small screen I can't read the message). You can disable it with the aforementioned plugin. I use popups instead.
Is it possible to make the popup always appear instead of only on jump?
See also https://github.com/haorenW1025/diagnostic-nvim/issues/29
Most helpful comment
either you can assign a fixed width to your signcolumn or you can choose to disable mark creation in lsp. https://github.com/haorenW1025/diagnostic-nvim is helpful to tweak this. Maybe the default should be changed to be less disruptive.