Compare commits

...

6 Commits

Author SHA1 Message Date
a4c7aeb53f Small updates 2026-01-13 11:11:42 +01:00
267093190b 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
2026-01-05 09:51:17 +01:00
b9f2867d9f Small improvements 2026-01-04 18:51:30 +01:00
bcabc31c48 Fix catppuccin plugin source 2026-01-03 17:43:53 +01:00
21efc85d1d Update mini.clue use 2026-01-03 17:43:27 +01:00
96596c2908 [keymaps] Remove some comments 2026-01-03 17:11:42 +01:00
7 changed files with 113 additions and 69 deletions

1
.gitignore vendored Normal file
View File

@@ -0,0 +1 @@
spell/*

12
.luarc.json Normal file
View File

@@ -0,0 +1,12 @@
{
"runtime.version": "LuaJIT",
"runtime.path": [
"lua/?.lua",
"lua/?/init.lua"
],
"diagnostics.globals": ["vim"],
"workspace.checkThirdParty": false,
"workspace.library": [
"$VIMRUNTIME"
]
}

35
after/lsp/lsp_ls.lua Normal file
View File

@@ -0,0 +1,35 @@
-- ┌────────────────────┐
-- │ LSP config example │
-- └────────────────────┘
--
-- This file contains configuration of 'lua_ls' language server.
-- Source: https://github.com/LuaLS/lua-language-server
--
-- It is used by `:h vim.lsp.enable()` and `:h vim.lsp.config()`.
-- See `:h vim.lsp.Config` and `:h vim.lsp.ClientConfig` for all available fields.
--
-- This config is designed for Lua's activity around Neovim. It provides only
-- basic config and can be further improved.
return {
on_attach = function(client, buf_id)
-- Reduce very long list of triggers for better 'mini.completion' experience
client.server_capabilities.completionProvider.triggerCharacters =
{ '.', ':', '#', '(' }
-- Use this function to define buffer-local mappings and behavior that depend
-- on attached client or only makes sense if there is language server attached.
end,
-- LuaLS Structure of these settings comes from LuaLS, not Neovim
settings = {
Lua = {
-- Define runtime properties. Use 'LuaJIT', as it is built into Neovim.
runtime = { version = 'LuaJIT', path = vim.split(package.path, ';') },
workspace = {
-- Don't analyze code from submodules
ignoreSubmodules = true,
-- Add Neovim's methods for easier code writing
library = { vim.env.VIMRUNTIME },
},
},
},
}

View File

@@ -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
@@ -87,6 +85,9 @@ vim.o.formatlistpat = [[^\s*[0-9\-\+\*]\+[\.\)]*\s\+]]
vim.o.complete = '.,w,b,kspell' -- Use less sources
vim.o.completeopt = 'menuone,noselect,fuzzy,nosort' -- Use custom behavior
-- Clipboard integration
vim.o.clipboard = 'unnamedplus'
-- Autocommands ===============================================================
-- Don't auto-wrap comments and don't insert comment leader after hitting 'o'.

View File

@@ -34,22 +34,11 @@ nmap(']p', '<Cmd>exe "put " . v:register<CR>', 'Paste Below')
-- In 'plugin/10_options.lua' <Leader> is set to <Space>, i.e. press <Space>
-- whenever there is a suggestion to press <Leader>.
--
-- This config uses a "two key Leader mappings" approach: first key describes
-- semantic group, second key executes an action. Both keys are usually chosen
-- to create some kind of mnemonic.
-- Example: `<Leader>f` groups "find" type of actions; `<Leader>ff` - find files.
-- Use this section to add Leader mappings in a structural manner.
--
-- Usually if there are global and local kinds of actions, lowercase second key
-- denotes global and uppercase - local.
-- Example: `<Leader>fs` / `<Leader>fS` - find workspace/document LSP symbols.
--
-- Many of the mappings use 'mini.nvim' modules set up in 'plugin/30_mini.lua'.
-- Create a global table with information about Leader groups in certain modes.
-- 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' },
@@ -59,12 +48,13 @@ _G.Config.leader_group_clues = {
{ mode = 'n', keys = '<Leader>o', desc = '+Other' },
{ mode = 'n', keys = '<Leader>s', desc = '+Session' },
{ mode = 'n', keys = '<Leader>t', desc = '+Terminal' },
{ mode = 'n', keys = '<Leader>v', desc = '+Visits' },
{ mode = 'x', keys = '<Leader>g', desc = '+Git' },
{ mode = 'x', keys = '<Leader>l', desc = '+Language' },
}
-- 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
-- an attempt to be more concise yet descriptive. See `:h <Cmd>`.
@@ -77,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
@@ -173,20 +168,13 @@ nmap_leader('lt', '<Cmd>lua vim.lsp.buf.type_definition()<CR>', 'Type definition
xmap_leader('lf', formatting_cmd, 'Format selection')
-- m is for 'Map'. Common usage:
-- - `<Leader>mt` - toggle map from 'mini.map' (closed by default)
-- - `<Leader>mf` - focus on the map for fast navigation
-- - `<Leader>ms` - change map's side (if it covers something underneath)
nmap_leader('mf', '<Cmd>lua MiniMap.toggle_focus()<CR>', 'Focus (toggle)')
nmap_leader('mr', '<Cmd>lua MiniMap.refresh()<CR>', 'Refresh')
nmap_leader('ms', '<Cmd>lua MiniMap.toggle_side()<CR>', 'Side (toggle)')
nmap_leader('mt', '<Cmd>lua MiniMap.toggle()<CR>', 'Toggle')
-- o is for 'Other'. Common usage:
-- - `<Leader>oz` - toggle between "zoomed" and regular view of current buffer
nmap_leader('or', '<Cmd>lua MiniMisc.resize_window()<CR>', 'Resize to default width')
nmap_leader('ot', '<Cmd>lua MiniTrailspace.trim()<CR>', 'Trim trailspace')
nmap_leader('oz', '<Cmd>lua MiniMisc.zoom()<CR>', 'Zoom toggle')
nmap_leader('om', '<Cmd>Mason<CR>', 'Open Mason')
nmap_leader('ou', '<Cmd>DepsUpdate<CR>', 'Update plugins')
-- s is for 'Session'. Common usage:
-- - `<Leader>sn` - start new session

View File

@@ -104,7 +104,11 @@ now(function() require('mini.sessions').setup() end)
-- See also:
-- - `:h MiniStarter-example-config` - non-default config examples
-- - `:h MiniStarter-lifecycle` - how to work with Starter buffer
now(function() require('mini.starter').setup() end)
now(
function()
require('mini.starter').setup({ header = "Remember why you're doing it" })
end
)
-- Statusline. Sets `:h 'statusline'` to show more info in a line below window.
-- See also:
@@ -114,7 +118,7 @@ now(function() require('mini.statusline').setup() end)
-- Tabline. Sets `:h 'tabline'` to show all listed buffers in a line at the top.
-- Buffers are ordered as they were created. Navigate with `[b` and `]b`.
now(function() require('mini.tabline').setup() end)
-- now(function() require('mini.tabline').setup() end)
-- Extra 'mini.nvim' functionality.
--
@@ -203,6 +207,7 @@ later(function()
miniclue.gen_clues.g(),
miniclue.gen_clues.marks(),
miniclue.gen_clues.registers(),
miniclue.gen_clues.square_brackets(),
-- This creates a submode for window resize mappings. Try the following:
-- - Press `<C-w>s` to make a window split.
-- - Press `<C-w>+` to increase height. Clue window still shows clues as if
@@ -214,33 +219,25 @@ later(function()
},
-- Explicitly opt-in for set of common keys to trigger clue window
triggers = {
{ mode = 'n', keys = '<Leader>' }, -- Leader triggers
{ mode = 'x', keys = '<Leader>' },
{ mode = 'n', keys = '\\' }, -- mini.basics
{ mode = 'n', keys = '[' }, -- mini.bracketed
{ mode = 'n', keys = ']' },
{ mode = 'x', keys = '[' },
{ mode = 'x', keys = ']' },
{ mode = 'i', keys = '<C-x>' }, -- Built-in completion
{ mode = 'n', keys = 'g' }, -- `g` key
{ mode = 'x', keys = 'g' },
{ mode = 'n', keys = "'" }, -- Marks
{ mode = 'n', keys = '`' },
{ mode = 'x', keys = "'" },
{ mode = 'x', keys = '`' },
{ mode = 'n', keys = '"' }, -- Registers
{ mode = 'x', keys = '"' },
{ mode = 'i', keys = '<C-r>' },
{ mode = 'c', keys = '<C-r>' },
{ mode = 'n', keys = '<C-w>' }, -- Window commands
{ mode = 'n', keys = 'z' }, -- `z` key
{ mode = 'x', keys = 'z' },
{ mode = { 'n', 'x' }, keys = '<Leader>' }, -- Leader triggers
{ mode = 'n', keys = '\\' }, -- mini.basics
{ mode = { 'n', 'x' }, keys = '[' }, -- mini.bracketed
{ mode = { 'n', 'x' }, keys = ']' },
{ mode = 'i', keys = '<C-x>' }, -- Built-in completion
{ mode = { 'n', 'x' }, keys = 'g' }, -- `g` key
{ mode = { 'n', 'x' }, keys = "'" }, -- Marks
{ mode = { 'n', 'x' }, keys = '`' },
{ mode = { 'n', 'x' }, keys = '"' }, -- Registers
{ mode = { 'i', 'c' }, keys = '<C-r>' },
{ mode = 'n', keys = '<C-w>' }, -- Window commands
{ mode = { 'n', 'x' }, keys = 's' }, -- `s` key (mini.surround, etc.)
{ mode = { 'n', 'x' }, keys = 'z' }, -- `z` key
},
window = {
config = {
width = 50,
},
},
}
}
})
end)
@@ -389,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.

View File

@@ -37,6 +37,11 @@ now_if_args(function()
'lua',
'vimdoc',
'markdown',
'yaml',
'toml',
'python',
'javascript',
'typst',
-- Add here more languages with which you want to use tree-sitter
-- To see available languages:
-- - Execute `:=require('nvim-treesitter').get_available()`
@@ -76,8 +81,9 @@ now_if_args(function()
-- Use `:h vim.lsp.config()` or 'after/lsp/' directory to configure servers.
-- Uncomment and tweak the following `vim.lsp.enable()` call to enable servers.
vim.lsp.enable({
-- -- For example, if `lua-language-server` is installed, use `'lua_ls'` entry
'lua_ls',
'basedpyright',
'ruff',
})
end)
@@ -99,7 +105,10 @@ later(function()
require('conform').setup({
-- Map of filetype to formatters
-- Make sure that necessary CLI tool is available
formatters_by_ft = { lua = { 'stylua' } },
formatters_by_ft = {
lua = { 'stylua' },
python = { 'ruff' }
},
})
end)
@@ -110,13 +119,17 @@ now_if_args(function()
end)
-- Catppuccin =================================================================
MiniDeps.now(function()
add({ source = 'catpuccin/nvim', name = 'catppuccin' })
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)
@@ -137,3 +150,13 @@ later(function()
})
require('gitsigns').setup({})
end)
-- claudecode =================================================================
later(function ()
add({
source = 'coder/claudecode.nvim',
depends = { 'folke/snacks.nvim' },
})
require('claudecode').setup({})
end
)