From e5f73fcd2adad6608aab69016c53a4cd9bcb57eb Mon Sep 17 00:00:00 2001 From: eunmann Date: Wed, 19 Jun 2024 13:36:18 -0400 Subject: [PATCH] Moving Copilot back to init.lua --- init.lua | 10 +++++++++- lua/custom/plugins/init.lua | 10 ---------- 2 files changed, 9 insertions(+), 11 deletions(-) diff --git a/init.lua b/init.lua index 3988062b2ad..9a78d70b1aa 100644 --- a/init.lua +++ b/init.lua @@ -190,6 +190,14 @@ vim.keymap.set('n', '', '', { desc = 'Move focus to the right win vim.keymap.set('n', '', '', { desc = 'Move focus to the lower window' }) vim.keymap.set('n', '', '', { desc = 'Move focus to the upper window' }) +vim.keymap.set('i', '', 'copilot#Accept("")', { + expr = true, + replace_keycodes = false, + noremap = true, + silent = true, +}) +vim.g.copilot_no_tab_map = true + -- [[ Basic Autocommands ]] -- See `:help lua-guide-autocommands` @@ -606,7 +614,7 @@ require('lazy').setup({ -- Disable "format_on_save lsp_fallback" for languages that don't -- have a well standardized coding style. You can add additional -- languages here or re-enable it for the disabled ones. - local disable_filetypes = { c = true, cpp = true } + local disable_filetypes = { c = true, cpp = true, html = true } return { timeout_ms = 500, lsp_fallback = not disable_filetypes[vim.bo[bufnr].filetype], diff --git a/lua/custom/plugins/init.lua b/lua/custom/plugins/init.lua index 826dd5ed4e6..9a9ba3f70c5 100644 --- a/lua/custom/plugins/init.lua +++ b/lua/custom/plugins/init.lua @@ -6,16 +6,6 @@ return { { 'github/copilot.vim', lazy = false, - config = function() - -- Keybinds for Copilot - vim.api.nvim_set_keymap('i', '', 'copilot#Accept("")', { - expr = true, - replace_keycodes = false, - noremap = true, - silent = true, - }) - vim.g.copilot_no_tab_map = true - end, }, { 'sindrets/diffview.nvim',