ide-like pictograms for neovim lsp completion items, make your lsp icons much more attractive.
- nerd fonts
- neovim 0.10 +
Note
This plugin would not be possible without nerd fonts, mini.icons and lspkind, their links are in the acknowledgements section.
[TODO] Adding nvim-tree support
{
"BrunoCiccarino/neokinds",
config = function ()
local neokinds = require("neokinds"),
neokinds.setup({
...
}),
end
}
local neokinds = require("neokinds")
neokinds.setup({
icons = {
error = "ο",
warn = "ο±",
hint = "οͺ",
info = "ο",
},
completion_kinds = {
Text = "ο ",
Method = "σ°§",
Function = "σ°",
Constructor = "ο£ ",
Field = "ξ",
Variable = "ξ ",
Class = "σ° ± ",
Interface = "ξ‘ ",
Module = "ο ",
Property = "σ°’ ",
Unit = "ο΅ ",
Value = "ο’ ",
Enum = "ο©",
Keyword = "σ°",
Snippet = "ο",
Color = "ο£ ",
File = "ξ ",
Reference = "ο ",
Folder = "ξͺ ",
EnumMember = "ο
",
Constant = "ξ ",
Struct = "ξͺ",
Event = "ο§ ",
Operator = "ο ",
TypeParameter = "ο ",
Boolean = "ξͺ ",
Array = "ξͺ ",
},
})
blink-cmp config
local neokinds = require("neokinds")
require('blink-cmp').setup({
completion = {
list = { selection = function(ctx) return ctx.mode == "cmdline" and "auto_insert" or "preselect" end },
menu = {
border = "rounded",
winhighlight = "Normal:NormalFloat,FloatBorder:FloatBorder,CursorLine:PmenuSel,Search:None",
draw = {
components = {
kind_icon = {
text = function(ctx)
local icon = neokinds.config.completion_kinds[ctx.kind] or ""
return icon .. " " .. (ctx.kind or "")
end,
highlight = function(ctx)
return "CmpItemKind" .. (ctx.kind or "Default")
end,
},
},
},
},
},
}
cmp config
local neokinds = require('neokinds')
formatting = {
format = function(entry, vim_item)
vim_item.menu = ({
nvim_lsp = "[LSP]",
luasnip = "[Snippet]",
buffer = "[Buffer]",
nvim_lua = "[API]",
path = "[Path]",
calc = "[Calc]",
emoji = "[Emoji]",
})[entry.source.name] or ""
vim_item.kind = string.format("%s %s", M.config.completion_kinds[vim_item.kind] or "", vim_item.kind)
return vim_item
end,
},
Tip
For file icons, we have few variants so far, but over time we will add more and more. So if you want a wide variety of file icons, go to mini.icons as the situation there is excellent.
require("neo-tree").setup({
close_if_last_window = false,
popup_border_style = "rounded",
enable_git_status = true,
enable_diagnostics = true,
default_component_configs = {
icon = {
folder_closed = neokinds.config.icons.folders.closed,
folder_open = neokinds.config.icons.folders.open,
folder_empty = neokinds.config.icons.folders.empty,
default = neokinds.config.icons.files.default,
},
},
filesystem = {
filtered_items = {
visible = true,
},
components = {
icon = function(config, node, state)
return neokinds.icon(config, node, state)
end,
},
})
- nvim-cmp: full support
- blink-cmp full support
- neo-tree full support