about summary refs log tree commit diff
diff options
context:
space:
mode:
authorBaitinq <manuelpalenzuelamerino@gmail.com>2024-03-24 19:18:17 +0100
committerBaitinq <manuelpalenzuelamerino@gmail.com>2024-03-24 19:18:17 +0100
commit9bc447d681c00a5508e99e32d99a25f930159bcc (patch)
tree1ad25128e931c0fd5b69fbb48de951b56c957423
parentDotfiles: Tmux: Actually fix nvim session restoring (diff)
downloadnixos-config-9bc447d681c00a5508e99e32d99a25f930159bcc.tar.gz
nixos-config-9bc447d681c00a5508e99e32d99a25f930159bcc.tar.bz2
nixos-config-9bc447d681c00a5508e99e32d99a25f930159bcc.zip
Dotfiles: Nvim: Add lspkind plugin
-rw-r--r--dotfiles/nvim/init.lua9
1 files changed, 9 insertions, 0 deletions
diff --git a/dotfiles/nvim/init.lua b/dotfiles/nvim/init.lua
index 21ece51..6439b0d 100644
--- a/dotfiles/nvim/init.lua
+++ b/dotfiles/nvim/init.lua
@@ -668,6 +668,7 @@ require('lazy').setup({
           -- },
         },
       },
+      'onsails/lspkind.nvim',
       'saadparwaiz1/cmp_luasnip',
 
       -- Adds other completion capabilities.
@@ -681,6 +682,7 @@ require('lazy').setup({
       -- See `:help cmp`
       local cmp = require 'cmp'
       local luasnip = require 'luasnip'
+      local lspkind = require "lspkind"
       luasnip.config.setup {}
 
       cmp.setup {
@@ -691,6 +693,13 @@ require('lazy').setup({
         },
         completion = { completeopt = 'menu,menuone,noinsert' },
 
+        formatting = {
+          format = function(entry, vim_item)
+            vim_item.kind = string.format("%s %s", lspkind.presets.default[vim_item.kind], vim_item.kind)
+            return vim_item
+          end,
+        },
+
         -- For an understanding of why these mappings were
         -- chosen, you will need to read `:help ins-completion`
         --