Update config: remove duplicate mini.pairs, add Claude Code, UI tweaks
- Remove duplicate mini.pairs setup in plugin/30_mini.lua - Add Claude Code integration with AI keybindings - Enable transparent background in catppuccin theme - Change winborder from single to rounded - Remove unused clipboard and window menu settings
This commit is contained in:
@@ -25,8 +25,6 @@ vim.o.undofile = true -- Enable persistent undo
|
||||
|
||||
vim.o.shada = "'100,<50,s10,:1000,/100,@100,h" -- Limit ShaDa file (for startup)
|
||||
|
||||
vim.opt.clipboard = 'unnamedplus'
|
||||
|
||||
-- Enable all filetype plugins and syntax (if not enabled, for better startup)
|
||||
vim.cmd('filetype plugin indent on')
|
||||
if vim.fn.exists('syntax_on') ~= 1 then vim.cmd('syntax enable') end
|
||||
@@ -47,7 +45,7 @@ vim.o.signcolumn = 'yes' -- Always show signcolumn (less flicker)
|
||||
vim.o.splitbelow = true -- Horizontal splits will be below
|
||||
vim.o.splitkeep = 'screen' -- Reduce scroll during window split
|
||||
vim.o.splitright = true -- Vertical splits will be to the right
|
||||
vim.o.winborder = 'single' -- Use border in floating windows
|
||||
vim.o.winborder = 'rounded' -- Use border in floating windows
|
||||
vim.o.wrap = false -- Don't visually wrap lines (toggle with \w)
|
||||
|
||||
vim.o.cursorlineopt = 'screenline,number' -- Show cursor line per screen line
|
||||
|
||||
@@ -38,6 +38,7 @@ nmap(']p', '<Cmd>exe "put " . v:register<CR>', 'Paste Below')
|
||||
-- This is used to provide 'mini.clue' with extra clues.
|
||||
-- Add an entry if you create a new group.
|
||||
_G.Config.leader_group_clues = {
|
||||
{ mode = 'n', keys = '<Leader>a', desc = '+AI' },
|
||||
{ mode = 'n', keys = '<Leader>b', desc = '+Buffer' },
|
||||
{ mode = 'n', keys = '<Leader>e', desc = '+Explore/Edit' },
|
||||
{ mode = 'n', keys = '<Leader>f', desc = '+Find' },
|
||||
@@ -48,14 +49,11 @@ _G.Config.leader_group_clues = {
|
||||
{ mode = 'n', keys = '<Leader>s', desc = '+Session' },
|
||||
{ mode = 'n', keys = '<Leader>t', desc = '+Terminal' },
|
||||
{ mode = 'x', keys = '<Leader>g', desc = '+Git' },
|
||||
{ mode = 'x', keys = '<Leader>l', desc = '+Language' },
|
||||
}
|
||||
|
||||
-- Window menu
|
||||
-- See: https://github.com/nvim-mini/mini.nvim/discussions/2028#discussioncomment-14593098
|
||||
vim.keymap.set('n', '<leader>w', function()
|
||||
vim.api.nvim_input '<C-w>'
|
||||
end, { desc = '+Window' })
|
||||
-- Comodities
|
||||
vim.keymap.set({'n', 'x'}, '<Leader>y', '"y', { desc = "Yank" })
|
||||
vim.keymap.set({'n', 'x'}, '<Leader>d', '"d', { desc = "Cut" })
|
||||
|
||||
-- Helpers for a more concise `<Leader>` mappings.
|
||||
-- Most of the mappings use `<Cmd>...<CR>` string as a right hand side (RHS) in
|
||||
@@ -69,6 +67,11 @@ local xmap_leader = function(suffix, rhs, desc)
|
||||
vim.keymap.set('x', '<Leader>' .. suffix, rhs, { desc = desc })
|
||||
end
|
||||
|
||||
-- a is for 'AI'
|
||||
nmap_leader('ac', ':ClaudeCode<CR>', 'Toggle Claude')
|
||||
nmap_leader('af', ':ClaudeCodeFocus<CR>', 'Focus Claude')
|
||||
nmap_leader('ar', ':ClaudeCode --resume<CR>', 'Resume Claude')
|
||||
|
||||
-- b is for 'Buffer'. Common usage:
|
||||
-- - `<Leader>bs` - create scratch (temporary) buffer
|
||||
-- - `<Leader>ba` - navigate to the alternative buffer
|
||||
|
||||
@@ -386,19 +386,6 @@ later(function()
|
||||
require('mini.pairs').setup({ modes = { command = true } })
|
||||
end)
|
||||
|
||||
-- Autopairs functionality. Insert pair when typing opening character and go over
|
||||
-- right character if it is already to cursor's right. Also provides mappings for
|
||||
-- `<CR>` and `<BS>` to perform extra actions when inside pair.
|
||||
-- Example usage in Insert mode:
|
||||
-- - `(` - insert "()" and put cursor between them
|
||||
-- - `)` when there is ")" to the right - jump over ")" without inserting new one
|
||||
-- - `<C-v>(` - always insert a single "(" literally. This is useful since
|
||||
-- 'mini.pairs' doesn't provide particularly smart behavior, like auto balancing
|
||||
later(function()
|
||||
-- Create pairs not only in Insert, but also in Command line mode
|
||||
require('mini.pairs').setup({ modes = { command = true } })
|
||||
end)
|
||||
|
||||
-- Pick anything with single window layout and fast matching. This is one of
|
||||
-- the main usability improvements as it powers a lot of "find things quickly"
|
||||
-- workflows.
|
||||
|
||||
@@ -119,9 +119,13 @@ now_if_args(function()
|
||||
add({ source = "catppuccin/nvim", name = "catppuccin" })
|
||||
require('catppuccin').setup({
|
||||
flavour = 'mocha',
|
||||
transparent_background = true,
|
||||
dim_inactive = {
|
||||
enabled = true,
|
||||
},
|
||||
float = {
|
||||
transparent = true,
|
||||
},
|
||||
})
|
||||
vim.cmd('colorscheme catppuccin')
|
||||
end)
|
||||
@@ -142,3 +146,13 @@ later(function()
|
||||
})
|
||||
require('gitsigns').setup({})
|
||||
end)
|
||||
|
||||
-- claudecode =================================================================
|
||||
later(function ()
|
||||
add({
|
||||
source = 'coder/claudecode.nvim',
|
||||
depends = { 'folke/snacks.nvim' },
|
||||
})
|
||||
require('claudecode').setup({})
|
||||
end
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user