When using only_current_line = true, the cursor will jump too far when moving down to the next line, if the current line has a diagnostic.
Video: https://home.picourl.dk/m/BipyFsYr
Look in the bottom right for which line the cursor is actually on, and compare to which line it appears on. Could this be a Neovim bug?
❯ nvim --version
NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by linuxbrew@07b28abf8b55
Minimal config:
local install_path = vim.fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
vim.cmd("!git clone https://github.com/wbthomason/packer.nvim " .. install_path)
vim.cmd "packadd packer.nvim"
end
require("packer").startup(function(use)
use "wbthomason/packer.nvim"
use "williamboman/mason.nvim"
use "williamboman/mason-lspconfig.nvim"
use "neovim/nvim-lspconfig"
use({
"https://git.sr.ht/~whynothugo/lsp_lines.nvim",
config = function()
require("lsp_lines").setup()
end,
})
end)
require "lsp_lines".setup {}
vim.diagnostic.config {
virtual_text = false,
virtual_lines = {
only_current_line = true,
},
underline = true,
update_in_insert = false,
show_signs = true,
severity_sort = true,
}
require "mason".setup {}
require "mason-lspconfig".setup {}
require "lspconfig".sumneko_lua.setup {}
Sounds like a neovim bug. Try https://github.com/neovim/neovim/issues
Looks like this is fixed: https://github.com/neovim/neovim/issues/22704