diff options
author | Baitinq <manuelpalenzuelamerino@gmail.com> | 2024-03-24 19:18:17 +0100 |
---|---|---|
committer | Baitinq <manuelpalenzuelamerino@gmail.com> | 2024-03-24 19:18:17 +0100 |
commit | 9bc447d681c00a5508e99e32d99a25f930159bcc (patch) | |
tree | 1ad25128e931c0fd5b69fbb48de951b56c957423 /dotfiles | |
parent | Dotfiles: Tmux: Actually fix nvim session restoring (diff) | |
download | nixos-config-9bc447d681c00a5508e99e32d99a25f930159bcc.tar.gz nixos-config-9bc447d681c00a5508e99e32d99a25f930159bcc.tar.bz2 nixos-config-9bc447d681c00a5508e99e32d99a25f930159bcc.zip |
Dotfiles: Nvim: Add lspkind plugin
Diffstat (limited to 'dotfiles')
-rw-r--r-- | dotfiles/nvim/init.lua | 9 |
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` -- |