diff options
author | ChristianChiarulli <[email protected]> | 2022-10-07 04:25:40 -0400 |
---|---|---|
committer | ChristianChiarulli <[email protected]> | 2022-10-07 04:25:40 -0400 |
commit | a9f544ca786085995a025cd84753ccbfecc971ab (patch) | |
tree | e09be9e54b520f2862c8705cf682aa7f0150b6ea /lua/lvim/core/cmp.lua | |
parent | 9d3e1636568f5568d26817b1f8710afa27e2920f (diff) |
feat: reduce noise from LSP text comes from buffer source anyway
Diffstat (limited to 'lua/lvim/core/cmp.lua')
-rw-r--r-- | lua/lvim/core/cmp.lua | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/lua/lvim/core/cmp.lua b/lua/lvim/core/cmp.lua index 1b56fed6..5163b877 100644 --- a/lua/lvim/core/cmp.lua +++ b/lua/lvim/core/cmp.lua @@ -247,7 +247,20 @@ M.config = function() }, }, }, - { name = "nvim_lsp" }, + { + name = "nvim_lsp", + entry_filter = function(entry, ctx) + local kind = require("cmp.types").lsp.CompletionItemKind[entry:get_kind()] + if kind == "Snippet" and ctx.prev_context.filetype == "java" then + return false + end + if kind == "Text" then + return false + end + return true + end, + }, + { name = "path" }, { name = "luasnip" }, { name = "cmp_tabnine" }, |