Skip to content

Commit

Permalink
Moving Copilot back to init.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
eunmann committed Jun 19, 2024
1 parent 25a8908 commit e5f73fc
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 11 deletions.
10 changes: 9 additions & 1 deletion init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,14 @@ vim.keymap.set('n', '<C-l>', '<C-w><C-l>', { desc = 'Move focus to the right win
vim.keymap.set('n', '<C-j>', '<C-w><C-j>', { desc = 'Move focus to the lower window' })
vim.keymap.set('n', '<C-k>', '<C-w><C-k>', { desc = 'Move focus to the upper window' })

vim.keymap.set('i', '<C-i>', 'copilot#Accept("<CR>")', {
expr = true,
replace_keycodes = false,
noremap = true,
silent = true,
})
vim.g.copilot_no_tab_map = true

-- [[ Basic Autocommands ]]
-- See `:help lua-guide-autocommands`

Expand Down Expand Up @@ -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],
Expand Down
10 changes: 0 additions & 10 deletions lua/custom/plugins/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -6,16 +6,6 @@ return {
{
'github/copilot.vim',
lazy = false,
config = function()
-- Keybinds for Copilot
vim.api.nvim_set_keymap('i', '<C-i>', 'copilot#Accept("<CR>")', {
expr = true,
replace_keycodes = false,
noremap = true,
silent = true,
})
vim.g.copilot_no_tab_map = true
end,
},
{
'sindrets/diffview.nvim',
Expand Down

0 comments on commit e5f73fc

Please sign in to comment.