diff --git a/pkgs/neovim-with-config/lua/plugins/completion.lua b/pkgs/neovim-with-config/lua/plugins/completion.lua index 32f52bfe..7e7b73fe 100644 --- a/pkgs/neovim-with-config/lua/plugins/completion.lua +++ b/pkgs/neovim-with-config/lua/plugins/completion.lua @@ -18,6 +18,17 @@ return { }, }, signature = { enabled = true }, + sources = { + default = { "lsp", "path", "snippets", "buffer", "copilot" }, + providers = { + copilot = { + name = "copilot", + module = "blink-cmp-copilot", + score_offset = 100, + async = true, + }, + }, + }, }) end, }, @@ -32,4 +43,8 @@ return { }) end, }, + { + "blink-cmp-copilot", + event = "InsertEnter", + }, } diff --git a/pkgs/neovim-with-config/plugins.nix b/pkgs/neovim-with-config/plugins.nix index 9e7a7e38..fb9a3386 100644 --- a/pkgs/neovim-with-config/plugins.nix +++ b/pkgs/neovim-with-config/plugins.nix @@ -12,6 +12,7 @@ pluginsWithLazy true [ ChatGPT-nvim FixCursorHold-nvim blink-cmp + blink-cmp-copilot bufferline-nvim comment-nvim copilot-lua @@ -60,7 +61,4 @@ pluginsWithLazy true [ ++ (pluginsWithLazy false [ lz-n nvim-web-devicons - # don't make nvim-cmp related packages lazy loading - # https://github.com/nvim-neorocks/lz.n/wiki/lazy%E2%80%90loading-nvim%E2%80%90cmp-and-its-extensions - copilot-cmp ])