Skip to content

Commit

Permalink
fix: enable source of nvim-cmp only norg file type (#1298)
Browse files Browse the repository at this point in the history
  • Loading branch information
yayoyuyu authored Feb 15, 2024
1 parent bd12dac commit 1ab15f4
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions lua/neorg/modules/core/integrations/nvim-cmp/module.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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,

Expand Down

0 comments on commit 1ab15f4

Please sign in to comment.