1
0
Fork 0
mirror of https://github.com/pnx/dotfiles synced 2026-06-17 03:30:01 +02:00

touching the nvim.

This commit is contained in:
Henrik Hautakoski 2024-04-13 14:40:38 +02:00
parent 15e6408670
commit 71717129e1
40 changed files with 1045 additions and 921 deletions

View file

@ -0,0 +1,21 @@
local M = {}
-- Create format function.
function M.format(config)
return function(entry, vim_item)
-- Devicons for files
if vim.tbl_contains({ 'path' }, entry.source.name) then
local icon, hl_group = require('nvim-web-devicons').get_icon(entry:get_completion_item().label)
if icon then
vim_item.kind = icon
vim_item.kind_hl_group = hl_group
return vim_item
end
end
return require('lspkind').cmp_format(config)(entry, vim_item)
end
end
return M