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 = {
|
formatting = {
|
||||||
format = function(entry, item)
|
format = function(entry, item)
|
||||||
local icons = LazyVim.config.icons.kinds
|
local icon = LazyVim.config.icons.kinds[item.kind]
|
||||||
if icons[item.kind] then
|
if LazyVim.has("mini.icons") then
|
||||||
item.kind = icons[item.kind] .. item.kind
|
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
|
end
|
||||||
|
|
||||||
local widths = {
|
local widths = {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue