Browse Source

feat: replace copilot with lua version so tab disable works

master
Tovi 9 months ago
parent
commit
ab34d4d7f3
6 changed files with 85 additions and 24 deletions
  1. +6
    -0
      .config/nvim/lua/tovi/plugins/cellular-automaton.lua
  2. +60
    -18
      .config/nvim/lua/tovi/plugins/copilot.lua
  3. +5
    -0
      .config/nvim/lua/tovi/plugins/duck.lua
  4. +8
    -6
      .config/nvim/lua/tovi/plugins/fugitive.lua
  5. +5
    -0
      .config/nvim/lua/tovi/plugins/indent-blankline.lua
  6. +1
    -0
      .config/nvim/lua/tovi/plugins/lazygit.lua

+ 6
- 0
.config/nvim/lua/tovi/plugins/cellular-automaton.lua View File

@ -0,0 +1,6 @@
return {
'eandrju/cellular-automaton.nvim',
config = function()
vim.keymap.set("n", "<leader>fml", "<cmd>CellularAutomaton make_it_rain<CR>")
end
}

+ 60
- 18
.config/nvim/lua/tovi/plugins/copilot.lua View File

@ -1,20 +1,62 @@
return {
"github/copilot.vim",
config = function()
vim.api.nvim_set_keymap(
"i",
",,",
'copilot#Accept("<CR>")',
{ expr = true, silent = true }
)
vim.api.nvim_set_keymap(
"n",
"<leader>cs",
"<cmd>Copilot panel<CR>",
{ noremap = true }
)
-- return {
-- "github/copilot.vim",
-- config = function()
-- vim.g.copilot_no_tab_map = true
--
-- vim.api.nvim_set_keymap(
-- "i",
-- ",,",
-- 'copilot#Accept("<CR>")',
-- { expr = true, silent = true }
-- )
--
-- vim.api.nvim_set_keymap(
-- "n",
-- "<leader>cs",
-- "<cmd>Copilot panel<CR>",
-- { noremap = true }
-- )
-- end,
-- }
vim.g.copilot_no_tab_map = true
end,
return {
'zbirenbaum/copilot.lua',
cmd = "Copilot",
event = "InsertEnter",
config = function()
require("copilot").setup({
panel = {
enabled = true,
auto_refresh = false,
keymap = {
jump_prev = "[[",
jump_next = "]]",
accept = "<CR>",
refresh = "gr",
open = "<M-CR>"
},
layout = {
position = "bottom", -- | top | left | right
ratio = 0.4
},
},
suggestion = {
enabled = true,
auto_trigger = true,
debounce = 75,
keymap = {
accept = ",,",
accept_word = false,
accept_line = false,
next = "<C-n>",
prev = "<C-p>",
dismiss = "<C-]>",
},
},
filetypes = {
},
copilot_node_command = 'node', -- Node.js version must be > 18.x
server_opts_overrides = {},
})
end,
} }

+ 5
- 0
.config/nvim/lua/tovi/plugins/duck.lua View File

@ -0,0 +1,5 @@
return {
'tamton-aquib/duck.nvim',
config = function()
end
}

+ 8
- 6
.config/nvim/lua/tovi/plugins/fugitive.lua View File

@ -26,12 +26,14 @@ return {
vim.cmd(string.format('Git show %s', gitBlame({vim.fn.line('.'), vim.fn.line('.')}))) vim.cmd(string.format('Git show %s', gitBlame({vim.fn.line('.'), vim.fn.line('.')})))
end) end)
local options = { noremap = true, silent = true }
-- vim.keymap.set('n', '<leader>gp', '<cmd>Git push<CR>', options)
-- vim.keymap.set('n', '<leader>gP', '<cmd>Git pull<CR>', options)
-- vim.keymap.set('n', '<leader>ga', '<cmd>Git add .<CR>', options)
-- vim.keymap.set('n', '<leader>gA', '<cmd>Git add<CR>', options)
-- vim.keymap.set('n', '<leader>gc', '<cmd>Git commit<CR>', options)
-- vim.keymap.set('n', '<leader>gC', '<cmd>Git commit -a<CR>', options)
vim.keymap.set('n', '<leader>gg', '<cmd>Git<CR>', options)
vim.keymap.set('n', '<leader>gp', '<cmd>Git push<CR>', options)
vim.keymap.set('n', '<leader>gP', '<cmd>Git pull<CR>', options)
vim.keymap.set('n', '<leader>ga', '<cmd>Git add .<CR>', options)
vim.keymap.set('n', '<leader>gA', '<cmd>Git add<CR>', options)
vim.keymap.set('n', '<leader>gc', '<cmd>Git commit<CR>', options)
vim.keymap.set('n', '<leader>gC', '<cmd>Git commit -a<CR>', options)
end, end,
} }

+ 5
- 0
.config/nvim/lua/tovi/plugins/indent-blankline.lua View File

@ -0,0 +1,5 @@
return {
"lukas-reineke/indent-blankline.nvim",
main = "ibl",
opts = {}
}

+ 1
- 0
.config/nvim/lua/tovi/plugins/lazygit.lua View File

@ -1,5 +1,6 @@
return { return {
"kdheepak/lazygit.nvim", "kdheepak/lazygit.nvim",
enabled = false,
-- optional for floating window border decoration -- optional for floating window border decoration
dependencies = { dependencies = {
"nvim-lua/plenary.nvim", "nvim-lua/plenary.nvim",


Loading…
Cancel
Save