From a9f544ca786085995a025cd84753ccbfecc971ab Mon Sep 17 00:00:00 2001 From: ChristianChiarulli Date: Fri, 7 Oct 2022 04:25:40 -0400 Subject: feat: reduce noise from LSP text comes from buffer source anyway --- lua/lvim/core/cmp.lua | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) (limited to 'lua') 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" }, -- cgit v1.2.3