diff options
| author | Robert Günzler <r@gnzler.io> | 2026-09-27 17:38:39 +0200 |
|---|---|---|
| committer | Robert Günzler <r@gnzler.io> | 2026-09-27 17:38:39 +0200 |
| commit | 0860db73ae6fd9a6f6347219d820bf026a6b8b91 (patch) | |
| tree | 11318c3670d1c32c5aa0bf404c22fba3bf63fc53 /.config/nvim/lua/plugins | |
| parent | 4e34cbf9673aeaba252e01df554a0d204e83c5e2 (diff) | |
| download | dotfiles-0860db73ae6fd9a6f6347219d820bf026a6b8b91.tar.gz | |
Automated-commit-by: dots Signed-off-by: Robert Günzler <r@gnzler.io>
Diffstat (limited to '')
| -rw-r--r-- | .config/nvim/lua/plugins/blink.lua | 23 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/calcium.lua | 1 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/colorizer.lua | 5 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/colors.lua | 12 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/diff.lua | 47 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/fzf.lua | 98 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/gentoo.lua | 1 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/git.lua | 7 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/haunt.lua | 47 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/icons.lua | 1 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/indent.lua | 1 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/lsp.lua | 29 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/markdown.lua | 2 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/mini.lua | 4 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/minimap.lua | 13 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/oil.lua | 1 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/snippets.lua | 1 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/treesitter.lua | 5 | ||||
| -rw-r--r-- | .config/nvim/lua/plugins/whichkey.lua | 10 |
19 files changed, 280 insertions, 28 deletions
diff --git a/.config/nvim/lua/plugins/blink.lua b/.config/nvim/lua/plugins/blink.lua index 1122bcc..cefef4a 100644 --- a/.config/nvim/lua/plugins/blink.lua +++ b/.config/nvim/lua/plugins/blink.lua @@ -1,6 +1,7 @@ return { { - 'saghen/blink.cmp', + enabled = true, + 'https://github.com/saghen/blink.cmp.git', version = '1.*', lazy = false, @@ -25,7 +26,7 @@ return { -- TODO: -- 'prefer_rust_with_warning', requires nightly rust, due to: -- https://github.com/rust-lang/rust/issues/86656 - fuzzy = { + fuzzy = { implementation = 'lua', sorts = { function(a, b) @@ -35,11 +36,13 @@ return { } local a_priority = prio[a.source_id] or 0 local b_priority = prio[b.source_id] or 0 - if a_priority ~= b_priority then return a_priority > b_priority end + if a_priority ~= b_priority then + return a_priority > b_priority + end end, -- defaults 'score', - 'sort_text' + 'sort_text', }, }, @@ -74,6 +77,8 @@ return { window = { scrollbar = false }, -- BUG: weird artifacts }, + snippets = { preset = 'luasnip' }, + keymap = { ['<C-space>'] = { 'show', 'show_documentation', 'hide_documentation' }, ['<C-e>'] = { 'cancel', 'fallback' }, @@ -87,8 +92,14 @@ return { ['<C-k>'] = { 'snippet_backward', 'fallback' }, -- ['<C-l>'] = { 'show', 'hide', 'fallback' }, }, - - snippets = { preset = 'luasnip' }, + }, + }, + { + 'https://github.com/saghen/blink.indent.git', + opts = { + scope = { + highlights = { 'BlinkIndentScope' }, + }, }, }, } diff --git a/.config/nvim/lua/plugins/calcium.lua b/.config/nvim/lua/plugins/calcium.lua index f0ab78c..7ff1ba0 100644 --- a/.config/nvim/lua/plugins/calcium.lua +++ b/.config/nvim/lua/plugins/calcium.lua @@ -1,5 +1,6 @@ return { { + enabled = true, 'necrom4/calcium.nvim', cmd = {'Calcium'}, opts = { diff --git a/.config/nvim/lua/plugins/colorizer.lua b/.config/nvim/lua/plugins/colorizer.lua index c949058..0b69d5a 100644 --- a/.config/nvim/lua/plugins/colorizer.lua +++ b/.config/nvim/lua/plugins/colorizer.lua @@ -1,8 +1,9 @@ return { { - 'NvChad/nvim-colorizer.lua', + enabled = true, + 'https://github.com/NvChad/nvim-colorizer.lua.git', -- 'norcalli/nvim-colorizer.lua', - lazy = false, + lazy = true, opts = { options = { display = { diff --git a/.config/nvim/lua/plugins/colors.lua b/.config/nvim/lua/plugins/colors.lua new file mode 100644 index 0000000..764abfd --- /dev/null +++ b/.config/nvim/lua/plugins/colors.lua @@ -0,0 +1,12 @@ +return { + { + enabled = true, + 'https://github.com/oskarnurm/koda.nvim', + lazy = false, + priority = 1000, + config = function() + vim.opt.termguicolors = true + vim.cmd('colorscheme koda') + end, + } +} diff --git a/.config/nvim/lua/plugins/diff.lua b/.config/nvim/lua/plugins/diff.lua new file mode 100644 index 0000000..d758522 --- /dev/null +++ b/.config/nvim/lua/plugins/diff.lua @@ -0,0 +1,47 @@ +return { + { + enabled = true, + 'https://github.com/sindrets/diffview.nvim', + cmd = { + 'DiffviewOpen', + 'DiffviewFileHistory', + }, + init = function() + vim.keymap.set( + 'n', + '<leader>g-', + vim.cmd.DiffviewFileHistory, + { desc = 'DiffviewFileHistory' } + ) + + vim.api.nvim_create_autocmd('Filetype', { + pattern = { 'git', 'gitcommit', 'gitrebase' }, + callback = function() + vim.keymap.set('n', 'K', function() + vim.cmd.DiffviewOpen(vim.fn.expand('<cword>') .. '^!') + end, { buffer = 0, desc = 'DiffviewOpen' }) + end, + }) + end, + config = function() + vim.api.nvim_create_autocmd('User', { + pattern = { 'DiffviewViewEnter' }, + callback = function() + vim.keymap.set('n', 'q', '<cmd>DiffviewClose<cr>', { buffer = 0 }) + vim.keymap.set( + 'n', + '<a-j>', + require('diffview.actions').select_next_entry, + { buffer = 0 } + ) + vim.keymap.set( + 'n', + '<a-k>', + require('diffview.actions').select_prev_entry, + { buffer = 0 } + ) + end, + }) + end, + }, +} diff --git a/.config/nvim/lua/plugins/fzf.lua b/.config/nvim/lua/plugins/fzf.lua index 73246a8..1a25c0d 100644 --- a/.config/nvim/lua/plugins/fzf.lua +++ b/.config/nvim/lua/plugins/fzf.lua @@ -1,5 +1,6 @@ return { { + enabled = true, 'ibhagwan/fzf-lua', dependencies = { 'echasnovski/mini.icons', @@ -13,10 +14,12 @@ return { { 'default' }, -- OPTIONS winopts = { + backdrop = 0, split = 'belowright 20new', border = 'none', preview = { border = 'none', + hidden = true, }, -- on_create = function() end, }, @@ -27,11 +30,12 @@ return { ['ctrl-p'] = 'up', }, }, - -- actions = { - -- files = { - -- ['ctrl-q'] = { fn = fzf.actions.file_sel_to_qf }, - -- }, - -- }, + actions = { + files = { + true, + ['ctrl-q'] = { fn = fzf.actions.file_sel_to_qf, prefix = 'select-all' }, + }, + }, fzf_colors = true, -- PICKER CONFIG files = { @@ -39,7 +43,7 @@ return { }, marks = { marks = '[a-zA-Z]', - } + }, }) end, keys = { @@ -48,11 +52,26 @@ return { { mode = 'n', ';b', '<cmd>FzfLua buffers<cr>', desc = 'fzf: buffers' }, { mode = 'n', ';f', '<cmd>FzfLua files<cr>', desc = 'fzf: find_files' }, { mode = 'n', ';g', '<cmd>FzfLua live_grep<cr>', desc = 'fzf: live_grep' }, - { mode = 'n', ';d', '<cmd>FzfLua diagnostics_workspace<cr>', desc = 'fzf: workspace diagnostics' }, - { mode = 'n', ';D', '<cmd>FzfLua diagnostics_document<cr>', desc = 'fzf: document diagnostics' }, + { + mode = 'n', + ';D', + '<cmd>FzfLua diagnostics_workspace sort=true<cr>', + desc = 'fzf: workspace diagnostics', + }, + { + mode = 'n', + ';d', + '<cmd>FzfLua diagnostics_document sort=true<cr>', + desc = 'fzf: document diagnostics', + }, { mode = 'n', ';h', '<cmd>FzfLua helptags<cr>', desc = 'fzf: help' }, { mode = 'n', ';s', '<cmd>FzfLua lsp_document_symbols<cr>', desc = 'fzf: document symbols' }, - { mode = 'n', ';w', '<cmd>FzfLua lsp_live_workspace_symbols<cr>', desc = 'fzf: workspace symbols' }, + { + mode = 'n', + ';w', + '<cmd>FzfLua lsp_live_workspace_symbols<cr>', + desc = 'fzf: workspace symbols', + }, { mode = 'n', ';m', '<cmd>FzfLua marks<cr>', desc = 'fzf: marks' }, { mode = 'n', @@ -62,12 +81,60 @@ return { end, desc = 'fzf: vim_config', }, - -- { - -- mode = 'n', - -- ';;t', - -- '<cmd>Telescope<cr>', - -- desc = 'telescope: select (interactive)', - -- }, + { + mode = 'n', + ';z', + function() + -- register one-time autocmd to open changed directory with oil + vim.api.nvim_create_autocmd('DirChanged', { + pattern = '*', + callback = vim.schedule_wrap(function(args) + vim.cmd.Oil(args.file) + end), + once = true, + }) + require('fzf-lua').zoxide() + end, + desc = 'fzf: zoxide', + }, + { + mode = 'n', + ';Z', + function() + require('fzf-lua').live_grep({ + cwd = vim.env.ZK_NOTEBOOK_DIR, + actions = { + ['ctrl-c'] = function(selected, opts) + local utils = require('fzf-lua.utils') + + local title = opts.last_query + local p = vim + .system({ 'zk', 'new', '--dry-run', '--no-input', '--title', title }, { text = true }) + :wait() + if not p.code == 0 then + return + end + utils.info(vim.inspect(p.stdout)) + + local note_path = vim.trim(p.stderr) + local note_body = vim.split(p.stdout, '\n') + require('mod.win').open(note_path, note_body, { + buf = { filetype = 'markdown' }, + }) + end, + }, + }) + end, + desc = 'fzf: zettelkasten', + }, + { + mode = 'n', + ';T', + function() + require('fzf-lua').live_grep({ regex = '(TODO|XXX|NOTE|HACK):' }) + end, + desc = 'fzf: zettelkasten', + }, { mode = 'n', ';;f', @@ -78,7 +145,6 @@ return { else dir = vim.fn.expand('%:p:h') end - -- require('fzf-lua').files({ cwd = dir }) _G.feedkeys(':Fzf files cwd=' .. dir) end, desc = 'fzf: files (interactive)', diff --git a/.config/nvim/lua/plugins/gentoo.lua b/.config/nvim/lua/plugins/gentoo.lua index 15ef3aa..9af7571 100644 --- a/.config/nvim/lua/plugins/gentoo.lua +++ b/.config/nvim/lua/plugins/gentoo.lua @@ -1,5 +1,6 @@ return { { + enabled = true, 'https://github.com/gentoo/gentoo-syntax', lazy = false, init = function() diff --git a/.config/nvim/lua/plugins/git.lua b/.config/nvim/lua/plugins/git.lua index d1e3f7b..7f1db6d 100644 --- a/.config/nvim/lua/plugins/git.lua +++ b/.config/nvim/lua/plugins/git.lua @@ -1,5 +1,6 @@ return { { + enabled = true, 'lewis6991/gitsigns.nvim', lazy = false, opts = { @@ -46,6 +47,7 @@ return { }, { + enabled = true, 'linrongbin16/gitlinker.nvim', cmd = { 'GitLink' }, dependencies = { 'nvim-lua/plenary.nvim' }, @@ -54,6 +56,7 @@ return { }, keys = { { + mode = { 'n', 'x' }, '<leader>gl', vim.cmd.GitLink, desc = 'GitLinker: clipboard', @@ -62,11 +65,13 @@ return { }, { - enabled = false, + enabled = true, 'moyiz/git-dev.nvim', lazy = true, cmd = { 'GitDevOpen', 'GitDevCleanAll' }, opts = { + pickers = { type = 'uiselect' }, + ephemeral = false, read_only = false, }, }, diff --git a/.config/nvim/lua/plugins/haunt.lua b/.config/nvim/lua/plugins/haunt.lua new file mode 100644 index 0000000..aa24cec --- /dev/null +++ b/.config/nvim/lua/plugins/haunt.lua @@ -0,0 +1,47 @@ +return { + { + enabled = true, + 'https://github.com/TheNoeTrevino/haunt.nvim', + lazy = true, + opts = { + sign = '', + -- sign_hl = nil, + -- line_hl = nil, + -- virt_text_hl = nil, + data_dir = nil, + annotation_prefix = ' ', + -- virt_text_pos = 'eol', + virt_text_pos = 'above', + picker_keys = { + delete = { key = 'ctrl-x' }, + edit_annotation = { key = 'ctrl-e' }, + }, + }, + cmd = { + 'HauntAnnoate', + 'HauntDelete', + 'HauntList', + 'HauntNext', + 'HauntPrev', + 'HauntQfAll', + }, + keys = { + { '[h', '<cmd>HauntPrev<cr>', desc = 'haunt: prev annotation', silent = true }, + { ']h', '<cmd>HauntNext<cr>', desc = 'haunt: next annotation', silent = true }, + { '<leader>h', '<nop>', desc = 'haunt' }, + { '<leader>ha', '<cmd>HauntAnnotate<cr>', desc = 'haunt: annotate', silent = true }, + { '<leader>ha', '<cmd>HauntAnnotate<cr>', desc = 'haunt: annotate', silent = true }, + { '<leader>hd', '<cmd>HauntDelete<cr>', desc = 'haunt: delete', silent = true }, + { '<leader>hl', '<cmd>HauntList<cr>', desc = 'haunt: list', silent = true }, + { '<leader>hf', '<cmd>HauntQfAll<cr>', desc = 'haunt: quickfix', silent = true }, + { + '<leader>ht', + function() + require('haunt.api').toggle_all_lines() + end, + desc = 'haunt: toggle all', + silent = true, + }, + }, + }, +} diff --git a/.config/nvim/lua/plugins/icons.lua b/.config/nvim/lua/plugins/icons.lua index 9a597ab..339ad12 100644 --- a/.config/nvim/lua/plugins/icons.lua +++ b/.config/nvim/lua/plugins/icons.lua @@ -1,5 +1,6 @@ return { { + enabled = true, 'echasnovski/mini.icons', version = false, events = { 'VeryLazy' }, diff --git a/.config/nvim/lua/plugins/indent.lua b/.config/nvim/lua/plugins/indent.lua index e247c5a..d197a43 100644 --- a/.config/nvim/lua/plugins/indent.lua +++ b/.config/nvim/lua/plugins/indent.lua @@ -1,6 +1,7 @@ return { -- show indents using virtual text { + enabled = false, 'lukas-reineke/indent-blankline.nvim', lazy = false, main = 'ibl', diff --git a/.config/nvim/lua/plugins/lsp.lua b/.config/nvim/lua/plugins/lsp.lua index 311f1bc..306953c 100644 --- a/.config/nvim/lua/plugins/lsp.lua +++ b/.config/nvim/lua/plugins/lsp.lua @@ -1,14 +1,22 @@ return { { + enabled = true, 'neovim/nvim-lspconfig', version = '^2.0', }, { + enabled = true, 'nvimtools/none-ls.nvim', dependencies = { 'nvim-lua/plenary.nvim', 'gbprod/none-ls-shellcheck.nvim', }, + ft = { + 'sh', + 'bash', + 'go', + 'lua', + }, config = function() local nls = require('null-ls') nls.setup({ @@ -18,10 +26,25 @@ return { nls.builtins.formatting.stylua, nls.builtins.formatting.shfmt, - nls.builtins.formatting.buf, - require("none-ls-shellcheck.diagnostics"), - require("none-ls-shellcheck.code_actions"), + require('none-ls-shellcheck.diagnostics'), + require('none-ls-shellcheck.code_actions'), + + nls.builtins.diagnostics.golangci_lint.with({ + command = 'task', + args = { + '--offline', + '--silent', + '--exit-code', + '--failfast', + '--output=interleaved', + 'go:lint', + '--', + '--show-stats=false', + '--output.json.path=stdout', + '--path-mode=abs', + }, + }), }, }) end, diff --git a/.config/nvim/lua/plugins/markdown.lua b/.config/nvim/lua/plugins/markdown.lua index efe7019..a02cb67 100644 --- a/.config/nvim/lua/plugins/markdown.lua +++ b/.config/nvim/lua/plugins/markdown.lua @@ -1,5 +1,6 @@ return { { + enabled = true, -- handy markdown commands 'tadmccorkle/markdown.nvim', ft = { 'markdown' }, @@ -17,6 +18,7 @@ return { }, }, { + enabled = true, -- pretty markdown 'MeanderingProgrammer/markdown.nvim', name = 'render-markdown', -- needed if used together with markdown.nvim above diff --git a/.config/nvim/lua/plugins/mini.lua b/.config/nvim/lua/plugins/mini.lua index fb4c9a6..fdf4a0e 100644 --- a/.config/nvim/lua/plugins/mini.lua +++ b/.config/nvim/lua/plugins/mini.lua @@ -1,23 +1,27 @@ return { { + enabled = true, 'echasnovski/mini.align', version = false, lazy = false, opts = {}, }, { + enabled = true, 'echasnovski/mini.ai', version = false, lazy = false, opts = {}, }, { + enabled = true, 'echasnovski/mini.surround', version = false, lazy = false, opts = {}, }, { + enabled = true, 'echasnovski/mini.operators', version = false, lazy = false, diff --git a/.config/nvim/lua/plugins/minimap.lua b/.config/nvim/lua/plugins/minimap.lua new file mode 100644 index 0000000..99e9ec7 --- /dev/null +++ b/.config/nvim/lua/plugins/minimap.lua @@ -0,0 +1,13 @@ +return { + { + enabled = false, + 'alchezar/fishbone.nvim', + event = 'VeryLazy', + opts = {}, + }, + { + enabled = false, + 'https://github.com/lewis6991/satellite.nvim', + opts = {}, + } +} diff --git a/.config/nvim/lua/plugins/oil.lua b/.config/nvim/lua/plugins/oil.lua index 401fe8b..d21b041 100644 --- a/.config/nvim/lua/plugins/oil.lua +++ b/.config/nvim/lua/plugins/oil.lua @@ -1,5 +1,6 @@ return { { + enabled = true, 'stevearc/oil.nvim', lazy = false, opts = { diff --git a/.config/nvim/lua/plugins/snippets.lua b/.config/nvim/lua/plugins/snippets.lua index 71276a0..2a38a1d 100644 --- a/.config/nvim/lua/plugins/snippets.lua +++ b/.config/nvim/lua/plugins/snippets.lua @@ -1,5 +1,6 @@ return { { + enabled = true, 'L3MON4D3/LuaSnip', version = 'v2.*', build = 'make install_jsregexp', diff --git a/.config/nvim/lua/plugins/treesitter.lua b/.config/nvim/lua/plugins/treesitter.lua index 0978eb7..ccacc7a 100644 --- a/.config/nvim/lua/plugins/treesitter.lua +++ b/.config/nvim/lua/plugins/treesitter.lua @@ -1,5 +1,6 @@ return { { + enabled = true, 'nvim-treesitter/nvim-treesitter', branch = 'main', lazy = false, @@ -36,6 +37,7 @@ return { 'gotmpl', 'gowork', 'html', + 'janet_simple', 'javascript', 'json', 'lua', @@ -43,15 +45,18 @@ return { 'markdown', 'markdown_inline', 'ninja', + 'proto', 'python', 'regex', 'rust', 'scss', 'sql', + 'templ', -- golang html templates 'todotxt', 'toml', 'typescript', 'typst', + 'vala', 'vim', 'vimdoc', 'yaml', diff --git a/.config/nvim/lua/plugins/whichkey.lua b/.config/nvim/lua/plugins/whichkey.lua index cb89df4..442b43f 100644 --- a/.config/nvim/lua/plugins/whichkey.lua +++ b/.config/nvim/lua/plugins/whichkey.lua @@ -1,9 +1,19 @@ return { { + enabled = true, 'folke/which-key.nvim', event = 'VeryLazy', opts = { icons = { separator = '→ ', group = ' +' }, }, + keys = { + { + '<leader>?', + function() + require('which-key').show({ global = true }) + end, + desc = 'which-key: show buffer local keymaps', + }, + }, }, } |