aboutsummaryrefslogtreecommitdiff
path: root/.config/nvim/lua/lsp.lua
diff options
context:
space:
mode:
authorLuca Matei Pintilie <lucafulger@gmail.com>2023-02-01 20:12:01 +0000
committerLuca Matei Pintilie <lucafulger@gmail.com>2023-02-01 20:12:01 +0000
commit22e0dd0f9907738e6391f5ff26ba7c07cbe1bb9d (patch)
treea1ab5df83f794535c224bc85b50a04a91411450f /.config/nvim/lua/lsp.lua
parentff0f307766b0b61c4cb0a0caaa3bf36e691b3570 (diff)
downloaddotfiles-22e0dd0f9907738e6391f5ff26ba7c07cbe1bb9d.tar
dotfiles-22e0dd0f9907738e6391f5ff26ba7c07cbe1bb9d.tar.gz
dotfiles-22e0dd0f9907738e6391f5ff26ba7c07cbe1bb9d.tar.bz2
dotfiles-22e0dd0f9907738e6391f5ff26ba7c07cbe1bb9d.tar.lz
dotfiles-22e0dd0f9907738e6391f5ff26ba7c07cbe1bb9d.tar.xz
dotfiles-22e0dd0f9907738e6391f5ff26ba7c07cbe1bb9d.tar.zst
dotfiles-22e0dd0f9907738e6391f5ff26ba7c07cbe1bb9d.zip
Fix annoying text suggestions in neovim and a tad better tmux config
Diffstat (limited to '.config/nvim/lua/lsp.lua')
-rw-r--r--.config/nvim/lua/lsp.lua24
1 files changed, 21 insertions, 3 deletions
diff --git a/.config/nvim/lua/lsp.lua b/.config/nvim/lua/lsp.lua
index de52d28..f404e3d 100644
--- a/.config/nvim/lua/lsp.lua
+++ b/.config/nvim/lua/lsp.lua
@@ -20,9 +20,27 @@ cmp.setup({
["<CR>"] = cmp.mapping.confirm({ select = true }); -- Accept currently selected item. Set `select` to `false` to only confirm explicitly selected items.
});
sources = cmp.config.sources({
- { name = "nvim_lsp" };
- { name = "vsnip" }; -- For vsnip users.
- }, { { name = "buffer" } });
+ {
+ name = "nvim_lsp";
+ entry_filter = function(entry, ctx)
+ return require('cmp.types').lsp.CompletionItemKind[entry:get_kind()] ~= 'Text'
+ end;
+ };
+ {
+ name = "vsnip";
+ entry_filter = function(entry, ctx)
+ return require('cmp.types').lsp.CompletionItemKind[entry:get_kind()] ~= 'Text'
+ end;
+ };
+ },
+ {
+ {
+ name = "buffer";
+ entry_filter = function(entry, ctx)
+ return require('cmp.types').lsp.CompletionItemKind[entry:get_kind()] ~= 'Text'
+ end;
+ }
+ });
})
-- Set configuration for specific filetype.