From 1ab15f4b30627fd5e6dd175a23c7360c2c08b2bd Mon Sep 17 00:00:00 2001 From: yayoyuyu <112897090+yayoyuyu@users.noreply.github.com> Date: Fri, 16 Feb 2024 01:43:28 +0900 Subject: [PATCH] fix: enable source of `nvim-cmp` only norg file type (#1298) --- lua/neorg/modules/core/integrations/nvim-cmp/module.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/neorg/modules/core/integrations/nvim-cmp/module.lua b/lua/neorg/modules/core/integrations/nvim-cmp/module.lua index 899a2f9a3..f84e8295b 100644 --- a/lua/neorg/modules/core/integrations/nvim-cmp/module.lua +++ b/lua/neorg/modules/core/integrations/nvim-cmp/module.lua @@ -90,6 +90,10 @@ module.public = { return { "@", "-", "(", " ", ".", ":", "#", "*", "^" } end + function module.private.source:is_available() + return vim.bo.filetype == "norg" + end + module.private.cmp.register_source("neorg", module.private.source) end,