dotfiles/dot_config/nvim/lua/config/copilot.lua

38 lines
752 B
Lua
Raw Normal View History

2022-12-01 00:27:52 +01:00
require("copilot").setup({
panel = {
enabled = false,
},
suggestion = {
enabled = true,
auto_trigger = true,
debounce = 75,
keymap = {
accept = "<C-J>",
},
},
filetypes = {
yaml = false,
markdown = false,
help = false,
gitcommit = false,
gitrebase = false,
hgcommit = false,
svn = false,
cvs = false,
["."] = false,
},
copilot_node_command = "node",
server_opts_overrides = {},
})
-- local present, cmp = pcall(require, "cmp")
-- if not present or not cmp then
-- return
-- end
-- cmp.event:on("menu_opened", function()
-- vim.b.copilot_suggestion_hidden = true
-- end)
-- cmp.event:on("menu_closed", function()
-- vim.b.copilot_suggestion_hidden = false
-- end)