nvimdev / lspsaga.nvim

improve neovim lsp experience
MIT License
3.42k stars 286 forks source link

buffer/window vibrates when moving cursor in ts files #1347

Closed zsmatrix62 closed 10 months ago

zsmatrix62 commented 10 months ago

Describe the bug

Not sure if this is an lsp error or saga glitch but when i disabled plugin lspsaga it disappears. and this happens only in my Angular projects, when i move cursors in the file, buffer/window vibrates:

new-req-nominees

Steps to reproduce

my lspsaga config using layz.nvim:

return {
    {
        "glepnir/lspsaga.nvim",
        enabled = true,
        event = "BufRead",
        branch = "main",
        dependencies = {
            { "nvim-tree/nvim-web-devicons" },
            { "nvim-treesitter/nvim-treesitter" },
        },
        config = function()
            require("lspsaga").setup({
                diagnostic = {
                    show_code_action = true,
                },
                ui = {
                    -- currently only round theme
                    theme = "round",
                    -- border type can be single,double,rounded,solid,shadow.
                    border = "rounded",
                    winblend = 0,
                    expand = "",
                    collapse = "",
                    preview = " ",
                    code_action = "💡",
                    diagnostic = "🐞",
                    incoming = " ",
                    outgoing = " ",
                    colors = {
                        --float window normal bakcground color
                        normal_bg = "#1d1536",
                        --title background color
                        title_bg = "#afd700",
                        red = "#e95678",
                        magenta = "#b33076",
                        orange = "#FF8700",
                        yellow = "#f7bb3b",
                        green = "#afd700",
                        cyan = "#36d0e0",
                        blue = "#61afef",
                        purple = "#CBA6F7",
                        white = "#d1d4cf",
                        black = "#1c1c19",
                    },
                },
                symbol_in_winbar = {
                    enable = true,
                },
            })

            vim.keymap.set("n", "gpd", "<cmd>Lspsaga peek_definition<cr>", { silent = true, noremap = true })
            vim.keymap.set("n", "gpt", "<cmd>Lspsaga peek_type_definition<cr>", { silent = true, noremap = true })
            vim.keymap.set("n", "K", "<cmd>Lspsaga hover_doc<CR>", { silent = true })
            vim.keymap.set("n", "gh", "<cmd>Lspsaga finder<CR>", { silent = true })
            vim.keymap.set("n", "<leader>q", "<cmd>Lspsaga code_action<CR>", { silent = true, noremap = true })
            vim.keymap.set("n", "<space>q", "<cmd>Lspsaga code_action<CR>", { silent = true, noremap = true })
            vim.keymap.set("n", "<leader>rn", "<cmd>Lspsaga rename<cr>", { silent = true, noremap = true })

            vim.keymap.set("n", "mg", "<cmd>Lspsaga diagnostic_jump_prev<CR>", { silent = true, noremap = true })
            vim.keymap.set("n", "ng", "<cmd>Lspsaga diagnostic_jump_next<CR>", { silent = true, noremap = true })
            vim.keymap.set("n", "me", function()
                require("lspsaga.diagnostic"):goto_prev({ severity = vim.diagnostic.severity.ERROR })
            end, { silent = true, noremap = true })
            vim.keymap.set("n", "ne", function()
                require("lspsaga.diagnostic"):goto_next({ severity = vim.diagnostic.severity.ERROR })
            end, { silent = true, noremap = true })
        end,
    },
}

Expected behavior

to be static

Neovim version (nvim -v)

v0.9.4

lspsaga commit

4d85d4ad3ef6ba9ad0fffe478f834c29b5bfa57c

Terminal name/version

Terminal: tmux

glepnir commented 10 months ago

if you don't use statuscolum , you need set signcolumn=on if you are using statuscolumn keep two spaces for sign. otherwise disable lightbulb.

zsmatrix62 commented 10 months ago

Okay thanks, actually fixed if i set:

vim.opt.statuscolumn = " "
vim.wo.signcolumn = "yes"