summaryrefslogtreecommitdiff
path: root/lua/lvim/core
diff options
context:
space:
mode:
authorChristianChiarulli <[email protected]>2022-10-07 04:25:40 -0400
committerChristianChiarulli <[email protected]>2022-10-07 04:25:40 -0400
commita9f544ca786085995a025cd84753ccbfecc971ab (patch)
treee09be9e54b520f2862c8705cf682aa7f0150b6ea /lua/lvim/core
parent9d3e1636568f5568d26817b1f8710afa27e2920f (diff)
feat: reduce noise from LSP text comes from buffer source anyway
Diffstat (limited to 'lua/lvim/core')
-rw-r--r--lua/lvim/core/cmp.lua15
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" },