From 5929cd53d7e555a470c8d1626d43679a06213b36 Mon Sep 17 00:00:00 2001 From: Frank Zechert Date: Wed, 24 Jun 2026 03:14:04 +0200 Subject: [PATCH] initial commit for native-only neovim plugin configuration --- README.md | 7 +- init.lua | 16 +- lua/config/autocommands.lua | 93 ++++++----- lua/config/diagnostic.lua | 21 +-- lua/config/keymaps.lua | 37 ++--- lua/config/lazy.lua | 68 -------- lua/config/netrw.lua | 5 +- lua/config/options.lua | 107 +++++++----- lua/config/ui.lua | 60 +------ .../todo-comments.lua => lsp/init.lua} | 92 ++++++----- lua/plugins/catppuccin.lua | 70 ++++---- lua/plugins/gitsigns.lua | 107 ------------ .../treesitter.lua => plugins/init.lua} | 26 +-- lua/plugins/lualine.lua | 155 ------------------ lua/plugins/telescope.lua | 147 ----------------- lua/plugins/trouble.lua | 78 --------- lua/plugins/whichkey.lua | 62 ------- nvim-pack-lock.json | 12 ++ packages.txt | 1 + 19 files changed, 266 insertions(+), 898 deletions(-) delete mode 100644 lua/config/lazy.lua rename lua/{plugins/todo-comments.lua => lsp/init.lua} (69%) delete mode 100644 lua/plugins/gitsigns.lua rename lua/{config/treesitter.lua => plugins/init.lua} (85%) delete mode 100644 lua/plugins/lualine.lua delete mode 100644 lua/plugins/telescope.lua delete mode 100644 lua/plugins/trouble.lua delete mode 100644 lua/plugins/whichkey.lua create mode 100644 nvim-pack-lock.json diff --git a/README.md b/README.md index fabfbf1..1d5c434 100644 --- a/README.md +++ b/README.md @@ -4,9 +4,4 @@ Neovim configuration ![fz-stack Logo](https://git.zechert.net/fz-stack/assets/raw/branch/master/icons/fz-stack-transparent.svg) -## Install - -Run the script `install.sh` to install necessary packages on the operating system (using `yay`) from the file -`packages.txt`. This will also download and build the treesitter languages - -- `bash` +Neovim development environment using neovim 0.12 and native treesitter, LSP, and plugin manager. diff --git a/init.lua b/init.lua index ecff2c3..5959f16 100644 --- a/init.lua +++ b/init.lua @@ -1,5 +1,6 @@ --[[ + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ @@ -25,8 +26,8 @@ | _/ /_____\__ \ || (_| | (__| < |_|/___| |___/\__\__,_|\___|_|\_\ - Neovim 0.12 configuration - (c) Frank Zechert 2026 + Neovim v0.12 configuration + (C) Frank Zechert 2026 ]] vim.g.mapleader = " " @@ -38,11 +39,12 @@ vim.loader.enable() -- load configuration require("config.ui") require("config.options") -require("config.diagnostic") -require("config.treesitter") -require("config.autocommands") require("config.keymaps") +require("config.autocommands") +require("config.diagnostic") require("config.netrw") --- load plugin manager -require("config.lazy") +-- load plugins +require("plugins") +-- load lsp configurations +require("lsp") diff --git a/lua/config/autocommands.lua b/lua/config/autocommands.lua index 601eca1..226a18a 100644 --- a/lua/config/autocommands.lua +++ b/lua/config/autocommands.lua @@ -1,5 +1,6 @@ --[[ + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ @@ -25,30 +26,33 @@ | _/ /_____\__ \ || (_| | (__| < |_|/___| |___/\__\__,_|\___|_|\_\ - Neovim 0.12 configuration - (c) Frank Zechert 2026 + Neovim v0.12 configuration + (C) Frank Zechert 2026 ]] + local create_group = vim.api.nvim_create_augroup local create_cmd = vim.api.nvim_create_autocmd -local function contains(tbl, value) - for _, v in ipairs(tbl) do - if v == value then - return true - end - end - return false -end --- briefly highlithg text that is yanked +-- briefly highlight text that is yanked create_cmd("TextYankPost", { desc = "Highlight yanked text", group = create_group("cmd-highlight-yank", { clear = true }), callback = function() vim.highlight.on_yank() - end, + end }) --- recognize all scripts with bash shebang as bash filetype +-- disable list chars in specific file types, e.g. netrw +create_cmd("FileType", { + desc = "Disable list characters for some filetypes", + group = create_group("cmd-disable-listchars", { clear = true }), + pattern = { "netrw" }, + callback = function(args) + vim.opt_local.list = false + end +}) + +-- when recognizing a bash shebang, switch filetype to bash create_cmd({"BufRead", "BufNewFile"}, { desc = "Recognize bash shebang as bash filetype", group = create_group("cmd-recognize-bash-filetype", { clear = true }), @@ -59,38 +63,53 @@ create_cmd({"BufRead", "BufNewFile"}, { if first_line:match("^#!.*/bash") then vim.bo[buf].filetype = "bash" end - end, + end }) --- disable list chars in specific filetypes, e.g. netrw -create_cmd({"FileType"}, { - desc = "Disable list chars for some filetypes", - pattern = { "netrw" }, - callback = function(args) - vim.opt_local.list = false - end, -}) - --- automatically remove trailing whitespace on save file -create_cmd({"BufWritePre"}, { - desc = "Remove trailing whitespace when saving", +-- when saving a file, remove trailing whitespace +create_cmd("BufWritePre", { + desc = "Remove trailing whitespace before saving a file", group = create_group("cmd-remove-trailing-whitespace", { clear = true }), pattern = "*", callback = function(args) vim.api.nvim_buf_call(args.buf, function() - vim.cmd([[%s/\s\+$//e]]) + local cursor = vim.api.nvim_win_get_cursor(0) + vim.cmd([[keepjumps keeppatterns silent! %s/\s\+$//e]]) + vim.api.nvim_win_set_cursor(0, cursor) end) - end, + end }) --- automatically set textwidth if not set otherwise -create_cmd({"FileType"}, { - desc = "Automatically set textwidth", - pattern = "*", - callback = function(args) - local buf = args.buf - if vim.bo[buf].textwidth == 0 then - vim.bo[buf].textwidth = vim.g.ui.textwidth[vim.bo[buf].filetype] or vim.g.ui.textwidth.default + +-- highlight trailing whitespace when in normal mode +local trailing_hl_group = create_group("cmd-highlight-trailing-whitespace", { clear = true }) +local trailing_hl_match_ids = {} +-- Remove highlight in all non-normal modes +create_cmd({"InsertEnter", "CmdlineEnter", "TermEnter" }, { + desc = "Remove trailing whitespace highlight in non-normal mode", + group = trailing_hl_group, + callback = function() + local window = vim.api.nvim_get_current_win() + local id = trailing_hl_match_ids[window] + if id then + pcall(vim.fn.matchdelete, id) + trailing_hl_match_ids[window] = nil end - end, + end +}) +-- Apply highlight in normal mode +create_cmd({"InsertLeave", "CmdlineLeave", "TermLeave", "BufEnter", "WinEnter" }, { + desc = "Add trailing whitespace highlight in normal mode", + group = trailing_hl_group, + callback = function() + if vim.fn.mode() ~= "n" then + return + end + local window = vim.api.nvim_get_current_win() + local id = trailing_hl_match_ids[window] + if id then + pcall(vim.fn.matchdelete, id) + end + trailing_hl_match_ids[window] = vim.fn.matchadd("TrailingWhitespace", [[\s\+$]]) + end }) diff --git a/lua/config/diagnostic.lua b/lua/config/diagnostic.lua index 250e2c7..a40a9c8 100644 --- a/lua/config/diagnostic.lua +++ b/lua/config/diagnostic.lua @@ -1,6 +1,6 @@ - --[[ + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ @@ -26,22 +26,23 @@ | _/ /_____\__ \ || (_| | (__| < |_|/___| |___/\__\__,_|\___|_|\_\ - Neovim 0.12 configuration - (c) Frank Zechert 2026 + Neovim v0.12 configuration + (C) Frank Zechert 2026 ]] vim.diagnostic.config({ - update_in_insert = false, + update_in_insert = true, severity_sort = true, float = { - border = vim.g.ui.border, + border = vim.g.ui.popupborder, source = true, }, underline = true, + -- underline only from a specified severity level -- underline = { severity = { min = vim.diagnostic.severity.WARN } }, virtual_text = { prefix = vim.g.ui.symbols.diagnostic.virtual_text_prefix, - severity = nil, -- show all severity + severity = nil, -- show all severities spacing = 2, -- extra spacing between text and code virt_text_pos = "eol", source = "if_many", @@ -53,19 +54,19 @@ vim.diagnostic.config({ INFO = vim.g.ui.symbols.diagnostic.sign_info, HINT = vim.g.ui.symbols.diagnostic.sign_hint, } - return string.format("%s", diagnostic.message) + return string.format("%s: %s", symbols[severity], diagnostic.message) end, - }, virtual_lines = false, jump = { + -- when jumping to a diagnostic message, automatically open the diagnostic float on_jump = function(_, bufnr) vim.diagnostic.open_float({ bufnr = bufnr, - scope = 'cursor', + scope = "cursor", focus = false }) - end, + end }, signs = { -- icons in sign column diff --git a/lua/config/keymaps.lua b/lua/config/keymaps.lua index 3adb5fa..0320974 100644 --- a/lua/config/keymaps.lua +++ b/lua/config/keymaps.lua @@ -1,5 +1,6 @@ --[[ + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ @@ -25,26 +26,24 @@ | _/ /_____\__ \ || (_| | (__| < |_|/___| |___/\__\__,_|\___|_|\_\ - Neovim 0.12 configuration - (c) Frank Zechert 2026 + Neovim v0.12 configuration + (C) Frank Zechert 2026 ]] local map = vim.keymap.set --- Pressing ESC twices leaves terminal mode -map("t", "", "", { desc = "exit terminanl" }) +-- pressing ESC twices leaves terminal mode +map("t", "", "", { desc = "Exit Terminal Mode" }) --- Pressing ESC removes search highlights -map("n", "", "nohlsearch") +-- pressing ESC removes search highlights +map("n", "", "nohlsearch", { desc = "Remove search result highlights" }) --- Smart buffer switch (to alternative, previous, or next) if possible +-- Smart buffer switch +-- switch to the alternative buffer ("#"), if not available, switch to the +-- previous buffer, if not possible, switch to the next buffer local function smart_buffer_switch(current) local alternative = vim.fn.bufnr("#") - - -- get all listed buffers local buffers = vim.fn.getbufinfo({ buflisted = 1 }) - - -- find index of the current buffer local current_index = nil for index, buffer in ipairs(buffers) do if buffer.bufnr == current then @@ -52,13 +51,12 @@ local function smart_buffer_switch(current) break end end - -- try to switch to alternate buffer if alternative > 0 and vim.fn.buflisted(alternative) == 1 and alternative ~= current then vim.api.nvim_set_current_buf(alternative) -- try to switch to previous buffer elseif current_index and current_index > 1 then - vim.api.nvim_set_current_buf(buffers[current_index -1].bufnr) + vim.api.nvim_set_current_buf(buffers[current_index - 1].bufnr) -- try to switch to next buffer elseif current_index and current_index < #buffers then vim.api.nvim_set_current_buf(buffers[current_index + 1].bufnr) @@ -68,35 +66,34 @@ end local function smart_buffer_delete() local current = vim.api.nvim_get_current_buf() smart_buffer_switch(current) - -- delete current buffer vim.cmd(":confirm bdelete " .. current) end -map("n", "bd", smart_buffer_delete, { desc = "Close Current Buffer" }) local function smart_buffer_wipeout() local current = vim.api.nvim_get_current_buf() smart_buffer_switch(current) - -- delete current buffer vim.cmd(":confirm bwipeout " .. current) end -map("n", "bw", smart_buffer_wipeout, { desc = "Wipeout Current Buffer" }) local function delete_other_buffers() local current = vim.api.nvim_get_current_buf() - for _, buffer in ipairs(vim.api.nvim_list_bufs()) do + for _, buffer in ipairs(vim.api.nvim_list_buffers()) do if buffer ~= current and vim.bo[buffer].buflisted and not vim.bo[buffer].modified then vim.api.nvim_buf_delete(buffer, {}) end end end -map("n", "bD", delete_other_buffers, { desc = "Close All Other Buffers" }) local function wipeout_other_buffers() local current = vim.api.nvim_get_current_buf() - for _, buffer in ipairs(vim.api.nvim_list_bufs()) do + for _, buffer in ipairs(vim.api.nvim_list_buffers()) do if buffer ~= current and vim.bo[buffer].buflisted and not vim.bo[buffer].modified then vim.cmd("bwipeout " .. buffer) end end end + +map("n", "bd", smart_buffer_delete, { desc = "Close Current Buffer" }) +map("n", "bw", smart_buffer_wipeout, { desc = "Wipeout Current Buffer" }) +map("n", "bD", delete_other_buffers, { desc = "Close All Other Buffers" }) map("n", "bW", wipeout_other_buffers, { desc = "Wipeout All Other Buffers" }) diff --git a/lua/config/lazy.lua b/lua/config/lazy.lua deleted file mode 100644 index 28d2447..0000000 --- a/lua/config/lazy.lua +++ /dev/null @@ -1,68 +0,0 @@ ---[[ - -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠚⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠗⢀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣄⡉⠓⠦⣌⡙⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⢋⣡⠴⠚⢉⣠⣤⣀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣶⣿⣿⣿⣿⣿⣷⣦⣄⡉⠓⠦⣌⡙⠻⢿⣿⣿⣿⣿⣿⣿⡿⠟⢋⣡⠴⠚⢉⣠⣴⣾⣿⣿⣿⣿⣿⣶⣤ -⠀⠀⠀⠀⠀⠀⠀⠀⠐⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠓⠦⣌⡙⠻⠟⢋⣡⠴⠚⢉⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⠂ -⠀⠀⠀⠀⢀⣠⣴⣆⡈⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠃⠘⢉⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢁⣰⣦⣄⡀ -⠀⠀⠐⠾⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠷⠂ -⠀⢸⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⡇ -⠀⢸⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⡇ -⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⡆⢰⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠃⠘⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⡇⢸⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⡇⢸⠿⠛⠉ - - __ _ _ - / _|___ ___| |_ __ _ ___| | __ - | ||_ /____/ __| __/ _` |/ __| |/ / - | _/ /_____\__ \ || (_| | (__| < - |_|/___| |___/\__\__,_|\___|_|\_\ - - Neovim 0.12 configuration - (c) Frank Zechert 2026 -]] - -local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim" -if not (vim.uv or vim.loop).fs_stat(lazypath) then - local lazyrepository = "https://github.com/folke/lazy.nvim.git" - local output = vim.fn.system({ - "git", - "clone", - "--filter=blob:none", - "--branch=stable", - lazyrepository, - lazypath - }) - - if vim.v.shell_error ~= 0 then - vim.api.nvim_echo({ - { "Failed to clone lazy.nvim:\n", "ErrorMsg" }, - { out, "WarningMsg" }, - { "\nPress any key to continue" }, - }, true, {}) - vim.fn.getchar() - end -end - -vim.opt.rtp:prepend(lazypath) - -require("lazy").setup({ - spec = { - { import = "plugins" } - }, - install = { missing = true, colorscheme = { "catppucchin" } }, - ui = { - border = vim.g.ui.border - }, - checker = { - enabled = false, - notify = true, - }, -}) diff --git a/lua/config/netrw.lua b/lua/config/netrw.lua index d9d18f4..fee1580 100644 --- a/lua/config/netrw.lua +++ b/lua/config/netrw.lua @@ -1,5 +1,6 @@ --[[ + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ @@ -25,8 +26,8 @@ | _/ /_____\__ \ || (_| | (__| < |_|/___| |___/\__\__,_|\___|_|\_\ - Neovim 0.12 configuration - (c) Frank Zechert 2026 + Neovim v0.12 configuration + (C) Frank Zechert 2026 ]] -- Keep the current directory and the browsing directory synced. diff --git a/lua/config/options.lua b/lua/config/options.lua index 7e59aea..6a8c2e9 100644 --- a/lua/config/options.lua +++ b/lua/config/options.lua @@ -1,5 +1,6 @@ --[[ + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ @@ -25,65 +26,78 @@ | _/ /_____\__ \ || (_| | (__| < |_|/___| |___/\__\__,_|\___|_|\_\ - Neovim 0.12 configuration - (c) Frank Zechert 2026 + Neovim v0.12 configuration + (C) Frank Zechert 2026 ]] --- UI +-- UI settings + vim.opt.background = vim.g.ui.background +-- Colored columns and rows vim.opt.colorcolumn = "+1,+2" +vim.opt.textwidth = 120 vim.opt.cursorcolumn = true vim.opt.cursorline = true -vim.opt.cursorlineopt = "both" -vim.opt.linebreak = true -vim.opt.list = true -vim.opt.listchars = vim.g.ui.listchars -vim.opt.number = true -vim.opt.numberwidth = 4 -vim.opt.relativenumber = false -vim.opt.winborder = vim.g.ui.border -vim.opt.pumborder = vim.g.ui.border +vim.opt.cursorlineopt = "both" -- cursor line is displayed in line and in number +vim.opt.signcolumn = "yes" +vim.opt.termguicolors = true +-- Linebreak behaviour and scroll offset +vim.opt.linebreak = true -- visually line break at word boundary +vim.opt.showbreak = vim.g.ui.linebreak -- show line break indicator vim.opt.scrolloff = 5 vim.opt.sidescrolloff = 3 -vim.opt.showbreak = vim.g.ui.linebreak -vim.opt.signcolumn = "yes" +vim.opt.wrap = false -- by default, do not wrap long lines +vim.opt.wrapmargin = 3 +-- Show special characters +vim.opt.list = true +vim.opt.listchars = vim.g.ui.listchars +-- show line numbers +vim.opt.number = true +vim.opt.relativenumber = true +vim.opt.numberwidth = 4 +-- border settings +vim.opt.winborder = vim.g.ui.windowborder +vim.opt.pumborder = vim.g.ui.popupborder +-- window split behaviour vim.opt.splitbelow = true vim.opt.splitright = true -vim.opt.termguicolors = true -vim.opt.textwidth = 120 -vim.opt.wrap = false --- when no textwidth is specified, automatically add at the end of a long line 3 --- characters before reaching the window edge. Will have no effect if textwidth is specified otherwise. --- Set to 0 to disable. -vim.opt.wrapmargin = 3 --- hide mode and serch count (displayed in lualine instead) -vim.opt.showmode = false +-- hide mode, displayed in lualine +-- vim.opt.showmode = false vim.opt.shortmess:append("S") +-- enable visual bell vim.opt.visualbell = true --- Editing + +-- Editing settings + vim.opt.autoindent = true -vim.opt.backspace = {"indent", "eol", "start"} -vim.opt.expandtab = false +vim.opt.backspace = { "indent", "eol", "start" } vim.opt.preserveindent = true +vim.opt.smartindent = true +vim.opt.breakindent = true +vim.opt.breakindentopt:append({ min = 20, shift = -2, sbr = ture, list = -1 }) +-- tab settings +vim.opt.expandtab = false vim.opt.shiftround = true vim.opt.shiftwidth = 0 vim.opt.tabstop = 4 vim.opt.softtabstop = -1 vim.opt.smarttab = true -vim.opt.smartindent = true -vim.opt.breakindent = true -vim.opt.breakindentopt:append({ min = 20, shift = -2, sbr = true, list = -1 }) -vim.opt.matchpairs:append({"<:>"}) +-- matching pairs of symbols +vim.opt.matchpairs:append({ "<:>" }) + + +-- Search settings --- Search vim.opt.hlsearch = true vim.opt.ignorecase = true -vim.opt.inccommand = "split" +vim.opt.inccommand = split vim.opt.incsearch = true vim.opt.smartcase = true --- Files + +-- Files settings + vim.opt.backup = false vim.opt.writebackup = false vim.opt.fileformat = "unix" @@ -91,25 +105,32 @@ vim.opt.fileencoding = "utf-8" vim.opt.undofile = true vim.opt.swapfile = true --- Performance -vim.opt.updatetime = 1000 -vim.opt.timeoutlen = 600 --- Mouse & Clipboard +-- Performance settings + +vim.opt.updatetime = 1000 +vim.opt.timeoutlen = 300 + + +-- Mouse and Clipboard settings + vim.opt.mouse = "a" vim.schedule(function() vim.opt.clipboard = "unnamedplus" end) --- Folding + +-- Folding settings + vim.opt.foldcolumn = "auto" vim.opt.foldmethod = "expr" vim.opt.foldexpr = "v:lua.vim.treesitter.foldexpr()" -vim.opt.foldlevel = 99 +vim.opt.foldlevel = 10 -- keep this many levels of folds open by default + + +-- Autocomplete settings --- Autocompletion vim.opt.autocomplete = false vim.opt.autocompletedelay = 0 vim.opt.autocompletetimeout = 0 -vim.opt.completeopt = {"menu", "menuone", "noinsert", "popup", "preview"} -vim.opt.completeitemalign = {"abbr", "kind", "menu"} +vim.opt.completeopt = { "menu", "menuone", "noinsert", "popup", "preview" } +vim.opt.completeitemalign = { "abbr", "kind", "menu" } vim.opt.completetimeout = 0 - diff --git a/lua/config/ui.lua b/lua/config/ui.lua index 14239df..1651abf 100644 --- a/lua/config/ui.lua +++ b/lua/config/ui.lua @@ -1,5 +1,6 @@ --[[ + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ @@ -25,16 +26,13 @@ | _/ /_____\__ \ || (_| | (__| < |_|/___| |___/\__\__,_|\___|_|\_\ - Neovim 0.12 configuration - (c) Frank Zechert 2026 + Neovim v0.12 configuration + (C) Frank Zechert 2026 ]] --- General UI settings applied across different parts of the neovim configuration vim.g.ui = { - backround = "dark", + background = "dark", flavour = "macchiato", - border = "single", - linebreak = "↘", listchars = { eol = "↵", tab = "⇥ ", @@ -49,9 +47,9 @@ vim.g.ui = { conceal = "⋯", nbsp = "␣", }, - textwidth = { - default = 120 - }, + linebreak = "↘", + windowborder = "single", + popupborder = "single", custom_highlights = function(colors, utils) return { whitespace = { fg = colors.overlay0 }, @@ -61,9 +59,6 @@ vim.g.ui = { } end, symbols = { - component_separators = { left = "│", right = "│" }, - section_separators = { left = "▒", right = "▒" }, - window = "", diagnostic = { prefix = "■", sign_error = "E", @@ -71,46 +66,5 @@ vim.g.ui = { sign_info = "I", sign_hint = "H", }, - git = { - signs = { - add = { text = "┃" }, - change = { text = "┃" }, - delete = { text = "_" }, - topdelete = { text = "‾" }, - changedelete = { text = "~" }, - untracked = { text = "┆" }, - }, - signs_staged = { - add = { text = "┃" }, - change = { text = "┃" }, - delete = { text = "_" }, - topdelete = { text = "‾" }, - changedelete = { text = "~" }, - untracked = { text = "┆" }, - }, - }, - todo_comments = { - error = { - icon = "", - }, - todo = { - icon = "", - }, - hack = { - icon = "", - }, - warn = { - icon = "", - }, - perf = { - icon = "󰾆", - }, - note = { - icon = "", - }, - test = { - icon = "󰙨", - }, - }, } } diff --git a/lua/plugins/todo-comments.lua b/lua/lsp/init.lua similarity index 69% rename from lua/plugins/todo-comments.lua rename to lua/lsp/init.lua index d5e56d2..c8b3060 100644 --- a/lua/plugins/todo-comments.lua +++ b/lua/lsp/init.lua @@ -1,5 +1,6 @@ --[[ + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ @@ -25,50 +26,55 @@ | _/ /_____\__ \ || (_| | (__| < |_|/___| |___/\__\__,_|\___|_|\_\ - Neovim 0.12 configuration - (c) Frank Zechert 2026 + Neovim v0.12 configuration + (C) Frank Zechert 2026 ]] +vim.pack.add({ + { src = "https://github.com/neovim/nvim-lspconfig" }, +}) -return { - { - "folke/todo-comments.nvim", - dependencies = { - { "nvim-lua/plenary.nvim" }, - }, - opts = { - signs = true, - sign_priority = 8, - keywords = { - FIX = { - icon = vim.g.ui.symbols.todo_comments.error.icon, - }, - TODO = { - icon = vim.g.ui.symbols.todo_comments.todo.icon, - }, - HACK = { - icon = vim.g.ui.symbols.todo_comments.hack.icon, - }, - WARN = { - icon = vim.g.ui.symbols.todo_comments.warn.icon, - }, - PERF = { - icon = vim.g.ui.symbols.todo_comments.perf.icon, - }, - NOTE = { - icon = vim.g.ui.symbols.todo_comments.note.icon, - }, - TEST = { - icon = vim.g.ui.symbols.todo_comments.test.icon, - }, +vim.lsp.config("lua_ls", { + on_init = function(client) + if client.workspace_folders then + local path = client.workspace_folders[1].name + if + path ~= vim.fn.stdpath("config") + and ( + vim.uv.fs_stat(path .. "/.luarc.json") + or vim.uv.fs_stat(path .. "/.luarc.jsonc") + ) + then + -- Path is not neovim's config folder and + -- the file .luarc.json or .luarc.jsonc exists + -- in the directory -> exit function and skip custom + -- configuration of the client below + return + end + end + + client.config.settings.Lua = vim.tbl_deep_extend("force", client.config.settings.Lua, { + runtime = { + -- neovim uses LuaJIT runtime + version = "LuaJIT", + -- find lua modules the same way neovim does + path = { + "lua/?.lua", + "lua/?/init.lua", + } }, - }, - config = function(_, opts) - local todocomments = require("todo-comments") - todocomments.setup(opts) - - vim.keymap.set("n", "]t", todocomments.jump_next, { desc = "Next TODO comment" }) - vim.keymap.set("n", "[t", todocomments.jump_prev, { desc = "Previous TODO comment" }) - vim.keymap.set("n", "ft", ":TodoTelescope" , { desc = "Find TODO comment" }) - end, + -- make the server aware of neovim runtime files + workspace = { + checkThirdParty = false, + library = { + vim.env.VIMRUNTIME, + -- for LSP settings type annotations + vim.api.nvim_get_runtime_file("lua/lspconfig", false)[1], + } + } + }) + end, + settings = { + Lua = {} } -} +}) +vim.lsp.enable({ "lua_ls" }) diff --git a/lua/plugins/catppuccin.lua b/lua/plugins/catppuccin.lua index dc9df28..1baccf1 100644 --- a/lua/plugins/catppuccin.lua +++ b/lua/plugins/catppuccin.lua @@ -1,5 +1,6 @@ --[[ + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ @@ -25,43 +26,36 @@ | _/ /_____\__ \ || (_| | (__| < |_|/___| |___/\__\__,_|\___|_|\_\ - Neovim 0.12 configuration - (c) Frank Zechert 2026 + Neovim v0.12 configuration + (C) Frank Zechert 2026 ]] -return { - { - "catppuccin/nvim", - name = "catppuccin", - main = "catppuccin", - priority = 1000, - lazy = false, - opts = { - flavour = vim.g.ui.flavour, - transparent_background = false, - float = { - transparent = false, - solid = false, - }, - term_colors = false, - dim_inactive = { - enabled = true, - shade = "dark", - percentage = 0.2, - }, - custom_highlights = function(colors) - local utils = require("catppuccin.utils.colors") - return vim.g.ui.custom_highlights(colors, utils) - end, - auto_integrations = true, - highlight = { - enable = true, - --additional_vim_regex_highlighting = false, - }, - }, - config = function(_, opts) - require("catppuccin").setup(opts) - vim.cmd.colorscheme("catppuccin") - end - } -} +vim.pack.add({ + { src = "https://github.com/catppuccin/nvim", name ="catppuccin" } +}) + +require("catppuccin").setup({ + flavour = vim.g.ui.flavour, + transparent_background = false, + float = { + transparent = false, + solid = false, + }, + term_colors = false, + dim_inactive = { + enabled = true, + shade = "dark", + percentage = 0.2, + }, + custom_highlights = function(colors) + local utils = require("catppuccin.utils.colors") + return vim.g.ui.custom_highlights(colors, utils) + end, + auto_integrations = true, + highlight = { + enable = true, + -- additional_vim_regex_highlighting = false, + }, +}) + +vim.cmd.colorscheme("catppuccin") diff --git a/lua/plugins/gitsigns.lua b/lua/plugins/gitsigns.lua deleted file mode 100644 index b9f39e2..0000000 --- a/lua/plugins/gitsigns.lua +++ /dev/null @@ -1,107 +0,0 @@ ---[[ - - -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠚⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠗⢀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣄⡉⠓⠦⣌⡙⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⢋⣡⠴⠚⢉⣠⣤⣀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣶⣿⣿⣿⣿⣿⣷⣦⣄⡉⠓⠦⣌⡙⠻⢿⣿⣿⣿⣿⣿⣿⡿⠟⢋⣡⠴⠚⢉⣠⣴⣾⣿⣿⣿⣿⣿⣶⣤ -⠀⠀⠀⠀⠀⠀⠀⠀⠐⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠓⠦⣌⡙⠻⠟⢋⣡⠴⠚⢉⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⠂ -⠀⠀⠀⠀⢀⣠⣴⣆⡈⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠃⠘⢉⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢁⣰⣦⣄⡀ -⠀⠀⠐⠾⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠷⠂ -⠀⢸⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⡇ -⠀⢸⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⡇ -⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⡆⢰⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠃⠘⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⡇⢸⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⡇⢸⠿⠛⠉ - - __ _ _ - / _|___ ___| |_ __ _ ___| | __ - | ||_ /____/ __| __/ _` |/ __| |/ / - | _/ /_____\__ \ || (_| | (__| < - |_|/___| |___/\__\__,_|\___|_|\_\ - - Neovim 0.12 configuration - (c) Frank Zechert 2026 -]] - -return { - { - "lewis6991/gitsigns.nvim", - opts = { - signs = vim.g.ui.symbols.git.signs, - signs_staged = vim.g.ui.symbols.git.signs_staged, - signs_staged_enable = true, - signcolumn = true, - numhl = false, - linehl = false, - word_diff = false, - attach_to_untracked = true, - current_line_blame = false, - current_line_blame_opts = { - virt_text = true, - virt_text_pos = 'eol', - delay = 1000, - ignore_whitespace = false, - virt_text_priority = 100, - use_focus = true, - }, - current_line_blame_formatter = ', - ', - blame_formatter = nil, - sign_priority = 6, - on_attach = function(bufnr) - local gitsigns = require("gitsigns") - - vim.keymap.set("n", "]c", function() - if vim.wo.diff then - vim.cmd.normal({ "]c", bang = true }) - else - gitsigns.nav_hunk("next") - end - end, { buffer = bufnr, desc = "Jump to Next Hunk" }) - vim.keymap.set("n", "[c", function() - if vim.wo.diff then - vim.cmd.normal({ "[c", bang = true }) - else - gitsigns.nav_hunk("prev") - end - end, { buffer = bufnr, desc = "Jump to Previous Hunk" }) - vim.keymap.set("n", "hs", gitsigns.stage_hunk, { buffer = bufnr, desc = "Stage Hunk" }) - vim.keymap.set("n", "hr", gitsigns.reset_hunk, { buffer = bufnr, desc = "Reset Hunk" }) - vim.keymap.set("v", "hs", function() - gitsigns.stage_hunk({vim .fn.line("."), vim.fn.line("v")}) - end, { buffer = bufnr, desc = "Stage Hunk" }) - vim.keymap.set("v", "hr", function() - gitsigns.stage_reset({vim .fn.line("."), vim.fn.line("v")}) - end, { buffer = bufnr, desc = "Reset Hunk" }) - vim.keymap.set("n", "hS", gitsigns.stage_buffer, { buffer = bufnr, desc = "Stage Buffer" }) - vim.keymap.set("n", "hR", gitsigns.stage_buffer, { buffer = bufnr, desc = "Reset Buffer" }) - vim.keymap.set("n", "hp", gitsigns.preview_hunk, { buffer = bufnr, desc = "Preview Hunk" }) - vim.keymap.set("n", "hi", gitsigns.preview_hunk_inline, { buffer = bufnr, desc = "Preview Hunk Inline" }) - vim.keymap.set("n", "hb", function() - gitsigns.blame_line({ full = true }) - end, { buffer = bufnr, desc = "Blame Line" }) - vim.keymap.set("n", "tb", gitsigns.toggle_current_line_blame, { buffer = bufnr, desc = "Toggle Blame Line" }) - vim.keymap.set("n", "hB", function() - require("gitsigns").blame() - end, { buffer = bufnr, desc = "Blame Split Window" }) - vim.keymap.set("n", "hd", gitsigns.diffthis, { buffer = bufnr, desc = "Diff This Against INDEX" }) - vim.keymap.set("n", "hD", function() - gitsigns.diffthis("~") - end, { buffer = bufnr, desc = "Diff This Against HEAD" }) - vim.keymap.set("n", "hq", gitsigns.setqflist, { buffer = bufnr, desc = "Buffer Git Hunks QFList" }) - vim.keymap.set("n", "hQ", function() - gitsigns.setqflist("all") - end, { buffer = bufnr, desc = "Project Git Hunks QFList" }) - vim.keymap.set("n", "tw", gitsigns.toggle_word_diff, { buffer = bufnr, desc = "Toggle Word Diff" }) - vim.keymap.set({"o", "x"}, "ih", gitsigns.select_hunk, { desc = "Select Hunk" }) - end - } - } -} - diff --git a/lua/config/treesitter.lua b/lua/plugins/init.lua similarity index 85% rename from lua/config/treesitter.lua rename to lua/plugins/init.lua index 3353bb2..33980e7 100644 --- a/lua/config/treesitter.lua +++ b/lua/plugins/init.lua @@ -1,5 +1,6 @@ --[[ + ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ ⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ @@ -25,27 +26,8 @@ | _/ /_____\__ \ || (_| | (__| < |_|/___| |___/\__\__,_|\___|_|\_\ - Neovim 0.12 configuration - (c) Frank Zechert 2026 + Neovim v0.12 configuration + (C) Frank Zechert 2026 ]] -local enabled_ft = { - "bash", -} - -local parser_ft_map = { - -- parser = { list of filetypes } - bash = { "bash", "template" }, -} - --- Force enable syntax if it is not working automatically -vim.api.nvim_create_autocmd("FileType", { - pattern = enabled_ft, - callback = function() - vim.treesitter.start() - end, -}) - -for parser, ft in pairs(parser_ft_map) do - vim.treesitter.language.register(parser, ft) -end +require("plugins/catppuccin") diff --git a/lua/plugins/lualine.lua b/lua/plugins/lualine.lua deleted file mode 100644 index f163573..0000000 --- a/lua/plugins/lualine.lua +++ /dev/null @@ -1,155 +0,0 @@ ---[[ - -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠚⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠗⢀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣄⡉⠓⠦⣌⡙⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⢋⣡⠴⠚⢉⣠⣤⣀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣶⣿⣿⣿⣿⣿⣷⣦⣄⡉⠓⠦⣌⡙⠻⢿⣿⣿⣿⣿⣿⣿⡿⠟⢋⣡⠴⠚⢉⣠⣴⣾⣿⣿⣿⣿⣿⣶⣤ -⠀⠀⠀⠀⠀⠀⠀⠀⠐⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠓⠦⣌⡙⠻⠟⢋⣡⠴⠚⢉⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⠂ -⠀⠀⠀⠀⢀⣠⣴⣆⡈⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠃⠘⢉⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢁⣰⣦⣄⡀ -⠀⠀⠐⠾⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠷⠂ -⠀⢸⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⡇ -⠀⢸⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⡇ -⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⡆⢰⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠃⠘⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⡇⢸⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⡇⢸⠿⠛⠉ - - __ _ _ - / _|___ ___| |_ __ _ ___| | __ - | ||_ /____/ __| __/ _` |/ __| |/ / - | _/ /_____\__ \ || (_| | (__| < - |_|/___| |___/\__\__,_|\___|_|\_\ - - Neovim 0.12 configuration - (c) Frank Zechert 2026 -]] - -local function expandtabs() - if not vim.bo.expandtab then - return string.format("%s %d", vim.g.ui.listchars.leadtab, vim.bo.tabstop) - else - local width = vim.bo.shiftwidth - if width == 0 then - width = vim.bo.tabstop - end - return string.format("%s %d", vim.g.ui.listchars.nbsp, width) - end -end - -local function windownumber() - return string.format("%s %s", vim.g.ui.symbols.window, vim.fn.winnr()) -end - -local function treesitter_status() - local ok, parser = pcall(vim.treesitter.get_parser, 0) - if not ok or not parser then - return "T̅" - else - return "T" - end -end - -return { - { - "nvim-lualine/lualine.nvim", - dependencies = { - { "nvim-tree/nvim-web-devicons" }, - }, - lazy = false, - opts = { - options = { - component_separators = vim.g.ui.symbols.component_separators, - section_separators = vim.g.ui.symbols.section_separators, - globalstatus = false, - refresh = { - refresh_time = 33, -- ~30 fps - } - }, - sections = { - lualine_a = { "mode" }, - lualine_b = { "searchcount", "selectioncount" }, - lualine_c = { - { "filename", file_status = true, newfile_status = true, path = 1 }, - }, - lualine_x = { - "encoding", - { "fileformat", icons_enabled = true, symbols = { unix = "LF", dos = "CRLF", mac = "CR" } }, - expandtabs, - "filesize" - }, - lualine_y = {}, - lualine_z = { "location", "progress" }, - }, - inactive_sections = { - lualine_a = {}, - lualine_b = {}, - lualine_c = { - { "filename", file_status = true, newfile_status = true, path = 1 }, - }, - lualine_x = { - "encoding", - { "fileformat", icons_enabled = true, symbols = { unix = "LF", dos = "CRLF", mac = "CR" } }, - expandtabs, - "filesize", - }, - lualine_y = {}, - lualine_z = { "location", "progress" }, - }, - tabline = { - lualine_a = { - { "buffers", mode = 2, use_mode_colors = true }, - }, - lualine_b = {}, - lualine_c = {}, - lualine_x = {}, - lualine_y = {}, - lualine_z = { - { "tabs", mode = 0, use_mode_colors = true }, - }, - }, - winbar = { - lualine_a = { windownumber }, - lualine_b = { "filename", "filetype" }, - lualine_c = { "diagnostics" }, - lualine_x = { treesitter_status }, - lualine_y = { "branch", "diff" }, - lualine_z = {}, - }, - inactive_winbar = { - lualine_a = { windownumber }, - lualine_b = {}, - lualine_c = {}, - lualine_x = {}, - lualine_y = {}, - lualine_z = {}, - } - }, - keys = { - { "b1", ":LualineBuffersJump! 1", desc = "Show Buffer 1" }, - { "b2", ":LualineBuffersJump! 2", desc = "Show Buffer 2" }, - { "b3", ":LualineBuffersJump! 3", desc = "Show Buffer 3" }, - { "b4", ":LualineBuffersJump! 4", desc = "Show Buffer 4" }, - { "b5", ":LualineBuffersJump! 5", desc = "Show Buffer 5" }, - { "b6", ":LualineBuffersJump! 6", desc = "Show Buffer 6" }, - { "b7", ":LualineBuffersJump! 7", desc = "Show Buffer 7" }, - { "b8", ":LualineBuffersJump! 8", desc = "Show Buffer 8" }, - { "b9", ":LualineBuffersJump! 9", desc = "Show Buffer 9" }, - { "b0", ":LualineBuffersJump! 10", desc = "Show Buffer 10" }, - { - "bb", - function() - local index = tonumber(vim.fn.input("Jump to Buffer: ")) - if index then - vim.cmd("LualineBuffersJump! " .. index) - end - end, - desc = "Show Buffer ?" - }, - } - } -} diff --git a/lua/plugins/telescope.lua b/lua/plugins/telescope.lua deleted file mode 100644 index 2a59874..0000000 --- a/lua/plugins/telescope.lua +++ /dev/null @@ -1,147 +0,0 @@ ---[[ - -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠚⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠗⢀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣄⡉⠓⠦⣌⡙⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⢋⣡⠴⠚⢉⣠⣤⣀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣶⣿⣿⣿⣿⣿⣷⣦⣄⡉⠓⠦⣌⡙⠻⢿⣿⣿⣿⣿⣿⣿⡿⠟⢋⣡⠴⠚⢉⣠⣴⣾⣿⣿⣿⣿⣿⣶⣤ -⠀⠀⠀⠀⠀⠀⠀⠀⠐⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠓⠦⣌⡙⠻⠟⢋⣡⠴⠚⢉⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⠂ -⠀⠀⠀⠀⢀⣠⣴⣆⡈⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠃⠘⢉⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢁⣰⣦⣄⡀ -⠀⠀⠐⠾⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠷⠂ -⠀⢸⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⡇ -⠀⢸⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⡇ -⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⡆⢰⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠃⠘⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⡇⢸⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⡇⢸⠿⠛⠉ - - __ _ _ - / _|___ ___| |_ __ _ ___| | __ - | ||_ /____/ __| __/ _` |/ __| |/ / - | _/ /_____\__ \ || (_| | (__| < - |_|/___| |___/\__\__,_|\___|_|\_\ - - Neovim 0.12 configuration - (c) Frnk Zechert 2026 -]] - -return { - { - "nvim-telescope/telescope.nvim", - version = "*", - dependencies = { - { "nvim-lua/plenary.nvim" }, - { "nvim-telescope/telescope-fzf-native.nvim", build = "make" }, - { "nvim-telescope/telescope-ui-select.nvim" }, - }, - opts = { - defaults = { - mappings = { - i = { - [""] = "which_key", - } - } - }, - pickers = { - }, - extensions = { - fzf = { - fuzzy = true, - override_generic_sorter = true, - override_file_sorter = true, - case_mode = "smart_case", - } - }, - }, - config = function(_, opts) - local telescope = require("telescope") - local builtin = require("telescope.builtin") - local actions = require("telescope.actions") - local config = require("telescope.config") - - -- find in hidden files and folders, but never inside the .git folder - local vimgrep_args = { unpack(config.values.vimgrep_arguments) } - table.insert(vimgrep_args, "--hidden") - table.insert(vimgrep_args, "--glob") - table.insert(vimgrep_args, "!**/.git/*") - - opts = vim.tbl_deep_extend("force", opts, { - defaults = { - vimgrep_arguments = vimgrep_args, - }, - pickers = { - buffers = { - mappings = { - i = { - [""] = actions.delete_buffer + actions.move_to_top - } - } - } - }, - extensions = { - ["ui-select"] = { - require("telescope.themes").get_cursor({}) - } - } - }) - telescope.setup(opts) - telescope.load_extension("ui-select") - telescope.load_extension("fzf") - - local function is_git_repo() - vim.fn.system("git rev-parse --is-inside-work-tree") - return vim.v.shell_error == 0 - end - - local function get_git_root() - local dot_git_path = vim.fn.finddir(".git", ".;") - return vim.fn.fnamemodify(dot_git_path, ":h") - end - - local function live_grep_in_project(opts) - local opts = opts or {} - if is_git_repo() then - opts.cwd = get_git_root() - end - builtin.live_grep(opts) - end - - local function find_in_project(opts) - local opts = opts or {} - if is_git_repo() then - opts.cwd = get_git_root() - end - builtin.find_files(opts) - end - - -- Pickers - vim.keymap.set("n", "ff", find_in_project, { desc = "Find Files in Project" }) - vim.keymap.set("n", "fs", live_grep_in_project, { desc = "Live Grep in Project" }) - vim.keymap.set("n", "fS", function() - live_grep_in_project({grep_open_files = true, prompt_title = "Live Grep in Open Files"}) - end, { desc = "Live Grep in Open Files" }) - vim.keymap.set({"n", "v"}, "fw", builtin.grep_string, { desc = "Find Word" }) - vim.keymap.set("n", "", builtin.buffers, { desc = "Find Buffers" }) - vim.keymap.set("n", "fr", builtin.oldfiles, { desc = "Find Recent Files" }) - vim.keymap.set("n", "fh", builtin.help_tags, { desc = "Find Help" }) - vim.keymap.set("n", "fq", builtin.quickfix, { desc = "Quickfix" }) - vim.keymap.set("n", "fQ", builtin.quickfixhistory, { desc = "Quickfix History" }) - vim.keymap.set("n", "fT", builtin.filetypes, { desc = "Show Filetypes" }) - vim.keymap.set("n", "fH", builtin.quickfixhistory, { desc = "Find Highlights" }) - vim.keymap.set("n", "fc", builtin.quickfixhistory, { desc = "Find Resume" }) - vim.keymap.set("n", "fd", builtin.diagnostics, { desc = "Find Diagnostics" }) - vim.keymap.set("n", "fC", builtin.commands, { desc = "Find Commands" }) - vim.keymap.set("n", "f+", builtin.builtin, { desc = "All Pickers" }) - -- Git Pickers - vim.keymap.set("n", "fgc", builtin.git_commits, { desc = "Git Commits" }) - vim.keymap.set("n", "fgC", builtin.git_bcommits, { desc = "Git Buffer Commits" }) - vim.keymap.set("n", "fgb", builtin.git_branches, { desc = "Git Branches" }) - vim.keymap.set("n", "fgs", builtin.git_status, { desc = "Git Status" }) - vim.keymap.set("n", "fgS", builtin.git_stash, { desc = "Git Stash" }) - end - } -} diff --git a/lua/plugins/trouble.lua b/lua/plugins/trouble.lua deleted file mode 100644 index 6664b19..0000000 --- a/lua/plugins/trouble.lua +++ /dev/null @@ -1,78 +0,0 @@ ---[[ - -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠚⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠗⢀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣄⡉⠓⠦⣌⡙⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⢋⣡⠴⠚⢉⣠⣤⣀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣶⣿⣿⣿⣿⣿⣷⣦⣄⡉⠓⠦⣌⡙⠻⢿⣿⣿⣿⣿⣿⣿⡿⠟⢋⣡⠴⠚⢉⣠⣴⣾⣿⣿⣿⣿⣿⣶⣤ -⠀⠀⠀⠀⠀⠀⠀⠀⠐⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠓⠦⣌⡙⠻⠟⢋⣡⠴⠚⢉⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⠂ -⠀⠀⠀⠀⢀⣠⣴⣆⡈⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠃⠘⢉⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢁⣰⣦⣄⡀ -⠀⠀⠐⠾⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠷⠂ -⠀⢸⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⡇ -⠀⢸⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⡇ -⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⡆⢰⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠃⠘⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⡇⢸⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⡇⢸⠿⠛⠉ - - __ _ _ - / _|___ ___| |_ __ _ ___| | __ - | ||_ /____/ __| __/ _` |/ __| |/ / - | _/ /_____\__ \ || (_| | (__| < - |_|/___| |___/\__\__,_|\___|_|\_\ - - Neovim 0.12 configuration - (c) Frank Zechert 2026 -]] - -return { - { - "folke/trouble.nvim", - dependencies = { - { "nvim-tree/nvim-web-devicons" }, - }, - opts = { - }, - keys = { - { - "xx", - "Trouble diagnostics toggle", - desc = "Diagnostics", - }, - { - "xX", - "Trouble diagnostics toggle filter.buf=0", - desc = "Buffer Diagnostics", - }, - { - "xs", - "Trouble symbols toggle focus=false", - desc = "Symbols", - }, - { - "xl", - "Trouble lsp toggle focus=false win.position=right", - desc = "LSP Definitions / references / ...", - }, - { - "xL", - "Trouble loclist toggle", - desc = "Location List", - }, - { - "xQ", - "Trouble qflist toggle", - desc = "Quickfix List", - }, - { - "xt", - "Trouble todo", - desc = "Todo List", - }, - }, - } -} diff --git a/lua/plugins/whichkey.lua b/lua/plugins/whichkey.lua deleted file mode 100644 index 2e0f9ac..0000000 --- a/lua/plugins/whichkey.lua +++ /dev/null @@ -1,62 +0,0 @@ ---[[ - -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣷⣦⣄⡀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⢀⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⡀⠚⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠗⢀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣀⣤⣄⡉⠓⠦⣌⡙⠻⢿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⣿⡿⠟⢋⣡⠴⠚⢉⣠⣤⣀ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⣤⣶⣿⣿⣿⣿⣿⣷⣦⣄⡉⠓⠦⣌⡙⠻⢿⣿⣿⣿⣿⣿⣿⡿⠟⢋⣡⠴⠚⢉⣠⣴⣾⣿⣿⣿⣿⣿⣶⣤ -⠀⠀⠀⠀⠀⠀⠀⠀⠐⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠓⠦⣌⡙⠻⠟⢋⣡⠴⠚⢉⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⠂ -⠀⠀⠀⠀⢀⣠⣴⣆⡈⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠃⠘⢉⣠⣴⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢁⣰⣦⣄⡀ -⠀⠀⠐⠾⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠷⠂ -⠀⢸⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⡇ -⠀⢸⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⣦⣄⡉⠛⠿⠿⠛⢉⣠⣴⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⡇ -⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠻⢿⣿⣷⡆⢰⣾⣿⡿⠟⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣌⡙⠃⠘⢋⣡⣴⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⣿⣷⣾⣿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⠛⠿⣿⣿⣿⣿⠿⠛⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⣿⣷⣦⣄⡉⢉⣠⣴⣾⣿⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⣿⣿⣿⣿⡇⢸⣿⣿⣿⣿⠿⠛⠉ -⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠀⠉⠛⠿⡇⢸⠿⠛⠉ - - __ _ _ - / _|___ ___| |_ __ _ ___| | __ - | ||_ /____/ __| __/ _` |/ __| |/ / - | _/ /_____\__ \ || (_| | (__| < - |_|/___| |___/\__\__,_|\___|_|\_\ - - Neovim 0.12 configuration - (c) Frank Zechert 2026 -]] - -return { - { - "folke/which-key.nvim", - dependencies = { - { "nvim-mini/mini.icons" }, - { "nvim-tree/nvim-web-devicons" }, - }, - event = "VeryLazy", - opts = { - preset = "modern", - spec = { - { "b", group = "Buffers" }, - { "f", group = "Find (Telescope)" }, - { "fg", group = "Git (Telescope)" }, - { "h", group = "Git Hunks" }, - { "t", group = "Toggle" }, - { "x", group = "Trouble" }, - { "gr", group = "LSP Actions" }, - }, - }, - keys = { - { - "?", - function() - require("which-key").show({ global = false }) - end, - desc = "Buffer Local Keymaps" - }, - } - } -} diff --git a/nvim-pack-lock.json b/nvim-pack-lock.json new file mode 100644 index 0000000..2402d8b --- /dev/null +++ b/nvim-pack-lock.json @@ -0,0 +1,12 @@ +{ + "plugins": { + "catppuccin": { + "rev": "e068ab5f8261f23f6f71ffd8791ae40315b77b9c", + "src": "https://github.com/catppuccin/nvim" + }, + "nvim-lspconfig": { + "rev": "bfcc0171a43f22afa61d927ffe9fcb6cb85dc99e", + "src": "https://github.com/neovim/nvim-lspconfig" + } + } +} diff --git a/packages.txt b/packages.txt index 28d9274..cac46b8 100644 --- a/packages.txt +++ b/packages.txt @@ -4,3 +4,4 @@ fzf ripgrep fd wl-clipboard +lua-language-server