#25 Misplaced cursor using only_current_line = true 1 year, 7 months ago

Ticket created by ~tmp on ~whynothugo/lsp_lines.nvim

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"

    use "wbthomason/packer.nvim"
    use "williamboman/mason.nvim"
    use "williamboman/mason-lspconfig.nvim"
    use "neovim/nvim-lspconfig"
        config = function()

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 {}