nvimdev / nvimdev/lspsaga.nvim

hover_doc has two icons

Open
#1,549 1 comment 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

bug
Dominant language
Lua
Stars
3.8k
Forks
308
PR merge metrics
No merged PRs in 30d

Description

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', '' },
},
},
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')
vim.keymap.set('n', 'rn', 'Lspsaga rename')
vim.keymap.set('n', 'ca', 'Lspsaga code_action')
vim.keymap.set('n', 'le', 'Lspsaga show_buf_diagnostics')
vim.keymap.set('n', 'gd', vim.lsp.buf.definition)
vim.keymap.set('n', 'gr', 'Lspsaga finder ref')
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

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the duplicate-icon and left-margin behavior with the provided lspsaga setup and the Lspsaga hover_doc mapping. Compare the result on Neovim 0.11.3 at lspsaga commit 8efe00d, and consider the issue resolved when hovering consistently shows one icon without the unwanted margin.

Written by the indexing model from the issue text.

Assessment

Tech stack
lua, neovim
Domain
devtools
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.