nvimdev / lspsaga.nvim

improve neovim lsp experience
MIT License
3.47k stars 288 forks source link

[Feature] Support `mini.icon` library #1472

Open pidgeon777 opened 3 months ago

pidgeon777 commented 3 months ago

Is your feature request related to a problem? Please describe. This icons library was released recently:

https://github.com/echasnovski/mini.icons

It seems to be better than:

https://github.com/nvim-tree/nvim-web-devicons

Describe the solution you'd like It would be great if lspsaga.nvim also could support the mini.icons library.

Describe alternatives you've considered None

Additional context The mini.icons library has already been integrated into popular Neovim distributions such as LazyVim, with great results.

stevenxxiu commented 1 month ago

Here's a way to patch this for now:

config = function(_, opts)
  -- Patch to use *mini.icons*
  require('lspsaga.util').icon_from_devicon = function(ft) return require('mini.icons').get('filetype', ft) end

  require('lspsaga').setup(opts)
end,

It'll be better to make this a config option of course, like in bufferline's options.get_element_icon. bufferline supplies the arguments: directory, extension, filetype, path, type.