Skip to content

Commit 5dbdbda

Browse files
committed
feat: made copilot working turns it was a <TAB> error
1 parent 05d7fad commit 5dbdbda

File tree

5 files changed

+10
-20
lines changed

5 files changed

+10
-20
lines changed

‎init.lua‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ vim.opt.rtp:prepend(lazypath)
1919
vim.g.mapleader = ' '
2020
vim.g.maplocalleader = ' '
2121

22+
vim.g.copilot_no_tab_map = true
23+
2224
-- load plugins using lazy.nvim
2325
require('lazy').setup('plugins')
2426

@@ -166,7 +168,7 @@ mason_lspconfig.setup_handlers {
166168
}
167169

168170
-- Turn on lsp status information
169-
require('fidget').setup()
171+
require('fidget').setup {}
170172

171173
-- nvim-cmp setup
172174
local cmp = require 'cmp'

‎lua/keymaps.lua‎

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -48,9 +48,9 @@ keymap.set('n', 'te', ':tabedit<Return>', { silent = true })
4848
-- Choose which file to open first
4949
-- keymap.set('n', 'te', ':tabedit')
5050

51-
-- Travel between tabs
52-
keymap.set('n', '<Tab>', ':tabnext<Return>')
53-
keymap.set('n', '<S-Tab>', ':tabprev<Return>')
51+
-- Travel between tab
52+
keymap.set('n', 'tn', ':tabnext<Return>')
53+
keymap.set('n', 'tp', ':tabprev<Return>')
5454

5555
-- Split window
5656
keymap.set('n', '<leader>ss', ':split<Return><C-w>w', { silent = true })
@@ -81,3 +81,5 @@ keymap.set('n', 'j', "v:count == 2 ? 'gj' : 'j'", { expr = true, silent = true }
8181

8282
-- Move one line
8383
keymap.set('n', '<C-j>', ':m .+1<CR>')
84+
85+
keymap.set("i", "<C-J>", 'copilot#Accept("<CR>")', { silent = true, expr = true })

‎lua/plugins/VimBeGood.lua‎

Lines changed: 0 additions & 3 deletions
This file was deleted.

‎lua/plugins/github-copilot.lua‎

Lines changed: 1 addition & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,3 @@
11
return {
2-
'github/copilot.vim',
3-
init = function()
4-
vim.g.copilot_no_tab_map = true
5-
end,
6-
config = function()
7-
vim.keymap.set('i', '<C-e>', [[copilot#Accept("\<CR>")]], {
8-
silent = true,
9-
expr = true,
10-
script = true,
11-
replace_keycodes = false,
12-
})
13-
end,
2+
'github/copilot.vim'
143
}

‎lua/plugins/treesitter.lua‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ return { -- Highlight, edit, and navigate code
1111
-- See `:help nvim-treesitter`
1212
require('nvim-treesitter.configs').setup {
1313
-- Add languages to be installed here that you want installed for treesitter
14-
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'typescript' , 'vim' },
14+
ensure_installed = { 'c', 'cpp', 'go', 'lua', 'python', 'rust', 'typescript', 'vim' },
1515

1616
highlight = { enable = true },
1717
indent = { enable = true, disable = { 'python' } },

0 commit comments

Comments
 (0)