mirror of
https://github.com/LazyVim/LazyVim.git
synced 2026-07-25 14:01:06 +00:00
feat(cmp): use mini.icons when it is added
This commit is contained in:
parent
43dbe0e60d
commit
caf1bcdfaa
1 changed files with 10 additions and 3 deletions
|
|
@ -50,9 +50,16 @@ return {
|
|||
}),
|
||||
formatting = {
|
||||
format = function(entry, item)
|
||||
local icons = LazyVim.config.icons.kinds
|
||||
if icons[item.kind] then
|
||||
item.kind = icons[item.kind] .. item.kind
|
||||
local icon = LazyVim.config.icons.kinds[item.kind]
|
||||
if LazyVim.has("mini.icons") then
|
||||
local mini_icon, _, _ = require("mini.icons").get("lsp", item.kind)
|
||||
if mini_icon then
|
||||
icon = mini_icon .. " "
|
||||
end
|
||||
end
|
||||
|
||||
if icon then
|
||||
item.kind = icon .. item.kind
|
||||
end
|
||||
|
||||
local widths = {
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue