414 current 2024-04-18 15:22:07 24.05.20240418.2948912 6.8.6-zen1 nvidiaProduction nvidiaStable nvidiaVulkanBeta

This commit is contained in:
zackartz 2024-04-18 15:22:08 -04:00
parent 6822437682
commit 6963902a2b
No known key found for this signature in database
GPG key ID: 5B53E53A9A514DBA

View file

@ -1,31 +1,3 @@
local lsp_symbols = {
Text = "  (Text) ",
Method = "  (Method)",
Function = "  (Function)",
Constructor = "  (Constructor)",
Field = " ﴲ (Field)",
Variable = "[] (Variable)",
Class = "  (Class)",
Interface = " ﰮ (Interface)",
Module = "  (Module)",
Property = " 襁 (Property)",
Unit = "  (Unit)",
Value = "  (Value)",
Enum = " 練 (Enum)",
Keyword = "  (Keyword)",
Snippet = "  (Snippet)",
Color = "  (Color)",
File = "  (File)",
Reference = "  (Reference)",
Folder = "  (Folder)",
EnumMember = "  (EnumMember)",
Constant = " ﲀ (Constant)",
Struct = " ﳤ (Struct)",
Event = "  (Event)",
Operator = "  (Operator)",
TypeParameter = "  (TypeParameter)",
}
return { return {
{ {
"L3MON4D3/LuaSnip", "L3MON4D3/LuaSnip",
@ -129,17 +101,29 @@ return {
end, { "i", "s" }), end, { "i", "s" }),
}, },
formatting = { formatting = {
format = function(entry, item) format = lspkind_status_ok and lspkind.cmp_format({
item.kind = lsp_symbols[item.kind] mode = "symbol",
item.menu = ({ maxwidth = 25,
buffer = "[Buffer]", ellipsis_char = "...",
nvim_lsp = "[LSP]", before = function(entry, vim_item)
luasnip = "[Snippet]", if vim_item.kind == "Color" and entry.completion_item.documentation then
neorg = "[Neorg]", local _, _, r, g, b =
})[entry.source.name] string.find(entry.completion_item.documentation, "^rgb%((%d+), (%d+), (%d+)")
if r then
return item local color = string.format("%02x", r)
end, .. string.format("%02x", g)
.. string.format("%02x", b)
local group = "Tw_" .. color
if vim.fn.hlID(group) < 1 then
vim.api.nvim_set_hl(0, group, { fg = "#" .. color })
end
vim_item.kind_hl_group = group
return vim_item
end
end
return vim_item
end,
}),
}, },
} }
end, end,