Done
parent
d350db2449
commit
7851cfe3a0
@ -0,0 +1 @@
|
|||||||
|
Subproject commit d350db2449da40df003c40d440f909d74e2d4e70
|
@ -0,0 +1,32 @@
|
|||||||
|
-- GitHub Copilot configuration
|
||||||
|
-- https://github.com/github/copilot.vim
|
||||||
|
|
||||||
|
return {
|
||||||
|
"github/copilot.vim",
|
||||||
|
event = "InsertEnter",
|
||||||
|
config = function()
|
||||||
|
-- Disable default mappings
|
||||||
|
vim.g.copilot_no_maps = true
|
||||||
|
|
||||||
|
-- Key mappings
|
||||||
|
vim.keymap.set('i', '<C-j>', 'copilot#Accept("<CR>")', {
|
||||||
|
expr = true,
|
||||||
|
replace_keycodes = false,
|
||||||
|
silent = true,
|
||||||
|
})
|
||||||
|
|
||||||
|
-- Additional keymaps for Copilot
|
||||||
|
vim.keymap.set('i', '<C-l>', '<Plug>(copilot-accept-word)', { silent = true })
|
||||||
|
vim.keymap.set('i', '<C-]>', '<Plug>(copilot-next)', { silent = true })
|
||||||
|
-- Changed from <C-[> to <M-[> (Alt+[) to avoid conflicting with Escape
|
||||||
|
vim.keymap.set('i', '<M-[>', '<Plug>(copilot-previous)', { silent = true })
|
||||||
|
vim.keymap.set('i', '<C-\\>', '<Plug>(copilot-dismiss)', { silent = true })
|
||||||
|
|
||||||
|
-- Additional settings
|
||||||
|
vim.g.copilot_filetypes = {
|
||||||
|
["*"] = true,
|
||||||
|
["markdown"] = true,
|
||||||
|
["help"] = false,
|
||||||
|
}
|
||||||
|
end,
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
-- Tab management keymaps
|
||||||
|
-- These provide VS Code-like tab navigation and management
|
||||||
|
|
||||||
|
-- Create a new empty tab
|
||||||
|
vim.keymap.set('n', '<leader>tn', ':tabnew<CR>', { desc = 'New tab' })
|
||||||
|
|
||||||
|
-- Create a new tab and open Telescope file finder
|
||||||
|
vim.keymap.set('n', '<leader>to', ':tabnew<CR>:Telescope find_files<CR>', { desc = 'New tab with file' })
|
||||||
|
|
||||||
|
-- Close the current tab
|
||||||
|
vim.keymap.set('n', '<leader>tc', ':tabclose<CR>', { desc = 'Close tab' })
|
||||||
|
|
||||||
|
-- Navigate to next tab (similar to VS Code)
|
||||||
|
vim.keymap.set('n', '<C-PgDn>', 'gt', { desc = 'Next tab' })
|
||||||
|
|
||||||
|
-- Navigate to previous tab (similar to VS Code)
|
||||||
|
vim.keymap.set('n', '<C-PgUp>', 'gT', { desc = 'Previous tab' })
|
||||||
|
|
||||||
|
-- Add this keymap group to Which-key if you're using it
|
||||||
|
-- (the plugin will automatically pick this up on next restart)
|
||||||
|
return {}
|
@ -0,0 +1,58 @@
|
|||||||
|
-- toggleterm.lua
|
||||||
|
-- A plugin that helps manage multiple terminal windows in Neovim
|
||||||
|
-- Github: https://github.com/akinsho/toggleterm.nvim
|
||||||
|
|
||||||
|
return {
|
||||||
|
-- The repository on GitHub
|
||||||
|
'akinsho/toggleterm.nvim',
|
||||||
|
|
||||||
|
-- Use the latest stable version
|
||||||
|
version = "*",
|
||||||
|
|
||||||
|
-- Configuration options for the plugin
|
||||||
|
opts = {
|
||||||
|
-- Ctrl+\ will toggle the terminal visibility
|
||||||
|
open_mapping = [[<c-\>]],
|
||||||
|
|
||||||
|
-- Terminal appears as a floating window by default
|
||||||
|
direction = 'float',
|
||||||
|
|
||||||
|
-- How the floating window should look
|
||||||
|
float_opts = {
|
||||||
|
-- Curved borders for a nicer appearance
|
||||||
|
border = 'curved',
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Slightly dim the terminal background
|
||||||
|
shade_terminals = true,
|
||||||
|
|
||||||
|
-- How much to dim the terminal (0-100)
|
||||||
|
shading_factor = 2,
|
||||||
|
|
||||||
|
-- Function to determine size based on terminal direction
|
||||||
|
size = function(term)
|
||||||
|
if term.direction == "horizontal" then
|
||||||
|
-- 15 lines height for horizontal terminals
|
||||||
|
return 15
|
||||||
|
elseif term.direction == "vertical" then
|
||||||
|
-- 40% of window width for vertical terminals
|
||||||
|
return vim.o.columns * 0.4
|
||||||
|
end
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
|
||||||
|
-- Extra key mappings for different terminal layouts
|
||||||
|
keys = {
|
||||||
|
-- Leader+th opens a horizontal terminal at the bottom
|
||||||
|
{ "<leader>th", "<cmd>ToggleTerm direction=horizontal<cr>", desc = "Terminal Horizontal" },
|
||||||
|
|
||||||
|
-- Leader+tv opens a vertical terminal at the side
|
||||||
|
{ "<leader>tv", "<cmd>ToggleTerm direction=vertical<cr>", desc = "Terminal Vertical" },
|
||||||
|
|
||||||
|
-- Leader+tf opens a floating terminal (alternative to Ctrl+\)
|
||||||
|
{ "<leader>tf", "<cmd>ToggleTerm direction=float<cr>", desc = "Terminal Float" },
|
||||||
|
|
||||||
|
-- Leader+tt opens a new terminal tab
|
||||||
|
{ "<leader>tt", "<cmd>ToggleTerm direction=tab<cr>", desc = "Terminal Tab" },
|
||||||
|
},
|
||||||
|
}
|
Loading…
Reference in New Issue