nvimdev / lspsaga.nvim

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

Peek Definition: line numbers don't get restored when peek definition preview window is being opened #1326

Closed kair8m closed 11 months ago

kair8m commented 11 months ago

Describe the bug

Hello :smile:

When I previeww and jump to symbols definition using Lspsaga peek_definition I have noticed that if I do it twice and open the window the line numbers state and other status column related plugins don't get restored (e.g. https://github.com/lewis6991/gitsigns.nvim or https://github.com/luukvbaal/statuscol.nvim)

here is an example ezgif com-optimize

Steps to reproduce

config:

local saga_status, lspsaga = pcall(require, "lspsaga")
if not saga_status then
    return
end

lspsaga.setup({
    definition = {
        keys = {
            edit = "<CR>",
        },
    },
    finder = {
        max_height = 0.5,
        min_width = 30,
        force_max_height = false,
        methods = {
            "textDocument/typeDefinition",
        },
        keys = {
            edit = "<CR>",
        },
        silent = true,
    },
    request_timeout = 5000, -- for really large projects
    rename = {
        quit = "<Esc>",
    },
    outline = {
        auto_resize = true,
        keys = {
            expand_or_jump = "<CR>",
            quit = "q",
        },
    },
    lightbulb = {
        sign = false,
    },
})

the bug occurs under any LSP, just move around using Lspsaga peek_definition multiple times in a row and see what happens

Expected behavior

The state of line numbers and status column should be restored after opening a definition preview window

Neovim version (nvim -v)

v0.9.2

lspsaga commit

c66acbd

Terminal name/version

kitty 0.29.2

kair8m commented 11 months ago

@glepnir thanks a lot! :fire: