lspsaga.nvim icon indicating copy to clipboard operation
lspsaga.nvim copied to clipboard

hover_doc has two icons

Open xiaoliyooo opened this issue 6 months ago • 1 comments

Describe the bug

Why do I always get 2 icons and have weird margins on the left side, I make sure lsp doesn't have any duplicates turned on, it has one icon some of the time but two most of the time!

Image

-- improves the Neovim built-in LSP experience

return function() local border = require('core.custom-style').border require('lspsaga').setup({ ui = { border = border, }, diagnostic = { keys = { quit = { 'q', '<ESC>' }, }, }, code_action = { show_server_name = true, }, finder = { max_height = 0.5, }, lightbulb = { virtual_text = false, }, })

vim.api.nvim_create_autocmd('VimEnter', { callback = function() vim.keymap.set('n', 'gh', 'Lspsaga hover_doc<CR>') vim.keymap.set('n', 'rn', 'Lspsaga rename<CR>') vim.keymap.set('n', 'ca', 'Lspsaga code_action<CR>') vim.keymap.set('n', 'le', 'Lspsaga show_buf_diagnostics<CR>') vim.keymap.set('n', 'gd', vim.lsp.buf.definition) vim.keymap.set('n', 'gr', 'Lspsaga finder ref<CR>') end, }) end

Steps to reproduce

I just simply configured it and then hover

Expected behavior

only one icon

Neovim version (nvim -v)

0.11.3

lspsaga commit

8efe00d

Terminal name/version

kitty

xiaoliyooo avatar Jul 31 '25 15:07 xiaoliyooo

It seams that lspsaga inherits the global configuration of vim.o.signcolumn and signcolumn is enabled for whatever the reason in the hover window. (For me, it's the render-markdown.nvim plugin that renders an icon beside code blocks).

You can do an experiment: make the cursor in the hover window (pressing K twice), then run :lua vim.opt_local.signcolumn = "no". And you'll find out that this issue is "fixed" temporarily.

The solution for lspsaga's maintainers could be: supporting neovim options overriding in hover windows.

At the moment, here's a work-around (if you're using render-markdown.nvim):

  {
    "MeanderingProgrammer/render-markdown.nvim",
    event = "BufReadPost",
    ft = { "markdown" },
    opts = {
      code = {
        sign = false, -- Turn off any sign column related rendering.
      },
    },
  },

whisperpine avatar Nov 01 '25 23:11 whisperpine