Skip to content

Commit

Permalink
fix(cmp): fix cmp when copilot is disabled
Browse files Browse the repository at this point in the history
Fixes #143
  • Loading branch information
ecosse3 committed May 24, 2023
1 parent e061990 commit 7cbedc8
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lua/plugins/cmp.lua
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@ if not snip_status_ok then
return
end


local copilot_status_ok, copilot_cmp_comparators = pcall(require, "copilot_cmp.comparators")

require("luasnip/loaders/from_vscode").lazy_load()

-- ╭──────────────────────────────────────────────────────────╮
Expand Down Expand Up @@ -256,7 +259,7 @@ cmp.setup({
deprioritize_snippet,
cmp.config.compare.exact,
cmp.config.compare.locality,
require("copilot_cmp.comparators").prioritize,
copilot_cmp_comparators.prioritize,
cmp.config.compare.score,
cmp.config.compare.recently_used,
cmp.config.compare.offset,
Expand Down

0 comments on commit 7cbedc8

Please sign in to comment.