nvimdev / lspsaga.nvim

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

Missing Code Action Icons #1327

Closed corigne closed 11 months ago

corigne commented 11 months ago

Describe the bug

Recent nerd-fonts update appears to have caused diagnostic icons on line hover to display incorrectly.

Worked previously on the aur nerd-fonts-complete package, but appears to have broken after the nerd fonts packages were moved to the arch repo. Perhaps some of the symbol addresses changed?

I'm not sure.

This is what I'm seeing. I have verified all dependencies. image

Here's a screenshot with the min-config: image

min config:


{
  'nvimdev/lspsaga.nvim',
  config = function()
    require('lspsaga').setup({})
  end,
  dependenices = {
    'nvim-treesitter/nvim-treesitter',
    'nvim-tree/nvim-web-devicons'
  }
},
'neovim/nvim-lspconfig',
{
  'williamboman/mason.nvim',
  build = ':MasonUpdate' -- :MasonUpdate updates registry contents
},
'williamboman/mason-lspconfig.nvim',
{
  'nvimdev/lspsaga.nvim',
  config = function()
    require('lspsaga').setup({})
  end,
  dependenices = {
    'nvim-treesitter/nvim-treesitter',
    'nvim-tree/nvim-web-devicons'
  }
},
})

-- config items handled separately from lazy

local lspconfig = require('lspconfig')
local capabilities = vim.lsp.protocol.make_client_capabilities()
capabilities = require('cmp_nvim_lsp').default_capabilities(capabilities)

require('mason').setup()
require('mason-lspconfig').setup({
  automatic_installation = true,
})

require('mason-lspconfig').setup_handlers({
  function (server_name) -- automatically handles installed by Mason
    lspconfig[server_name].setup({
      capabilities = capabilities,
    })
  end,

  ['lua_ls'] = function ()
    lspconfig.lua_ls.setup {
      settings = {
        Lua = {
          diagnostics = {
            globals = {'vim', 'require'},
          },
        },
      },
    }
  end,

  ['clangd'] = function ()
    lspconfig.clangd.setup {
      cmd = {
        'clangd',
        '--background-index',
        '-j=12',
        '--clang-tidy',
        '--clang-tidy-checks=*',
        '--all-scopes-completion',
        '--cross-file-rename',
        '--completion-style=detailed',
        '--pch-storage=memory',
        '--suggest-missing-includes',
      },
      capabilities = capabilities,
    }
  end,
})

I am currently using Hack Nerd Font Mono from: local/ttf-hack-nerd 3.0.2-1 (nerd-fonts)

I disabled lsp-saga and the issue no longer appeared.

Should I be using different fonts? This is the canonical source for nerd fonts on arch now.

Steps to reproduce

  1. open the following code as min.lua with a lua lsp configured, (the code has errors which prompt a code action)
    
    -- min.lua
    test

2. move cursor to hover over line reading "test"
3. empty boxes appear where code action diagnostic icon should appear

### Expected behavior

1. open a file with code actions present
2. hover over a line corresponding to a code action
3. the light-bulb or corresponding diagnostic symbol appear

### Neovim version (nvim -v)

NVIM v0.9.4 Build type: Release LuaJIT 2.1.1696795921

### lspsaga commit

8c7e03e

### Terminal name/version

kitty 0.29.2 created by Kovid Goyal
glepnir commented 11 months ago

install nerdfont and emoji font.

corigne commented 11 months ago

install nerdfont and emoji font.

I have the entire nerd-fonts package group from the arch repository already. I ensured I had these installed before making the ticket.

The font group: https://archlinux.org/groups/x86_64/nerd-fonts/

Is there some specific font package that is supported? I would appreciate some clarity as my other nerd-font icon apps seem to be working fine.

Thank you for your help! I love your work.

glepnir commented 11 months ago

default is a emoji 💡 . install noto-fonts-emoji

corigne commented 11 months ago

That appears to have fixed it, thank you for the clarification.

Not sure why it was working then wasn't, but thank you regardless for you help.