413 current 2024-04-18 15:06:15 24.05.20240418.2948912 6.8.6-zen1 nvidiaProduction nvidiaStable nvidiaVulkanBeta

This commit is contained in:
zackartz 2024-04-18 15:06:16 -04:00
parent e3c936266b
commit 6822437682
No known key found for this signature in database
GPG key ID: 5B53E53A9A514DBA

View file

@ -1,3 +1,31 @@
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",
@ -101,29 +129,17 @@ return {
end, { "i", "s" }), end, { "i", "s" }),
}, },
formatting = { formatting = {
format = lspkind_status_ok and lspkind.cmp_format({ format = function(entry, item)
mode = "symbol", item.kind = lsp_symbols[item.kind]
maxwidth = 25, item.menu = ({
ellipsis_char = "...", buffer = "[Buffer]",
before = function(entry, vim_item) nvim_lsp = "[LSP]",
if vim_item.kind == "Color" and entry.completion_item.documentation then luasnip = "[Snippet]",
local _, _, r, g, b = neorg = "[Neorg]",
string.find(entry.completion_item.documentation, "^rgb%((%d+), (%d+), (%d+)") })[entry.source.name]
if r then
local color = string.format("%02x", r) return item
.. string.format("%02x", g) end,
.. 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,