Description
openedon Apr 22, 2020
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
- nvim-lsp version(commit hash): don't know, installed today with vim-plug
:checkhealth
result: everything seems ok except for missing python/ruby/node/perl- What language server: rust-analyzer
- Operating system/version: NixOS 20.03
- Terminal name/version:
kitty 0.16.0
$TERM
: xterm-kitty
How to reproduce the problem from neovim startup
- install nvim-lsp in basic configuration
λ 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
Actual behaviour
Transient syntax errors shift the whole character grid and in general feel very disruptive
https://asciinema.org/a/gwwim5tVtoORsg5cekqdCYXn8
Expected behaviour
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:
- something like underlining or just using a different color should be possible
- the character grid is shifted even when using gui (gnvim, nvim-qt)
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!
Activity