copilot fix

This commit is contained in:
Zacharias-Brohn
2025-01-14 22:15:15 +01:00
parent 6f5292d290
commit cbbee45c48
5 changed files with 39 additions and 62 deletions
+20 -20
View File
@@ -20,7 +20,7 @@
hide_during_completion = true,
debounce = 75,
keymap = {
accept = "<M-l>",
accept = "<A-tab>",
accept_word = false,
accept_line = false,
next = "<M-]>",
@@ -29,25 +29,25 @@
},
},
filetypes = {
yaml = false,
markdown = false,
help = false,
gitcommit = false,
gitrebase = false,
hgcommit = false,
svn = false,
cvs = false,
python = false,
html = false,
css = false,
sh = false,
tex = false,
typescript = false,
java = false,
swift = false,
cpp = false,
hypr = false,
["."] = false,
-- yaml = false,
-- markdown = false,
-- help = false,
-- gitcommit = false,
-- gitrebase = false,
-- hgcommit = false,
-- svn = false,
-- cvs = false,
-- python = false,
-- html = false,
-- css = false,
-- sh = false,
-- tex = false,
-- typescript = false,
-- java = false,
-- swift = false,
-- cpp = false,
-- hypr = false,
-- ["."] = false,
},
copilot_node_command = 'node', -- Node.js version must be > 18.x
server_opts_overrides = {},
+6 -30
View File
@@ -1,29 +1,3 @@
-- local function resize_left()
-- local cur_win = vim.api.nvim_get_current_win()
-- vim.cmd('wincmd h')
-- local new_win = vim.api.nvim_get_current_win()
-- if cur_win == new_win then
-- vim.cmd('vertical resize -10')
-- elseif vim.bo[new_win].filetype == 'NvimTree' then
--
-- else
-- vim.cmd('vertical resize -10')
-- vim.cmd('wincmd l')
-- end
-- end
--
-- local function resize_right()
-- local cur_win = vim.api.nvim_get_current_win()
-- vim.cmd('wincmd l')
-- local new_win = vim.api.nvim_get_current_win()
-- if cur_win == new_win then
-- vim.cmd('vertical resize -10')
-- else
-- vim.cmd('vertical resize -10')
-- vim.cmd('wincmd h')
-- end
-- end
require "nvchad.mappings"
-- add yours here
@@ -31,7 +5,6 @@ require "nvchad.mappings"
local map = vim.keymap.set
map("n", ";", ":", { desc = "CMD enter command mode" })
map("i", "jk", "<ESC>")
-- Alt + Arrow Key to change buffer
map("n", "<A-Left>", "<C-w>h", { desc = "Move to left split" })
@@ -39,10 +12,13 @@ map("n", "<A-Down>", "<C-w>j", { desc = "Move to bottom split" })
map("n", "<A-Up>", "<C-w>k", { desc = "Move to top split" })
map("n", "<A-Right>", "<C-w>l", { desc = "Move to right split" })
-- Copilot suggestion
-- map("i", "jk", vim.cmd("Copilot suggestion accept_word"), { expr = true })
-- Copilot Chat buffer
map("n", "<A-tab>", vim.cmd.CopilotChatToggle)
map("i", "<A-tab>", vim.cmd.CopilotChatToggle)
map("v", "<A-tab>", vim.cmd.CopilotChatToggle)
map("n", "<A-c>", vim.cmd.CopilotChatToggle)
map("i", "<A-c>", vim.cmd.CopilotChatToggle)
map("v", "<A-c>", vim.cmd.CopilotChatToggle)
map('n', '<leader>u', vim.cmd.UndotreeToggle)
+1
View File
@@ -59,6 +59,7 @@ return {
{
"zbirenbaum/copilot.lua",
lazy = true,
cmd = "Copilot",
event = "InsertEnter",
config = function()