diff --git a/home-manager/neovim/copilot.lua b/home-manager/neovim/copilot.lua new file mode 100644 index 0000000..d9501a1 --- /dev/null +++ b/home-manager/neovim/copilot.lua @@ -0,0 +1,6 @@ +require("copilot").setup({ + suggestion = { enabled = false }, + panel = { enabled = false }, +}) + +require('copilot_cmp').setup({}) diff --git a/home-manager/neovim/default.nix b/home-manager/neovim/default.nix index fdba23b..04bcc32 100644 --- a/home-manager/neovim/default.nix +++ b/home-manager/neovim/default.nix @@ -148,6 +148,10 @@ in # debugging nvim-dap nvim-dap-ui + + # copilot + copilot-lua + copilot-cmp ]; extraConfig = '' @@ -185,6 +189,8 @@ in vim.g.gitblame_date_format = "%r" + ${builtins.readFile ./copilot.lua } + EOF ''; }; diff --git a/home-manager/neovim/nvim-cmp.lua b/home-manager/neovim/nvim-cmp.lua index 7b0f78b..7392fe7 100644 --- a/home-manager/neovim/nvim-cmp.lua +++ b/home-manager/neovim/nvim-cmp.lua @@ -15,6 +15,7 @@ cmp.setup({ end }, sources = cmp.config.sources({ + { name = "copilot" }, { name = "nvim_lsp" }, { name = "nvim_lsp_signature_help" }, { name = "luasnip" }, @@ -59,6 +60,7 @@ cmp.setup({ fields = { "menu", "abbr", "kind" }, format = function(entry, item) local menu_icon = { + copilot = "", nvim_lsp = "λ", luasnip = "⋗", buffer = "Ω",