From f224c46a1da9cd052af9f32eb11d4ffde9ea2411 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sun, 21 Jan 2024 01:41:07 +0100 Subject: [PATCH 01/96] kitty scrollback and better firenvim --- lua/custom/chadrc.lua | 2 +- lua/custom/init.lua | 3 ++- lua/custom/plugins.lua | 22 +++++++++++++++++++++- 3 files changed, 24 insertions(+), 3 deletions(-) diff --git a/lua/custom/chadrc.lua b/lua/custom/chadrc.lua index 73175d9..074bd3e 100644 --- a/lua/custom/chadrc.lua +++ b/lua/custom/chadrc.lua @@ -5,7 +5,7 @@ local M = {} local highlights = require "custom.highlights" M.ui = { - theme = "chadracula", + theme = "kanagawa", theme_toggle = { "kanagawa", "chadracula" }, hl_override = highlights.override, diff --git a/lua/custom/init.lua b/lua/custom/init.lua index 75bd82e..86b6e81 100644 --- a/lua/custom/init.lua +++ b/lua/custom/init.lua @@ -67,7 +67,7 @@ opt.foldlevel = 10000 -- start with all folds open -- Editor UI -- === -vim.o.guifont = "FiraCode Nerd Font:h15" +vim.o.guifont = "FiraCode Nerd Font:h27" opt.termguicolors = true opt.shortmess = "xsTOInfFitloCaAs" opt.showmode = true -- Show mode in cmd window @@ -83,6 +83,7 @@ opt.laststatus = 3 -- Always show laststatus if vim.g.started_by_firenvim == true then opt.showtabline = 1 -- Don't show tabline in firenvim, unless multitab opt.laststatus = 1 -- Don't show laststatus in firenvim + opt.wrap = true end opt.helpheight = 0 -- Disable help window resizing diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 2b8222f..b216061 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -461,7 +461,7 @@ local plugins = { [".*"] = { filename = "/tmp/{hostname}_{pathname%10}.{extension%5}", cmdline = "firenvim", - takeover = "never", -- activate manually () + takeover = "never", -- can't open it with never at all? }, }, } @@ -674,6 +674,26 @@ local plugins = { } end, }, + { + "mikesmithgh/kitty-scrollback.nvim", + enabled = true, + lazy = true, + cmd = { "KittyScrollbackGenerateKittens", "KittyScrollbackCheckHealth" }, + event = { "User KittyScrollbackLaunch" }, + -- version = '*', -- latest stable version, may have breaking changes if major version changed + -- version = '^3.0.0', -- pin major version, include fixes and features that do not have breaking changes + config = function() + require("kitty-scrollback").setup { + myconfig = function() + return { keymaps_enabled = false } + end, + } + end, + }, + { + "hrsh7th/nvim-cmp", + enabled = not vim.g.started_by_firenvim, + }, } return plugins From e42208d5218a7ec5b3c81899036f1008896ac128 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sun, 21 Jan 2024 01:56:44 +0100 Subject: [PATCH 02/96] icon picker --- lua/custom/plugins.lua | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index b216061..3ff8a59 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -617,8 +617,8 @@ local plugins = { lazy = false, cmd = { "TSJJoin", "TSJSplit" }, keys = { - { "k", "TSJJoin" }, - { "S", "TSJSplit" }, + { "J", "TSJJoin" }, + { "S", "TSJSplit" }, }, }, { @@ -694,6 +694,17 @@ local plugins = { "hrsh7th/nvim-cmp", enabled = not vim.g.started_by_firenvim, }, + { + "ziontee113/icon-picker.nvim", + keys = { + { "", "IconPickerNormal", desc = "pick icon" }, + { "y", "IconPickerYank", desc = "yank icon" }, + }, + cmd = { "IconPickerInsert", "IconPickerYank", "IconPickerNormal" }, + config = function() + require("icon-picker").setup { disable_legacy_commands = true } + end, + }, } return plugins From d4f5cddc72db5aba93d132768fbb02b6a1738eca Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sun, 21 Jan 2024 02:07:56 +0100 Subject: [PATCH 03/96] split join replace --- lua/custom/mappings.lua | 18 ++++++++++-------- lua/custom/plugins.lua | 4 ++-- 2 files changed, 12 insertions(+), 10 deletions(-) diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index fdbc0f9..222ef80 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -40,7 +40,7 @@ M.disabled = { ["td"] = "", ["wk"] = "", ["#"] = "", - ["?"] = "", + ["J"] = "", }, t = { [""] = "", @@ -49,6 +49,7 @@ M.disabled = { ["#"] = "", ["?"] = "", ["/"] = "", + ["J"] = "", }, } @@ -334,15 +335,16 @@ M.edit = { plugin = false, n = { -- easy newline - ["OO"] = { "O", "insert a line above", opts = { nowait = false } }, - ["oo"] = { "o", "insert a line below", opts = { nowait = false } }, + ["OO"] = { "O", "insert a line above"}, + ["oo"] = { "o", "insert a line below"}, + + -- substitute (change hovered/selection with insert mode) + -- normally, this is s, but that is leaps binding now + ["s"] = { "s", "replace with insert mode"}, -- split and join lines - -- "J" for join is defaul - ["S"] = { - "il", - "split line", - }, + [""] = { "join", "join lines" }, + [""] = { "il", "split line", }, -- do something useful with the arrows [""] = { " move-2", "Move line up", opts = { expr = true } }, diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 3ff8a59..a6741a0 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -617,8 +617,8 @@ local plugins = { lazy = false, cmd = { "TSJJoin", "TSJSplit" }, keys = { - { "J", "TSJJoin" }, - { "S", "TSJSplit" }, + { "", "TSJJoin" }, + { "", "TSJSplit" }, }, }, { From d570e1eb33fdda1e61935e47ee8edd6ce8adebb1 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sun, 21 Jan 2024 02:20:47 +0100 Subject: [PATCH 04/96] line indent updown stuff --- lua/custom/mappings.lua | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index 222ef80..92e7134 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -335,22 +335,22 @@ M.edit = { plugin = false, n = { -- easy newline - ["OO"] = { "O", "insert a line above"}, - ["oo"] = { "o", "insert a line below"}, + ["OO"] = { "O", "insert a line above" }, + ["oo"] = { "o", "insert a line below" }, -- substitute (change hovered/selection with insert mode) -- normally, this is s, but that is leaps binding now - ["s"] = { "s", "replace with insert mode"}, + ["s"] = { "s", "replace with insert mode" }, -- split and join lines [""] = { "join", "join lines" }, - [""] = { "il", "split line", }, + [""] = { "il", "split line" }, -- do something useful with the arrows - [""] = { " move-2", "Move line up", opts = { expr = true } }, - [""] = { " move+", "Move line down", opts = { expr = true } }, - [""] = { " << ", "Less indentation", opts = { expr = true } }, - [""] = { " >> ", "More indentation", opts = { expr = true } }, + [""] = { " move-2", "Move line up" }, + [""] = { " move+", "Move line down" }, + [""] = { "<<", "Less indentation" }, + [""] = { ">>", "More indentation" }, -- format with conform ["ff"] = { @@ -373,13 +373,14 @@ M.edit = { ["z="] = { "Telescope spell_suggest", "Spell suggest" }, }, v = { + -- NOTE: I would love to know why these commands work, they seem really + -- crazy. + [""] = { ":move'<-2gv=gv", "Move lines up", opts = { silent = true } }, + [""] = { ":move'>+gv=gv", "Move lines down", opts = { silent = true } }, [""] = { ""] = { ">gv", "More indentation" }, }, - x = { - [""] = { "move'<-2gv=gv", "Move line up", opts = { expr = true } }, - [""] = { "move'<-2gv=gv", "Move line down", opts = { expr = true } }, - }, + x = {}, t = { --big move [""] = { "", "big step down" }, From e56baebc5b4d7abb907527442e586c851ffdb113 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sun, 21 Jan 2024 18:56:32 +0100 Subject: [PATCH 05/96] extra mapping for nvimtree --- lua/custom/mappings.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index 92e7134..9016f78 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -275,6 +275,7 @@ M.nvimtree = { -- toggle [""] = { " NvimTreeToggle ", "Toggle nvimtree" }, [""] = { " NvimTreeToggle ", "Toggle nvimtree" }, + ["tf"] = { " NvimTreeToggle ", "Toggle nvimtree" }, -- focus ["e"] = { " NvimTreeFocus ", "Focus nvimtree" }, From ff9cb1a983aebfaad346288b473ebc61e1e0bebd Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sun, 21 Jan 2024 20:13:40 +0100 Subject: [PATCH 06/96] note colors and highlights --- lua/custom/plugins.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index a6741a0..aa9a7f8 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -216,12 +216,12 @@ local plugins = { -- signs = false, -- configure signs for some keywords individually }, TODO = { icon = " ", color = "info" }, - HACK = { icon = " ", color = "warning" }, - SECURITY = { icon = "󰒃 ", color = "warning" }, + HACK = { icon = " ", color = "#ff33ff" }, + SECURITY = { icon = "󰒃 ", color = "#ff6600" }, WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } }, PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } }, - NOTE = { icon = " ", color = "hint", alt = { "INFO" } }, - TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } }, + NOTE = { icon = "", color = "hint", alt = { "INFO" } }, + TEST = { icon = "⏲ ", color = "#e6e600", alt = { "TESTING", "PASSED", "FAILED" } }, }, }, }, @@ -697,8 +697,8 @@ local plugins = { { "ziontee113/icon-picker.nvim", keys = { - { "", "IconPickerNormal", desc = "pick icon" }, - { "y", "IconPickerYank", desc = "yank icon" }, + { "", "IconPickerNormal", desc = "pick icon" }, + { "y", "IconPickerYank", desc = "yank icon" }, }, cmd = { "IconPickerInsert", "IconPickerYank", "IconPickerNormal" }, config = function() From 1e97e6b64ee14f3aba9d083b048f455de00e673e Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sun, 21 Jan 2024 20:30:59 +0100 Subject: [PATCH 07/96] todo-comments colors and icons --- lua/custom/plugins.lua | 24 +++++++++++++++++------- 1 file changed, 17 insertions(+), 7 deletions(-) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index aa9a7f8..3a43484 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -213,15 +213,25 @@ local plugins = { icon = " ", -- icon used for the sign, and in search results color = "error", -- can be a hex color, or a named color (see below) alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords - -- signs = false, -- configure signs for some keywords individually }, - TODO = { icon = " ", color = "info" }, - HACK = { icon = " ", color = "#ff33ff" }, - SECURITY = { icon = "󰒃 ", color = "#ff6600" }, + TODO = { icon = " ", color = "todo" }, + HACK = { icon = " ", color = "hack" }, + SECURITY = { icon = "󰒃 ", color = "security" }, WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } }, - PERF = { icon = " ", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } }, - NOTE = { icon = "", color = "hint", alt = { "INFO" } }, - TEST = { icon = "⏲ ", color = "#e6e600", alt = { "TESTING", "PASSED", "FAILED" } }, + PERF = { icon = " ", color = "perf", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } }, + NOTE = { icon = " ", color = "hint", alt = { "INFO" } }, + TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } }, + }, + colors = { + error = { "DiagnosticError", "ErrorMsg", "#DC2626" }, + warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" }, + todo = { "DiagnosticTodo", "#80e64d" }, + hint = { "DiagnosticHint", "#10B981" }, + hack = { "DiagnosticHack", "#FF33FF" }, + security = { "DiagnosticSecurity", "#FF6600" }, + default = { "Identifier", "#7C3AED" }, + test = { "DiagnosticTest", "#E6E600" }, + perf = { "DiagnosticPerf", "#9999ff" }, }, }, }, From 47b025520922ac010b06d36c99fed0eac5d1641d Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sun, 21 Jan 2024 21:53:32 +0100 Subject: [PATCH 08/96] better term maps --- lua/custom/mappings.lua | 64 ++++++++++++++++++++++++++++++++++------- 1 file changed, 54 insertions(+), 10 deletions(-) diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index 9016f78..8df6cb5 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -225,45 +225,89 @@ M.toggleterm = { plugin = true, n = { [""] = { - "ToggleTerm direction=float", + "exe v:count1 \"ToggleTerm direction=float\"", "toggle terminal", }, [""] = { - "ToggleTerm direction=float", + "exe v:count1 \"ToggleTerm direction=float\"", "toggle terminal", }, [""] = { - "ToggleTerm direction=tab", + "exe v:count1 \"ToggleTerm direction=tab\"", "toggle terminal", }, [""] = { - "ToggleTerm direction=horizontal", + "exe v:count1 \"ToggleTerm direction=horizontal\"", "toggle terminal", }, [""] = { - "ToggleTerm direction=vertical", + "exe v:count1 \"ToggleTerm direction=vertical\"", + "toggle terminal", + }, + }, + i = { + [""] = { + "exe v:count1 \"ToggleTerm direction=float\"", + "toggle terminal", + }, + [""] = { + "exe v:count1 \"ToggleTerm direction=float\"", + "toggle terminal", + }, + [""] = { + "exe v:count1 \"ToggleTerm direction=tab\"", + "toggle terminal", + }, + [""] = { + "exe v:count1 \"ToggleTerm direction=horizontal\"", + "toggle terminal", + }, + [""] = { + "exe v:count1 \"ToggleTerm direction=vertical\"", "toggle terminal", }, }, t = { [""] = { - "ToggleTerm direction=float", + "exe v:count1 \"ToggleTerm direction=float\"", "toggle terminal", }, [""] = { - "ToggleTerm direction=float", + "exe v:count1 \"ToggleTerm direction=float\"", "toggle terminal", }, [""] = { - "ToggleTerm direction=tab", + "exe v:count1 \"ToggleTerm direction=tab\"", "toggle terminal", }, [""] = { - "ToggleTerm direction=horizontal", + "exe v:count1 \"ToggleTerm direction=horizontal\"", "toggle terminal", }, [""] = { - "ToggleTerm direction=vertical", + "exe v:count1 \"ToggleTerm direction=vertical\"", + "toggle terminal", + }, + }, + x = { + [""] = { + "exe v:count1 \"ToggleTerm direction=float\"", + "toggle terminal", + }, + [""] = { + "exe v:count1 \"ToggleTerm direction=float\"", + "toggle terminal", + }, + [""] = { + "exe v:count1 \"ToggleTerm direction=tab\"", + "toggle terminal", + }, + [""] = { + "exe v:count1 \"ToggleTerm direction=horizontal\"", + "toggle terminal", + }, + [""] = { + "exe v:count1 \"ToggleTerm direction=vertical\"", "toggle terminal", }, }, From 7de6f819ef09a332c078e621329cf8e4cfcd6963 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sun, 21 Jan 2024 22:10:14 +0100 Subject: [PATCH 09/96] split and join remap --- lua/custom/mappings.lua | 4 ++-- lua/custom/plugins.lua | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index 8df6cb5..f160224 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -388,8 +388,8 @@ M.edit = { ["s"] = { "s", "replace with insert mode" }, -- split and join lines - [""] = { "join", "join lines" }, - [""] = { "il", "split line" }, + [""] = { "join", "join lines" }, + [""] = { "il", "split line" }, -- do something useful with the arrows [""] = { " move-2", "Move line up" }, diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 3a43484..a8ee7c6 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -627,8 +627,8 @@ local plugins = { lazy = false, cmd = { "TSJJoin", "TSJSplit" }, keys = { - { "", "TSJJoin" }, - { "", "TSJSplit" }, + { "", "TSJJoin" }, + { "", "TSJSplit" }, }, }, { From d7b22ff55be553f51028cf610b599a2f09be5692 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sun, 21 Jan 2024 22:26:37 +0100 Subject: [PATCH 10/96] join fixes --- lua/custom/mappings.lua | 6 ++++-- lua/custom/plugins.lua | 4 ++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index f160224..e6047d0 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -1,4 +1,5 @@ ---@type MappingsTable + local M = {} -- NOTE: The mappings here are case sensitive!!! Removing a specific default @@ -388,8 +389,9 @@ M.edit = { ["s"] = { "s", "replace with insert mode" }, -- split and join lines - [""] = { "join", "join lines" }, - [""] = { "il", "split line" }, + ["J"] = { "j" }, + [""] = { "join", "join lines" }, + [""] = { "il", "split line" }, -- do something useful with the arrows [""] = { " move-2", "Move line up" }, diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index a8ee7c6..c39c529 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -627,8 +627,8 @@ local plugins = { lazy = false, cmd = { "TSJJoin", "TSJSplit" }, keys = { - { "", "TSJJoin" }, - { "", "TSJSplit" }, + { "", "TSJJoin" }, + { "", "TSJSplit" }, }, }, { From 60ad7868620aac4f6d030d153fc3e310ab937680 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sun, 21 Jan 2024 22:36:13 +0100 Subject: [PATCH 11/96] treesj --- lua/custom/plugins.lua | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index c39c529..617378c 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -624,12 +624,14 @@ local plugins = { { "kosayoda/nvim-lightbulb", event = { "BufReadPre", "BufNewFile" } }, { "Wansmer/treesj", - lazy = false, - cmd = { "TSJJoin", "TSJSplit" }, + cmd = { "TSJJoin", "TSJSplit", "TSJSplit" }, keys = { { "", "TSJJoin" }, { "", "TSJSplit" }, }, + opts = { + use_default_keymaps = false, + }, }, { "b0o/incline.nvim", From e40cc7bbd7ab5b51dff2b1f6f9c82d1efdd8b8a0 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sun, 21 Jan 2024 23:58:09 +0100 Subject: [PATCH 12/96] fix fold --- lua/custom/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/custom/init.lua b/lua/custom/init.lua index 86b6e81..9aeb16a 100644 --- a/lua/custom/init.lua +++ b/lua/custom/init.lua @@ -62,7 +62,7 @@ opt.wildmode = "longest:full,full" -- Command-line completion mode -- Folds -- === -opt.foldlevel = 10000 -- start with all folds open +opt.foldlevel = 10 -- start with all folds open -- Editor UI -- === From a5ef5f3623d02f2f3ea28fb23119201abbc985cb Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Mon, 22 Jan 2024 20:07:30 +0100 Subject: [PATCH 13/96] formatting --- lua/custom/configs/conform.lua | 28 +++++++++++++++------------- lua/custom/plugins.lua | 1 - 2 files changed, 15 insertions(+), 14 deletions(-) diff --git a/lua/custom/configs/conform.lua b/lua/custom/configs/conform.lua index 4b142bd..a020d83 100644 --- a/lua/custom/configs/conform.lua +++ b/lua/custom/configs/conform.lua @@ -1,24 +1,26 @@ local options = { - lsp_fallback = true, + lsp_fallback = true, - formatters_by_ft = { - lua = { "stylua" }, + formatters_by_ft = { + lua = { "stylua" }, - javascript = { "prettier" }, - css = { "prettier" }, - html = { "prettier" }, + javascript = { "prettier" }, + css = { "prettier" }, + html = { "prettier" }, - sh = { "shfmt" }, - }, + sh = { "shfmt" }, + toml = { "taplo" }, + rust = { "rustfmt" }, + }, -- adding same formatter for multiple filetypes can look too much work for some -- instead of the above code you could just use a loop! the config is just a table after all! - -- format_on_save = { - -- -- These options will be passed to conform.format() - -- timeout_ms = 500, - -- lsp_fallback = true, - -- }, + -- format_on_save = { + -- -- These options will be passed to conform.format() + -- timeout_ms = 500, + -- lsp_fallback = true, + -- }, } require("conform").setup(options) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 617378c..470d1b2 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -556,7 +556,6 @@ local plugins = { -- :Chmod -- and also some more, but those are easy done with shell "tpope/vim-eunuch", - enabled = false, lazy = false, }, { From 8788f5a83386d66a1fa32ff7bc60959ce76adba8 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Tue, 23 Jan 2024 11:59:22 +0100 Subject: [PATCH 14/96] comments and git signs fix --- lua/custom/highlights.lua | 2 +- lua/custom/plugins.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lua/custom/highlights.lua b/lua/custom/highlights.lua index a3c1d31..24d82d5 100644 --- a/lua/custom/highlights.lua +++ b/lua/custom/highlights.lua @@ -7,7 +7,7 @@ local M = {} ---@type Base46HLGroupsList M.override = { Comment = { - italic = true, + italic = false, }, NvDashAscii = { fg = "#b33366", diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 470d1b2..5adbc3c 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -654,8 +654,8 @@ local plugins = { local function get_git_diff(props) local icons = { removed = "", changed = "", added = "" } local labels = {} - local signs = vim.api.nvim_buf_get_var(props.buf, "gitsigns_status_dict") - -- local signs = vim.b.gitsigns_status_dict + -- local signs = vim.api.nvim_buf_get_var(props.buf, "gitsigns_status_dict") + local signs = vim.b.gitsigns_status_dict for name, icon in pairs(icons) do if tonumber(signs[name]) and signs[name] > 0 then table.insert(labels, { icon .. " " .. signs[name] .. " ", group = "Diff" .. name }) From ee553be606c5ef2a23fa652419e70b79484d14a2 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Tue, 23 Jan 2024 12:01:43 +0100 Subject: [PATCH 15/96] TSJoin fix --- lua/custom/plugins.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 5adbc3c..6a880fd 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -625,8 +625,8 @@ local plugins = { "Wansmer/treesj", cmd = { "TSJJoin", "TSJSplit", "TSJSplit" }, keys = { - { "", "TSJJoin" }, - { "", "TSJSplit" }, + { "", "TSJJoin" }, + { "", "TSJSplit" }, }, opts = { use_default_keymaps = false, From f97e6171438e768d60d8a032a9e6778cd24c6696 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Tue, 23 Jan 2024 13:32:24 +0100 Subject: [PATCH 16/96] i donk get incline --- lua/custom/plugins.lua | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 6a880fd..564dd2f 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -655,12 +655,12 @@ local plugins = { local icons = { removed = "", changed = "", added = "" } local labels = {} -- local signs = vim.api.nvim_buf_get_var(props.buf, "gitsigns_status_dict") - local signs = vim.b.gitsigns_status_dict - for name, icon in pairs(icons) do - if tonumber(signs[name]) and signs[name] > 0 then - table.insert(labels, { icon .. " " .. signs[name] .. " ", group = "Diff" .. name }) - end - end + -- local signs = vim.b.gitsigns_status_dict + -- for name, icon in pairs(icons) do + -- if tonumber(signs[name]) and signs[name] > 0 then + -- table.insert(labels, { icon .. " " .. signs[name] .. " ", group = "Diff" .. name }) + -- end + -- end if #labels > 0 then table.insert(labels, { "| " }) end From 01d397d57fa329fe0ea6dc432e3292b02544445c Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Mon, 29 Jan 2024 09:34:48 +0100 Subject: [PATCH 17/96] spell --- spell/en.utf-8.add | 1 + spell/en.utf-8.add.spl | Bin 3368 -> 3381 bytes 2 files changed, 1 insertion(+) diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index 38ee409..62bfa49 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -260,3 +260,4 @@ popupmenu #m ufo treesitter +gehostet diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl index 36d14d9cf7bd41792f91405b67052efda1f13ce0..c3148599e0633115b4df12e4f99547b197ab9ce8 100644 GIT binary patch delta 462 zcmXAmJ4gdT5Qg{P%O*L43L=OPP&`D@!uO+yASgZxwbD+xOLCgSco#00h$v_!wlZ2+ z2v%Y%Vr!E|u(GnW6A=*`Yn@dVc87od`DSMw1Ss-?5b22H5+aVJ?b4Ldh~n*vv5eYv4-PW$b>@q1VsrJj$6g0Hcv^d;gzCU6 z^{DpdbB7s4)^nOU=yK#}&nekzM#cnPscAgXyIL_V-w;^{*5=~}u;?M~pr3jZt&EyY z>?2Rr#Bpa;Ur1bJk%y~6Z=uYF++i3K7-2!}(RT6zpOiA&#=Z*L{9ZP4;jRGz%jNCN z3v{7fHiTD}TRw9lrs=1bIT5SUn%UHF5+RF73a+tQpO+*tD89yGk5q5|Ht>7k89I_>#^a54r|6o?T}mQTLh^55h}{{f)FBpxg#^4 e%;;JA*yNnL*FT}r^iea0X|hsXIK5p+z2FyQH);9+ delta 464 zcmX9)ze^io82+BS+-V}};$RO&iC9agwANONomvnFEuq9U+$A5$VUm+C7o}2g6{H}% zluX&Xmf+&x;N&DOx`j+7(0@QW)#tMu+`T-{`}}zCJop(*?QU(i_jRN3`kzwcAAU_O zxGyr*Ml*#$f_*+vY9mFA7WO#9*U;pkoLWC}KVz~KBSb`+&`2&bo73f((hyaOh+WBy zw}^qPc?-|ZLbPcalcVh`%_+1yr_%I3Iqrk>y^pw-2d|V3TCS=<5i9w}2;|NW=btC8 zHXSsrxYuDw1xKj=Z!?fDW8YAg+p&}UMf$W+A*ZeV&^Q&t+*PdO4FS){(RdHPWi~rE zKWf~S0vkF z2Pe0KycBamK3HMPl!8Nk4JVr3)O{*83OeR__wqgWZmn!s)#fG4vE+fL Date: Tue, 30 Jan 2024 18:25:00 +0100 Subject: [PATCH 18/96] add spell --- spell/en.utf-8.add | 10 ++++++++++ spell/en.utf-8.add.spl | Bin 3368 -> 3454 bytes 2 files changed, 10 insertions(+) diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index 38ee409..a8eb9b6 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -260,3 +260,13 @@ popupmenu #m ufo treesitter +GitLab +Gitea +Autocrate +YAML +TOML +autocrate +TBD +PRs +yaml +netpong diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl index 36d14d9cf7bd41792f91405b67052efda1f13ce0..6a6db88b4681947314b3245f0429c562d68afb5c 100644 GIT binary patch literal 3454 zcmYjTONbm*6s`NJXA(il;6?{GE*b(tNHWRfL#7u=W;B7M)l5`yGgMb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04+`%} z0Ss(mF9jpbXBh54m}fRwoCvydhO1jQiMD&P;plFKSM~;;EY8FgUTNHIgdFmQ`E$e} zD;2&;{Ehqp5>WScA+JG~Q=g!I>u&x^gw*xSo$JukU=KOt`IYS&PMaIH8hiZv5ySO_ Apa1{> From b23f89384913ef0595294c43ea720a09ed49d199 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Wed, 31 Jan 2024 10:56:12 +0100 Subject: [PATCH 19/96] enable the tutor again --- lua/plugins/configs/lazy_nvim.lua | 1 - 1 file changed, 1 deletion(-) diff --git a/lua/plugins/configs/lazy_nvim.lua b/lua/plugins/configs/lazy_nvim.lua index cd170bd..03cdf47 100644 --- a/lua/plugins/configs/lazy_nvim.lua +++ b/lua/plugins/configs/lazy_nvim.lua @@ -33,7 +33,6 @@ return { "vimballPlugin", "zip", "zipPlugin", - "tutor", "rplugin", "syntax", "synmenu", From 45da5bef31b2589a4e67c10704f48c035a7bee9a Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Wed, 31 Jan 2024 11:55:22 +0100 Subject: [PATCH 20/96] tweak noice a little --- lua/custom/plugins.lua | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 564dd2f..4d67ac8 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -312,7 +312,6 @@ local plugins = { -- lazy.nvim { "folke/noice.nvim", - enabled = not vim.g.started_by_firenvim, event = "VeryLazy", -- config.lsp.signature.enabled = false dependencies = { @@ -344,6 +343,16 @@ local plugins = { inc_rename = false, -- enables an input dialog for inc-rename.nvim lsp_doc_border = false, -- add a border to hover docs and signature help }, + messages = { + enabled = true, + view_error = "messages", -- so it does not spam boxes with errors + }, + popupmenu = { + enabled = true, + }, + notify = { + enabled = true, + }, } end, }, From e8511173ef91e9215f914bd81b1e97142cc564b3 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Wed, 31 Jan 2024 14:27:57 +0100 Subject: [PATCH 21/96] worse escape and better leap --- lua/custom/plugins.lua | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 4d67ac8..d67827a 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -31,6 +31,8 @@ local plugins = { -- Install a plugin { "max397574/better-escape.nvim", + enabled = false, + -- exit insert mode with 'jk' event = "InsertEnter", config = function() require("better_escape").setup() @@ -50,6 +52,10 @@ local plugins = { lazy = false, config = function() require("core.utils").load_mappings "leap" + local leap = require "leap" + leap.opts.highlight_unlabeled_phase_one_targets = true + leap.opts.safe_labels = "sfnutwehjkl/SFNLHMUGTZ?" + leap.opts.labels = "sfnjklhodweimbuyvrgtaqpcxz?" end, }, { @@ -59,7 +65,7 @@ local plugins = { require("flit").setup { keys = { f = "f", F = "F", t = "t", T = "T" }, -- A string like "nv", "nvo", "o", etc. - labeled_modes = "v", + labeled_modes = "nvo", multiline = true, -- Like `leap`s similar argument (call-specific overrides). -- E.g.: opts = { equivalence_classes = {} } From 7be125afdc9fed0e5a5973972e63f58b0b0f6de9 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Wed, 31 Jan 2024 14:34:12 +0100 Subject: [PATCH 22/96] okay lets give jk a try --- lua/custom/plugins.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index d67827a..d5b125f 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -30,9 +30,9 @@ local plugins = { -- Install a plugin { - "max397574/better-escape.nvim", - enabled = false, -- exit insert mode with 'jk' + "max397574/better-escape.nvim", + enabled = true, event = "InsertEnter", config = function() require("better_escape").setup() From 167d3babb0c524bb914153e6e137038dfa2ac9fa Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Wed, 31 Jan 2024 14:52:42 +0100 Subject: [PATCH 23/96] i broke flit with a leap option --- lua/custom/init.lua | 1 + lua/custom/plugins.lua | 6 +----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lua/custom/init.lua b/lua/custom/init.lua index 9aeb16a..2fa90f5 100644 --- a/lua/custom/init.lua +++ b/lua/custom/init.lua @@ -2,6 +2,7 @@ local opt = vim.opt local g = vim.g g.maplocalleader = ";" +opt.mouse = "" -- hardcore vim mode, disable the mouse opt.signcolumn = "yes" opt.spelllang = "en,de" opt.clipboard = "" -- don't just use the system clipboard diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index d5b125f..596a7cb 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -52,10 +52,6 @@ local plugins = { lazy = false, config = function() require("core.utils").load_mappings "leap" - local leap = require "leap" - leap.opts.highlight_unlabeled_phase_one_targets = true - leap.opts.safe_labels = "sfnutwehjkl/SFNLHMUGTZ?" - leap.opts.labels = "sfnjklhodweimbuyvrgtaqpcxz?" end, }, { @@ -65,7 +61,7 @@ local plugins = { require("flit").setup { keys = { f = "f", F = "F", t = "t", T = "T" }, -- A string like "nv", "nvo", "o", etc. - labeled_modes = "nvo", + labeled_modes = "v", multiline = true, -- Like `leap`s similar argument (call-specific overrides). -- E.g.: opts = { equivalence_classes = {} } From d9a4cc992d3621866797fe39c4fc8cc18078cf9e Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Wed, 31 Jan 2024 15:44:47 +0100 Subject: [PATCH 24/96] spell is better now --- lua/custom/init.lua | 8 +++++++- spell/en.utf-8.add | 1 + spell/en.utf-8.add.spl | Bin 3454 -> 3477 bytes 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lua/custom/init.lua b/lua/custom/init.lua index 2fa90f5..dfb2252 100644 --- a/lua/custom/init.lua +++ b/lua/custom/init.lua @@ -4,7 +4,6 @@ g.maplocalleader = ";" opt.mouse = "" -- hardcore vim mode, disable the mouse opt.signcolumn = "yes" -opt.spelllang = "en,de" opt.clipboard = "" -- don't just use the system clipboard opt.wrap = false opt.breakindent = false @@ -106,6 +105,13 @@ opt.pumheight = 10 -- Maximum number of items to show in the popup menu opt.pumwidth = 10 -- Minimum width for the popup menu opt.pumblend = 10 -- Popup blend +-- Spelling correction +-- === + +opt.spell = false -- manually enable spell with `set spell` or `ts` +opt.spelllang = "en,de_de," +opt.spellsuggest = "double,50,timeout:5000" + -- autocommands -- === local function augroup(name) diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index 9b05773..5951639 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -271,3 +271,4 @@ PRs yaml netpong gehostet +IoT diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl index 6a6db88b4681947314b3245f0429c562d68afb5c..e5192e07adbe36efeac2916ab342cb1e896336e4 100644 GIT binary patch delta 631 zcmX9*O=uHQ5Pq{SZ`&kI^_W)F5*2?yl%$CZ+EWuHh&_mSY~9Unnzfs}xY;BqN)bc^ zZyi(+uSGmaDV{{{f=9uNhvK#1p?L97|Gt;7@OJp-o0)IE`8)gU(DcpvwO%)fqT)Xx zCfBy7i?XczR@6=?CQV&@B*a33xJL&!5!U zb8kH5209r?;48P=X0F@~sBd^Hk<`f$5q0B{X8D2 zQEw9nODyB(@g9KG2Y#1^Tt1zdr^mdUIYNv4ATwKVPGW}yWkdYq@s)nGY$M@(5JJN* zexJEe)-e__Q#GcUKw*CzT3%>*<}4j(!R&A5;HY%?M7EOideYTn!(@|N*#d3y u(`=ot^4F|CC#yBX6_;wXNEIr=8{>|cDUIG6e0}OU-QwM;CE8#oclke%k&cr9 delta 592 zcmX9*O=}ZT6n%HzOq$PHs0&l^gCGckM3W}1)UIsQF4SE?H*u1@rc)*};bkVNMNn}g zh={r9#w-*R!Aju;j0T9Ps}Fq1FI-Nnq>6zQO%isNA0{49aX7VpVkwkL$J7B??8GqCq;1;3 zNRS!x_!KKCLm>?zuIaV=`t1a$veE2DbR>tXIAMt|IW1X)=JID eU9Qm;s!|E7G0PG8GJDxqR3GMU(sRC*yZRr@KZ$4n From 5a351dfcff327c0050e82a9ad0be8678d479c0ef Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Wed, 31 Jan 2024 15:44:54 +0100 Subject: [PATCH 25/96] scroll with zj zk --- lua/custom/mappings.lua | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index e6047d0..58f37fb 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -359,6 +359,10 @@ M.movements = { -- spell ["]s"] = { "]s", "go to next spelling mark" }, ["[s"] = { "[s", "go to last spelling mark" }, + + -- just scroll a line + ["zk"] = { "", "scroll up a line" }, + ["zj"] = { "", "scroll down a line" }, }, v = { --big move From 9c83975d31b4b770604c6c1013ed3e09d7a41ce2 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Wed, 31 Jan 2024 16:20:29 +0100 Subject: [PATCH 26/96] spell --- spell/en.utf-8.add | 3 +++ spell/en.utf-8.add.spl | Bin 3477 -> 3528 bytes 2 files changed, 3 insertions(+) diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index 5951639..70ff233 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -272,3 +272,6 @@ yaml netpong gehostet IoT +einen +NTSecureGateway +SoC diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl index e5192e07adbe36efeac2916ab342cb1e896336e4..a421d971f7f7f3c7064cae62ec9939ef7e3316c5 100644 GIT binary patch delta 770 zcmZ8eO-NKx6u#%)dC&Q2%oai8WR?|0AckftQ$a|LBDx6@iHLbW>dWW6;m(_}38SBV zi#&x3X&Fid60{A1HbqF#rgcf12m_Z9)_0vx!B&$nJ39j{jWFzo#+ zL~`*}>zquaTrc27*=Z9AdRFEY`HnQ-Q2Xft*VGYmcv+3nHgBpS*p9@VecQ1VB*a84 zgDRS&!!Hu2vW=U;$9t4gqTNxsoLa0>oD!`l+~GgU7{*g5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rGWQJ|02*SRH4>EgU44-B8^yd$fznBnObVl1Q<+rlUYL4oF olsi6=ihm25rdR(jNSvuYbfzR|yyEm?>>N%`GV|^+TyX||1CC~+tpET3 From dc88c401c4a3b8214bdaa7187b3bc2665ed1b746 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Thu, 1 Feb 2024 13:17:51 +0100 Subject: [PATCH 27/96] theme minifix --- lua/custom/chadrc.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/custom/chadrc.lua b/lua/custom/chadrc.lua index 074bd3e..7e7dc46 100644 --- a/lua/custom/chadrc.lua +++ b/lua/custom/chadrc.lua @@ -5,8 +5,8 @@ local M = {} local highlights = require "custom.highlights" M.ui = { - theme = "kanagawa", - theme_toggle = { "kanagawa", "chadracula" }, + theme = "oceanic-next", + theme_toggle = { "kanagawa", "oceanic-next" }, hl_override = highlights.override, hl_add = highlights.add, From 989cbecead3cc0639b31ae0fe7c19502f0db4b90 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Mon, 5 Feb 2024 12:35:30 +0100 Subject: [PATCH 28/96] debug --- lua/custom/chadrc.lua | 2 +- lua/custom/init.lua | 2 +- lua/custom/mappings.lua | 81 +++++++++++++++++++++++++++++++---------- lua/custom/plugins.lua | 20 ++++++++++ 4 files changed, 83 insertions(+), 22 deletions(-) diff --git a/lua/custom/chadrc.lua b/lua/custom/chadrc.lua index 074bd3e..73175d9 100644 --- a/lua/custom/chadrc.lua +++ b/lua/custom/chadrc.lua @@ -5,7 +5,7 @@ local M = {} local highlights = require "custom.highlights" M.ui = { - theme = "kanagawa", + theme = "chadracula", theme_toggle = { "kanagawa", "chadracula" }, hl_override = highlights.override, diff --git a/lua/custom/init.lua b/lua/custom/init.lua index 9aeb16a..2c2ecd4 100644 --- a/lua/custom/init.lua +++ b/lua/custom/init.lua @@ -67,7 +67,7 @@ opt.foldlevel = 10 -- start with all folds open -- Editor UI -- === -vim.o.guifont = "FiraCode Nerd Font:h27" +vim.o.guifont = "FiraCode Nerd Font:h22" opt.termguicolors = true opt.shortmess = "xsTOInfFitloCaAs" opt.showmode = true -- Show mode in cmd window diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index e6047d0..810955d 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -226,89 +226,89 @@ M.toggleterm = { plugin = true, n = { [""] = { - "exe v:count1 \"ToggleTerm direction=float\"", + 'exe v:count1 "ToggleTerm direction=float"', "toggle terminal", }, [""] = { - "exe v:count1 \"ToggleTerm direction=float\"", + 'exe v:count1 "ToggleTerm direction=float"', "toggle terminal", }, [""] = { - "exe v:count1 \"ToggleTerm direction=tab\"", + 'exe v:count1 "ToggleTerm direction=tab"', "toggle terminal", }, [""] = { - "exe v:count1 \"ToggleTerm direction=horizontal\"", + 'exe v:count1 "ToggleTerm direction=horizontal"', "toggle terminal", }, [""] = { - "exe v:count1 \"ToggleTerm direction=vertical\"", + 'exe v:count1 "ToggleTerm direction=vertical"', "toggle terminal", }, }, i = { [""] = { - "exe v:count1 \"ToggleTerm direction=float\"", + 'exe v:count1 "ToggleTerm direction=float"', "toggle terminal", }, [""] = { - "exe v:count1 \"ToggleTerm direction=float\"", + 'exe v:count1 "ToggleTerm direction=float"', "toggle terminal", }, [""] = { - "exe v:count1 \"ToggleTerm direction=tab\"", + 'exe v:count1 "ToggleTerm direction=tab"', "toggle terminal", }, [""] = { - "exe v:count1 \"ToggleTerm direction=horizontal\"", + 'exe v:count1 "ToggleTerm direction=horizontal"', "toggle terminal", }, [""] = { - "exe v:count1 \"ToggleTerm direction=vertical\"", + 'exe v:count1 "ToggleTerm direction=vertical"', "toggle terminal", }, }, t = { [""] = { - "exe v:count1 \"ToggleTerm direction=float\"", + 'exe v:count1 "ToggleTerm direction=float"', "toggle terminal", }, [""] = { - "exe v:count1 \"ToggleTerm direction=float\"", + 'exe v:count1 "ToggleTerm direction=float"', "toggle terminal", }, [""] = { - "exe v:count1 \"ToggleTerm direction=tab\"", + 'exe v:count1 "ToggleTerm direction=tab"', "toggle terminal", }, [""] = { - "exe v:count1 \"ToggleTerm direction=horizontal\"", + 'exe v:count1 "ToggleTerm direction=horizontal"', "toggle terminal", }, [""] = { - "exe v:count1 \"ToggleTerm direction=vertical\"", + 'exe v:count1 "ToggleTerm direction=vertical"', "toggle terminal", }, }, x = { [""] = { - "exe v:count1 \"ToggleTerm direction=float\"", + 'exe v:count1 "ToggleTerm direction=float"', "toggle terminal", }, [""] = { - "exe v:count1 \"ToggleTerm direction=float\"", + 'exe v:count1 "ToggleTerm direction=float"', "toggle terminal", }, [""] = { - "exe v:count1 \"ToggleTerm direction=tab\"", + 'exe v:count1 "ToggleTerm direction=tab"', "toggle terminal", }, [""] = { - "exe v:count1 \"ToggleTerm direction=horizontal\"", + 'exe v:count1 "ToggleTerm direction=horizontal"', "toggle terminal", }, [""] = { - "exe v:count1 \"ToggleTerm direction=vertical\"", + 'exe v:count1 "ToggleTerm direction=vertical"', "toggle terminal", }, }, @@ -545,4 +545,45 @@ M.goto_preview = { }, } +M.debug = { + plugin = true, + n = { + ["db"] = { + function() + require("dap").toggle_breakpoint() + end, + "toggle breakpoint", + noremap = true, + }, + ["dc"] = { + function() + require("dap").continue() + end, + "debug continue", + noremap = true, + }, + ["ds"] = { + function() + require("dap").step_over() + end, + "debug step over", + noremap = true, + }, + ["di"] = { + function() + require("dap").step_into() + end, + "debug step into", + noremap = true, + }, + ["dr"] = { + function() + require("dap").repl.open() + end, + "debug open repl", + noremap = true, + }, + }, +} + return M diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 564dd2f..ae25d30 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -716,6 +716,26 @@ local plugins = { require("icon-picker").setup { disable_legacy_commands = true } end, }, + { + "mfussenegger/nvim-dap", + init = function() + require("core.utils").load_mappings "debug" + end, + config = function() + local dap = require "dap" + dap.configurations.c = { + { + name = "Launch", + type = "gdb", + request = "launch", + program = function() + return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file") + end, + cwd = "${workspaceFolder}", + }, + } + end, + }, } return plugins From 796d4550f13c9911c6e63d7dcd7d83b7a6437b3a Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Mon, 5 Feb 2024 13:20:53 +0100 Subject: [PATCH 29/96] add gdb as adapter --- lua/custom/plugins.lua | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index c4b99b1..794dd2c 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -734,6 +734,12 @@ local plugins = { end, config = function() local dap = require "dap" + dap.adapters.gdb = { + type = "executable", + command = "gdb", + args = { "-i", "dap" }, + } + dap.configurations.c = { { name = "Launch", @@ -745,6 +751,8 @@ local plugins = { cwd = "${workspaceFolder}", }, } + dap.configurations.rust = dap.configurations.c + dap.configurations.cpp = dap.configurations.c end, }, } From b3fc64dd4867066cdca73d0f8f9f9836f433d331 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Mon, 5 Feb 2024 14:44:31 +0100 Subject: [PATCH 30/96] dap kann mich mal --- lua/custom/plugins.lua | 28 ---------------------------- 1 file changed, 28 deletions(-) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 794dd2c..596a7cb 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -727,34 +727,6 @@ local plugins = { require("icon-picker").setup { disable_legacy_commands = true } end, }, - { - "mfussenegger/nvim-dap", - init = function() - require("core.utils").load_mappings "debug" - end, - config = function() - local dap = require "dap" - dap.adapters.gdb = { - type = "executable", - command = "gdb", - args = { "-i", "dap" }, - } - - dap.configurations.c = { - { - name = "Launch", - type = "gdb", - request = "launch", - program = function() - return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file") - end, - cwd = "${workspaceFolder}", - }, - } - dap.configurations.rust = dap.configurations.c - dap.configurations.cpp = dap.configurations.c - end, - }, } return plugins From ca85833670b939852bf7f7ebf92c8b8b1668634a Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Mon, 5 Feb 2024 15:00:21 +0100 Subject: [PATCH 31/96] ich hasse debug --- lua/custom/plugins.lua | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 596a7cb..410a076 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -716,17 +716,6 @@ local plugins = { "hrsh7th/nvim-cmp", enabled = not vim.g.started_by_firenvim, }, - { - "ziontee113/icon-picker.nvim", - keys = { - { "", "IconPickerNormal", desc = "pick icon" }, - { "y", "IconPickerYank", desc = "yank icon" }, - }, - cmd = { "IconPickerInsert", "IconPickerYank", "IconPickerNormal" }, - config = function() - require("icon-picker").setup { disable_legacy_commands = true } - end, - }, } return plugins From 27a96fe2309527696bf609c807052c059c0c75c8 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Mon, 5 Feb 2024 15:18:43 +0100 Subject: [PATCH 32/96] omg it fucking works --- lua/custom/plugins.lua | 52 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 410a076..0406eff 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -716,6 +716,58 @@ local plugins = { "hrsh7th/nvim-cmp", enabled = not vim.g.started_by_firenvim, }, + { + "ziontee113/icon-picker.nvim", + keys = { + { "", "IconPickerNormal", desc = "pick icon" }, + { "y", "IconPickerYank", desc = "yank icon" }, + }, + cmd = { "IconPickerInsert", "IconPickerYank", "IconPickerNormal" }, + config = function() + require("icon-picker").setup { disable_legacy_commands = true } + end, + }, + { + "mfussenegger/nvim-dap", + init = function() + require("core.utils").load_mappings "debug" + end, + config = function() + local dap = require "dap" + dap.adapters.gdb = { + type = "executable", + command = "gdb", + args = { "-i", "dap" }, -- NOTE: gdb sometimes has no built in dap interface, LMDE6 has this i + -- think. Don't bother with compiling from source + } + dap.adapters.codelldb = { + type = "server", + port = "${port}", + executable = { + -- CHANGE THIS to your path! + command = "/home/plex/.local/share/codelldb/extension/adapter/codelldb", + args = { "--port", "${port}" }, + -- On windows you may have to uncomment this: + -- detached = false, + }, + } + + dap.configurations.cpp = { + { + name = "Launch file", + type = "codelldb", + request = "launch", + program = function() + return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file") + end, + cwd = "${workspaceFolder}", + stopOnEntry = false, + }, + } + dap.configurations.rust = dap.configurations.cpp + dap.configurations.c = dap.configurations.cpp + end, + }, } return plugins From 6b14039e40033a56a8b2d6123e424238cbecc13c Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Mon, 5 Feb 2024 16:25:00 +0100 Subject: [PATCH 33/96] okay dbg with c --- lua/custom/configs/lspconfig.lua | 2 +- lua/custom/mappings.lua | 52 ++++++++++++++++++++++ lua/custom/plugins.lua | 74 ++++++++++++++++++++++++++++---- 3 files changed, 119 insertions(+), 9 deletions(-) diff --git a/lua/custom/configs/lspconfig.lua b/lua/custom/configs/lspconfig.lua index fad87e4..e180978 100644 --- a/lua/custom/configs/lspconfig.lua +++ b/lua/custom/configs/lspconfig.lua @@ -10,7 +10,7 @@ local servers = { "tsserver", "clangd", "pyright", - "rust_analyzer", + -- "rust_analyzer", "bashls", "cmake", } diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index 4b7ec90..1865fff 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -587,6 +587,58 @@ M.debug = { "debug open repl", noremap = true, }, + ["dws"] = { + function() + local widgets = require "dap.ui.widgets" + local my_sidebar = widgets.sidebar(widgets.scopes) + my_sidebar.open() + end, + "debug window scopes", + noremap = true, + }, + ["dwt"] = { + function() + local widgets = require "dap.ui.widgets" + local my_sidebar = widgets.sidebar(widgets.threads) + my_sidebar.open() + end, + "debug window threads", + noremap = true, + }, + ["dwe"] = { + function() + local widgets = require "dap.ui.widgets" + local my_sidebar = widgets.sidebar(widgets.expression) + my_sidebar.open() + end, + "debug window expressions", + noremap = true, + }, + ["dwi"] = { + function() + local widgets = require "dap.ui.widgets" + local my_sidebar = widgets.sidebar(widgets.sessions) + my_sidebar.open() + end, + "debug window sessions", + noremap = true, + }, + ["dwf"] = { + function() + local widgets = require "dap.ui.widgets" + local my_sidebar = widgets.sidebar(widgets.frames) + my_sidebar.open() + end, + "debug window scopes", + noremap = true, + }, + ["dK"] = { + function() + require('dap.ui.widgets').hover() + end, + "debug hover", + noremap = true, + }, }, } diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 0406eff..42ee5f0 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -729,17 +729,18 @@ local plugins = { }, { "mfussenegger/nvim-dap", + lazy = false, init = function() require("core.utils").load_mappings "debug" end, config = function() local dap = require "dap" - dap.adapters.gdb = { - type = "executable", - command = "gdb", - args = { "-i", "dap" }, -- NOTE: gdb sometimes has no built in dap interface, LMDE6 has this i - -- think. Don't bother with compiling from source - } + -- dap.adapters.gdb = { + -- type = "executable", + -- command = "gdb", + -- args = { "-i", "dap" }, -- NOTE: gdb sometimes has no built in dap interface, LMDE6 has this i + -- -- think. Don't bother with compiling from source + -- } dap.adapters.codelldb = { type = "server", port = "${port}", @@ -747,11 +748,11 @@ local plugins = { -- CHANGE THIS to your path! command = "/home/plex/.local/share/codelldb/extension/adapter/codelldb", args = { "--port", "${port}" }, + -- On windows you may have to uncomment this: -- detached = false, }, } - dap.configurations.cpp = { { name = "Launch file", @@ -764,8 +765,65 @@ local plugins = { stopOnEntry = false, }, } - dap.configurations.rust = dap.configurations.cpp dap.configurations.c = dap.configurations.cpp + -- dap.configurations.rust = dap.configurations.cpp + end, + }, + { + "rcarriga/nvim-dap-ui", + enabled = false, + lazy = false, + dependencies = { + "mfussenegger/nvim-dap", + }, + config = function() + local dap, dapui = require "dap", require "dapui" + dap.listeners.before.attach.dapui_config = function() + dapui.open() + end + dap.listeners.before.launch.dapui_config = function() + dapui.open() + end + dap.listeners.before.event_terminated.dapui_config = function() + dapui.close() + end + dap.listeners.before.event_exited.dapui_config = function() + dapui.close() + end + require("neodev").setup { + library = { plugins = { "nvim-dap-ui" }, types = true }, + } + end, + }, + { "folke/neodev.nvim", opts = {} }, + { + "mrcjkb/rustaceanvim", + version = "^4", -- Recommended + ft = { "rust" }, + config = function() + vim.g.rustaceanvim = function() + -- Update this path + local extension_path = vim.env.HOME .. ".local/share/codelldb" + local codelldb_path = extension_path .. "adapter/codelldb" + local liblldb_path = extension_path .. "lldb/lib/liblldb" + local this_os = vim.uv.os_uname().sysname + + -- The path is different on Windows + if this_os:find "Windows" then + codelldb_path = extension_path .. "adapter\\codelldb.exe" + liblldb_path = extension_path .. "lldb\\bin\\liblldb.dll" + else + -- The liblldb extension is .so for Linux and .dylib for MacOS + liblldb_path = liblldb_path .. (this_os == "Linux" and ".so" or ".dylib") + end + + local cfg = require "rustaceanvim.config" + return { + dap = { + adapter = cfg.get_codelldb_adapter(codelldb_path, liblldb_path), + }, + } + end end, }, } From 52c1f2980411b1c6081e23e164767016d8caad65 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Mon, 5 Feb 2024 16:47:13 +0100 Subject: [PATCH 34/96] its almost some good --- lua/custom/init.lua | 2 +- lua/custom/mappings.lua | 11 +++++++++-- lua/custom/plugins.lua | 30 ++++++++++-------------------- 3 files changed, 20 insertions(+), 23 deletions(-) diff --git a/lua/custom/init.lua b/lua/custom/init.lua index 36ffe70..a510a86 100644 --- a/lua/custom/init.lua +++ b/lua/custom/init.lua @@ -2,7 +2,7 @@ local opt = vim.opt local g = vim.g g.maplocalleader = ";" -opt.mouse = "" -- hardcore vim mode, disable the mouse +opt.mouse = "a" -- mouse does annoying things for me if it's not 'a' opt.signcolumn = "yes" opt.clipboard = "" -- don't just use the system clipboard opt.wrap = false diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index 1865fff..efbbd2b 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -629,16 +629,23 @@ M.debug = { local my_sidebar = widgets.sidebar(widgets.frames) my_sidebar.open() end, - "debug window scopes", + "debug window frames", noremap = true, }, ["dK"] = { function() - require('dap.ui.widgets').hover() + require("dap.ui.widgets").hover() end, "debug hover", noremap = true, }, + ["du"] = { + function() + require("dapui").toggle() + end, + "debug ui toggle", + noremap = true, + }, }, } diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 42ee5f0..5c369df 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -735,24 +735,12 @@ local plugins = { end, config = function() local dap = require "dap" - -- dap.adapters.gdb = { - -- type = "executable", - -- command = "gdb", - -- args = { "-i", "dap" }, -- NOTE: gdb sometimes has no built in dap interface, LMDE6 has this i - -- -- think. Don't bother with compiling from source - -- } - dap.adapters.codelldb = { - type = "server", - port = "${port}", - executable = { - -- CHANGE THIS to your path! - command = "/home/plex/.local/share/codelldb/extension/adapter/codelldb", - args = { "--port", "${port}" }, - - -- On windows you may have to uncomment this: - -- detached = false, - }, - } + local rustcfg = require "rustaceanvim.config" + local mason_registry = require "mason-registry" + local codelldb_root = mason_registry.get_package("codelldb"):get_install_path() .. "/extension/" + local codelldb_path = codelldb_root .. "adapter/codelldb" + local liblldb_path = codelldb_root .. "lldb/lib/liblldb.so" + dap.adapters.codelldb = rustcfg.get_codelldb_adapter(codelldb_path, liblldb_path) dap.configurations.cpp = { { name = "Launch file", @@ -771,8 +759,10 @@ local plugins = { }, { "rcarriga/nvim-dap-ui", - enabled = false, - lazy = false, + enabled = true, + init = function() + require("core.utils").load_mappings "debug" + end, dependencies = { "mfussenegger/nvim-dap", }, From e8a35c7ddf78797c7c1dca5218777b8c4c209d74 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Mon, 5 Feb 2024 17:16:18 +0100 Subject: [PATCH 35/96] idk anymore --- lua/custom/plugins.lua | 50 +++++------------------------------------- 1 file changed, 5 insertions(+), 45 deletions(-) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 5c369df..3407cdc 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -735,11 +735,15 @@ local plugins = { end, config = function() local dap = require "dap" - local rustcfg = require "rustaceanvim.config" + local rustcfg = require "rustaceanvim.config" local mason_registry = require "mason-registry" local codelldb_root = mason_registry.get_package("codelldb"):get_install_path() .. "/extension/" local codelldb_path = codelldb_root .. "adapter/codelldb" local liblldb_path = codelldb_root .. "lldb/lib/liblldb.so" + dap.defaults.fallback.external_terminal = { + command = "/home/plex/.local/bin/kitty", + args = {}, + } dap.adapters.codelldb = rustcfg.get_codelldb_adapter(codelldb_path, liblldb_path) dap.configurations.cpp = { { @@ -759,62 +763,18 @@ local plugins = { }, { "rcarriga/nvim-dap-ui", - enabled = true, init = function() require("core.utils").load_mappings "debug" end, dependencies = { "mfussenegger/nvim-dap", }, - config = function() - local dap, dapui = require "dap", require "dapui" - dap.listeners.before.attach.dapui_config = function() - dapui.open() - end - dap.listeners.before.launch.dapui_config = function() - dapui.open() - end - dap.listeners.before.event_terminated.dapui_config = function() - dapui.close() - end - dap.listeners.before.event_exited.dapui_config = function() - dapui.close() - end - require("neodev").setup { - library = { plugins = { "nvim-dap-ui" }, types = true }, - } - end, }, { "folke/neodev.nvim", opts = {} }, { "mrcjkb/rustaceanvim", version = "^4", -- Recommended ft = { "rust" }, - config = function() - vim.g.rustaceanvim = function() - -- Update this path - local extension_path = vim.env.HOME .. ".local/share/codelldb" - local codelldb_path = extension_path .. "adapter/codelldb" - local liblldb_path = extension_path .. "lldb/lib/liblldb" - local this_os = vim.uv.os_uname().sysname - - -- The path is different on Windows - if this_os:find "Windows" then - codelldb_path = extension_path .. "adapter\\codelldb.exe" - liblldb_path = extension_path .. "lldb\\bin\\liblldb.dll" - else - -- The liblldb extension is .so for Linux and .dylib for MacOS - liblldb_path = liblldb_path .. (this_os == "Linux" and ".so" or ".dylib") - end - - local cfg = require "rustaceanvim.config" - return { - dap = { - adapter = cfg.get_codelldb_adapter(codelldb_path, liblldb_path), - }, - } - end - end, }, } From 92ed4a6998bc065c8c0c549821dd91ded196620f Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Mon, 5 Feb 2024 17:51:28 +0100 Subject: [PATCH 36/96] dap-ui works but no rust stdout --- lua/custom/plugins.lua | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 3407cdc..9db2203 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -769,6 +769,20 @@ local plugins = { dependencies = { "mfussenegger/nvim-dap", }, + config = function(_, opts) + local dap = require "dap" + local dapui = require "dapui" + dapui.setup(opts) + dap.listeners.after.event_initialized["dapui_config"] = function() + dapui.open {} + end + dap.listeners.before.event_terminated["dapui_config"] = function() + dapui.close {} + end + dap.listeners.before.event_exited["dapui_config"] = function() + dapui.close {} + end + end, }, { "folke/neodev.nvim", opts = {} }, { From 67a19dec6efb4e8c56cb1ada70ba39b8a576c0be Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Mon, 5 Feb 2024 22:57:57 +0100 Subject: [PATCH 37/96] HOLY FUCK IT WORKS --- lua/custom/chadrc.lua | 2 +- lua/custom/plugins.lua | 10 +++++++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lua/custom/chadrc.lua b/lua/custom/chadrc.lua index 73175d9..074bd3e 100644 --- a/lua/custom/chadrc.lua +++ b/lua/custom/chadrc.lua @@ -5,7 +5,7 @@ local M = {} local highlights = require "custom.highlights" M.ui = { - theme = "chadracula", + theme = "kanagawa", theme_toggle = { "kanagawa", "chadracula" }, hl_override = highlights.override, diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 9db2203..935246d 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -744,7 +744,15 @@ local plugins = { command = "/home/plex/.local/bin/kitty", args = {}, } - dap.adapters.codelldb = rustcfg.get_codelldb_adapter(codelldb_path, liblldb_path) + dap.adapters.lldb = { + type = "server", + port = "${port}", + executable = { + command = codelldb_path, + args = { "--port", "${port}" }, + detached = false, + }, + } dap.configurations.cpp = { { name = "Launch file", From 5277a4b5ac0e494408a46f4ed7a96bf7a64e8ac3 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Mon, 5 Feb 2024 23:24:50 +0100 Subject: [PATCH 38/96] it doesnt but i could see text in autocrate. i dont get it --- lua/custom/plugins.lua | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 935246d..465b971 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -798,6 +798,13 @@ local plugins = { version = "^4", -- Recommended ft = { "rust" }, }, + { + "theHamsta/nvim-dap-virtual-text", + lazy = false, -- PERF: this can be done more elegant + config = function() + require("nvim-dap-virtual-text").setup() + end, + }, } return plugins From d0f33b167553fa15b640d61ca37d650dc8325669 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Tue, 6 Feb 2024 11:19:52 +0100 Subject: [PATCH 39/96] lsp telecsope things --- lua/custom/chadrc.lua | 4 ++-- lua/custom/mappings.lua | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/lua/custom/chadrc.lua b/lua/custom/chadrc.lua index 074bd3e..7e7dc46 100644 --- a/lua/custom/chadrc.lua +++ b/lua/custom/chadrc.lua @@ -5,8 +5,8 @@ local M = {} local highlights = require "custom.highlights" M.ui = { - theme = "kanagawa", - theme_toggle = { "kanagawa", "chadracula" }, + theme = "oceanic-next", + theme_toggle = { "kanagawa", "oceanic-next" }, hl_override = highlights.override, hl_add = highlights.add, diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index efbbd2b..42a15d1 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -219,6 +219,10 @@ M.telescope = { ["th"] = { " Telescope themes ", "Nvchad themes" }, ["ma"] = { " Telescope marks ", "telescope bookmarks" }, + + -- lsp stuff + ["cw"] = { " Telescope lsp_dynamic_workspace_symbols ", "telescope dynamic workspace symbols" }, + ["cd"] = { " Telescope lsp_document_symbols ", "telescope document symbols" }, }, } From 2c779d1ed405266c34a0251ba963059a2dba5431 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Tue, 6 Feb 2024 12:30:32 +0100 Subject: [PATCH 40/96] rust_analyzer in lspconfig again --- lua/custom/configs/lspconfig.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/custom/configs/lspconfig.lua b/lua/custom/configs/lspconfig.lua index e180978..88b5536 100644 --- a/lua/custom/configs/lspconfig.lua +++ b/lua/custom/configs/lspconfig.lua @@ -10,7 +10,7 @@ local servers = { "tsserver", "clangd", "pyright", - -- "rust_analyzer", + "rust_analyzer", -- rustaceanvim wants to do that, but the builtin thing has better integration! "bashls", "cmake", } From c7bbbf1a7715706423616ffd777872603abdb9cf Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Tue, 6 Feb 2024 13:13:01 +0100 Subject: [PATCH 41/96] DBG WORKS WITH STDOUT!!! --- lua/custom/plugins.lua | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 465b971..b63a311 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -735,7 +735,6 @@ local plugins = { end, config = function() local dap = require "dap" - local rustcfg = require "rustaceanvim.config" local mason_registry = require "mason-registry" local codelldb_root = mason_registry.get_package("codelldb"):get_install_path() .. "/extension/" local codelldb_path = codelldb_root .. "adapter/codelldb" @@ -744,12 +743,12 @@ local plugins = { command = "/home/plex/.local/bin/kitty", args = {}, } - dap.adapters.lldb = { + dap.adapters.codelldb = { type = "server", - port = "${port}", + port = "30333", executable = { command = codelldb_path, - args = { "--port", "${port}" }, + args = { "--port", "30333" }, detached = false, }, } @@ -766,7 +765,7 @@ local plugins = { }, } dap.configurations.c = dap.configurations.cpp - -- dap.configurations.rust = dap.configurations.cpp + dap.configurations.rust = dap.configurations.cpp end, }, { @@ -795,6 +794,7 @@ local plugins = { { "folke/neodev.nvim", opts = {} }, { "mrcjkb/rustaceanvim", + enabled = true, version = "^4", -- Recommended ft = { "rust" }, }, @@ -803,6 +803,28 @@ local plugins = { lazy = false, -- PERF: this can be done more elegant config = function() require("nvim-dap-virtual-text").setup() + local dap = require "dap" + vim.g.rustaceanvim = { + -- Plugin configuration + tools = {}, + -- LSP configuration + server = { + on_attach = function(client, bufnr) + -- you can also put keymaps in here + end, + settings = { + -- rust-analyzer language server configuration + ["rust-analyzer"] = {}, + }, + }, + -- DAP configuration + dap = { + -- FIXME: the rustaceanvim debug config does not map the stdout/stderr to the + -- opened terminal, effectively rendering debugging with it useless. Luckily, + -- we can use the regular nvim-dap and nvim-dap-ui. + adapter = dap.adapters.codelldb, + }, + } end, }, } From dea2aeeb137caafcafd0ad5e08310ae74abf078b Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Wed, 7 Feb 2024 11:51:52 +0100 Subject: [PATCH 42/96] mini debug things --- lua/custom/plugins.lua | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index b63a311..578279c 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -743,6 +743,11 @@ local plugins = { command = "/home/plex/.local/bin/kitty", args = {}, } + dap.adapters.gdb = { + type = "executable", + command = "gdb", + args = { "-i", "dap" }, + } dap.adapters.codelldb = { type = "server", port = "30333", @@ -761,6 +766,7 @@ local plugins = { return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file") end, cwd = "${workspaceFolder}", + -- FIXME: perhaps we can put the stdio somewhere more practical stopOnEntry = false, }, } @@ -784,10 +790,10 @@ local plugins = { dapui.open {} end dap.listeners.before.event_terminated["dapui_config"] = function() - dapui.close {} + -- dapui.close {} end dap.listeners.before.event_exited["dapui_config"] = function() - dapui.close {} + -- dapui.close {} end end, }, From 3d3c415db620d726df3aa01cf9edc316104c0b75 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Wed, 7 Feb 2024 13:38:16 +0100 Subject: [PATCH 43/96] error notify --- lua/custom/plugins.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 578279c..d9173a1 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -347,7 +347,9 @@ local plugins = { }, messages = { enabled = true, - view_error = "messages", -- so it does not spam boxes with errors + -- NOTE: we keep it with notify, + -- change this to something else if you want + view_error = "notify", }, popupmenu = { enabled = true, From 45895c23e40455fc399d7756e66706e0b820f81c Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Wed, 7 Feb 2024 21:45:25 +0100 Subject: [PATCH 44/96] dont want markdownlint anymore --- lua/custom/plugins.lua | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 465b971..ae61192 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -94,6 +94,7 @@ local plugins = { ["]"] = { name = "+next" }, ["["] = { name = "+prev" }, ["x"] = { name = "+diagnostics/quickfix" }, + ["d"] = { name = "+debug" }, ["c"] = { name = "+code" }, ["g"] = { name = "+git" }, ["t"] = { name = "+toggle/tools" }, @@ -580,10 +581,8 @@ local plugins = { builtins.formatting.black, builtins.formatting.fixjson, builtins.formatting.golines, - builtins.formatting.markdownlint, builtins.formatting.shellharden, builtins.formatting.sql_formatter, - builtins.diagnostics.markdownlint, builtins.diagnostics.mypy, builtins.diagnostics.vint, builtins.diagnostics.yamllint, From 93581616c1e4ca18e641c903f08db3d01e8bdabc Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Thu, 8 Feb 2024 13:37:10 +0100 Subject: [PATCH 45/96] disable lsp for rustaceanvim --- lua/custom/plugins.lua | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index d9173a1..6b80b14 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -805,6 +805,24 @@ local plugins = { enabled = true, version = "^4", -- Recommended ft = { "rust" }, + config = function() + vim.g.rustaceanvim = { + -- Plugin configuration + tools = {}, + -- LSP configuration + server = { + on_attach = function(client, bufnr) + -- you can also put keymaps in here + end, + default_settings = { + -- rust-analyzer language server configuration + ["rust-analyzer"] = {}, + }, + }, + -- DAP configuration + dap = {}, + } + end, }, { "theHamsta/nvim-dap-virtual-text", @@ -817,13 +835,7 @@ local plugins = { tools = {}, -- LSP configuration server = { - on_attach = function(client, bufnr) - -- you can also put keymaps in here - end, - settings = { - -- rust-analyzer language server configuration - ["rust-analyzer"] = {}, - }, + auto_attach = false, }, -- DAP configuration dap = { From c05a9c9c4d25f5d4cbaf0346d2f8436b7379fd4f Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Thu, 8 Feb 2024 13:38:13 +0100 Subject: [PATCH 46/96] fix auto merge --- lua/custom/plugins.lua | 30 +++++++----------------------- 1 file changed, 7 insertions(+), 23 deletions(-) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index d69b9cd..cb96d77 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -805,29 +805,6 @@ local plugins = { version = "^4", -- Recommended ft = { "rust" }, config = function() - vim.g.rustaceanvim = { - -- Plugin configuration - tools = {}, - -- LSP configuration - server = { - on_attach = function(client, bufnr) - -- you can also put keymaps in here - end, - default_settings = { - -- rust-analyzer language server configuration - ["rust-analyzer"] = {}, - }, - }, - -- DAP configuration - dap = {}, - } - end, - }, - { - "theHamsta/nvim-dap-virtual-text", - lazy = false, -- PERF: this can be done more elegant - config = function() - require("nvim-dap-virtual-text").setup() local dap = require "dap" vim.g.rustaceanvim = { -- Plugin configuration @@ -846,6 +823,13 @@ local plugins = { } end, }, + { + "theHamsta/nvim-dap-virtual-text", + lazy = false, -- PERF: this can be done more elegant + config = function() + require("nvim-dap-virtual-text").setup() + end, + }, } return plugins From c303f4a474aa2675d0cec90b6f1ff06b0a138a87 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Fri, 9 Feb 2024 15:29:17 +0100 Subject: [PATCH 47/96] djlint and formatting improvements --- lua/custom/mappings.lua | 2 +- lua/custom/plugins.lua | 15 ++++++--------- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index 42a15d1..0dcfdc2 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -410,7 +410,7 @@ M.edit = { -- format with conform ["ff"] = { function() - require("conform").format() + vim.lsp.buf.format() end, "format buffer", }, diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index cb96d77..fbb1d0e 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -580,15 +580,12 @@ local plugins = { local nls = require "null-ls" local builtins = nls.builtins local sources = { - builtins.formatting.black, - builtins.formatting.fixjson, - builtins.formatting.golines, - builtins.formatting.shellharden, - builtins.formatting.sql_formatter, - builtins.diagnostics.mypy, - builtins.diagnostics.vint, - builtins.diagnostics.yamllint, - builtins.code_actions.shellcheck, + builtins.formatting.djlint.with { + filetypes = { "django", "jinja.html", "htmldjango", "tera", "html" }, + }, + builtins.diagnostics.djlint.with { + filetypes = { "django", "jinja.html", "htmldjango", "tera", "html" }, + }, builtins.formatting.shfmt, builtins.diagnostics.write_good.with { diagnostics_postprocess = function(diagnostic) From 9eeb40994c2f65271c5497a1f601f6b9e100945e Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Fri, 9 Feb 2024 15:42:09 +0100 Subject: [PATCH 48/96] spell --- spell/en.utf-8.add | 4 ++++ spell/en.utf-8.add.spl | Bin 3528 -> 3559 bytes 2 files changed, 4 insertions(+) diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index 70ff233..c241e59 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -275,3 +275,7 @@ IoT einen NTSecureGateway SoC +Lockscreen +licht/! +Licht +ESRDD diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl index a421d971f7f7f3c7064cae62ec9939ef7e3316c5..cb8d3cd33a8412fe74d956c70c77ee545edbac2d 100644 GIT binary patch delta 696 zcmX9*O=}cE5S{9tkDU!kHeNPnQ7{PzQHdmq8c;A0M8q6C-WY+;D z@fbaLD1?BJn+PH-8U(?ENBseM5`y3t<|YA8Vtli@v6a$g;W-e-;nQxuTdFvZ)%Y+5)d?w}sSkyVlUzL9VyF?v$y^ zo6a0f^Nw?BayxLUD$Ux`c)Pt~YO!qv1@oWCH0vOurlzJz_K|1YIhy5lw+#NKyM}n! zTcUYh^G1Yp_=$Izh+lgFz2MSRO_`* zqoEpYHUmSBPZ?TtFphCE3;Qd7@sH3A{^w7WKraWX9vkr_)pvNNSfQL3ij(e8M3&p- zhsC3Gi=P)qMrV&>RvBbFI5i@W|I}UM@w9@1eTaV)&t1wj$~Cr9xG|S)N5!dz*!PYI uViA~OH{cbB$RLICWNh*m);N~9`kf{2G$O0h=|*314(lGV*loNN+&HKLZeQ$Q%PwwQM`P-egjN{q= zj5$v}Og`XFE(oKzm1tb%OSsElfX0X77%by+aSD8VCl+8I|A=e!En82I?5CUoV~Z(| zIslCOIJ9Oa1`&ARLqZwh;BRZLsUuL73n4P6z9rBDNfB$tyq-`Pz<^##e2vY4gOqX| z=#C)ZZNu_HnOcoRr(@6!kE(3~3r)|gq{uUUtGJn|f&0=vUw-drJgL&2FskmiG?m3q zNs#707Aoyi1Z_<)RN2ORc5SMf5R9SjkKowiK(GLq<>IFO460bk)?p6cWJ{bM;4nJ{ z40p0Vyuymp1{>EL_q4T_5*}L*pgEdQFwFx)auKe=B`RfB@Vm1_R@QPiE2Wqwkf3>8 z38_d=(dc8>jW*#JE7-rT2=#!bfXk9TE0Lls*SM8CK5y+cpfR#ilVDAj8z+ckn39|0 z)toVVvA)FMi#oXwQNxI1OVdWeu^$U~GCyuWZsF&AX}Wrr`o~@=qBc|WUrpPnzaR-m{6)KP<%ZT|gb}Prrz!R_GE$nrw)@ Date: Fri, 9 Feb 2024 18:49:07 +0100 Subject: [PATCH 49/96] ft alias --- lua/custom/init.lua | 123 +++++++++++++++++++++++--------------------- 1 file changed, 63 insertions(+), 60 deletions(-) diff --git a/lua/custom/init.lua b/lua/custom/init.lua index a510a86..24586dc 100644 --- a/lua/custom/init.lua +++ b/lua/custom/init.lua @@ -2,7 +2,7 @@ local opt = vim.opt local g = vim.g g.maplocalleader = ";" -opt.mouse = "a" -- mouse does annoying things for me if it's not 'a' +opt.mouse = "a" -- mouse does annoying things for me if it's not 'a' opt.signcolumn = "yes" opt.clipboard = "" -- don't just use the system clipboard opt.wrap = false @@ -19,13 +19,13 @@ opt.shada = { "'1000", "<50", "s10", "h" } -- Tabs and Indents -- === -opt.textwidth = 80 -- Text width maximum chars before wrapping -opt.tabstop = 4 -- The number of spaces a tab is -opt.shiftwidth = 4 -- Number of spaces to use in auto(indent) -opt.smarttab = true -- Tab insert blanks according to 'shiftwidth' -opt.autoindent = true -- Use same indenting on new lines +opt.textwidth = 80 -- Text width maximum chars before wrapping +opt.tabstop = 4 -- The number of spaces a tab is +opt.shiftwidth = 4 -- Number of spaces to use in auto(indent) +opt.smarttab = true -- Tab insert blanks according to 'shiftwidth' +opt.autoindent = true -- Use same indenting on new lines opt.smartindent = true -- Smart autoindenting on new lines -opt.shiftround = true -- Round indent to multiple of 'shiftwidth' +opt.shiftround = true -- Round indent to multiple of 'shiftwidth' -- Timing -- === @@ -37,18 +37,18 @@ opt.updatetime = 500 -- Idle time to write swap and trigger CursorHold -- Searching -- === opt.ignorecase = true -- Search ignoring case -opt.smartcase = true -- Keep case when searching with * -opt.infercase = true -- Adjust case in insert completion mode -opt.incsearch = true -- Incremental search +opt.smartcase = true -- Keep case when searching with * +opt.infercase = true -- Adjust case in insert completion mode +opt.incsearch = true -- Incremental search -- Formatting -- === -opt.wrap = false -- No wrap by default -opt.linebreak = true -- Break long lines at 'breakat' +opt.wrap = false -- No wrap by default +opt.linebreak = true -- Break long lines at 'breakat' opt.breakat = "\\ \\ ;:,!?" -- Long lines break chars -opt.startofline = false -- Cursor in same column for few commands -opt.splitbelow = true -- Splits open bottom right +opt.startofline = false -- Cursor in same column for few commands +opt.splitbelow = true -- Splits open bottom right opt.splitright = true opt.breakindentopt = { shift = 2, min = 20 } opt.formatoptions = "qnlmBjp" -- see :h fo-table & :h formatoptions @@ -70,31 +70,31 @@ opt.foldlevel = 10 -- start with all folds open vim.o.guifont = "FiraCode Nerd Font:h22" opt.termguicolors = true opt.shortmess = "xsTOInfFitloCaAs" -opt.showmode = true -- Show mode in cmd window -opt.scrolloff = 2 -- Keep at least n lines above/below +opt.showmode = true -- Show mode in cmd window +opt.scrolloff = 2 -- Keep at least n lines above/below opt.sidescrolloff = 0 -- Keep at least n lines left/right -opt.numberwidth = 2 -- Minimum number of columns to use for the line number -opt.number = true -- Show line numbers -opt.ruler = true -- Default status ruler -opt.list = true -- Show hidden characters -opt.showtabline = 1 -- Don't change this, goes back to a vanilla vim default -opt.laststatus = 3 -- Always show laststatus +opt.numberwidth = 2 -- Minimum number of columns to use for the line number +opt.number = true -- Show line numbers +opt.ruler = true -- Default status ruler +opt.list = true -- Show hidden characters +opt.showtabline = 1 -- Don't change this, goes back to a vanilla vim default +opt.laststatus = 3 -- Always show laststatus if vim.g.started_by_firenvim == true then - opt.showtabline = 1 -- Don't show tabline in firenvim, unless multitab - opt.laststatus = 1 -- Don't show laststatus in firenvim - opt.wrap = true + opt.showtabline = 1 -- Don't show tabline in firenvim, unless multitab + opt.laststatus = 1 -- Don't show laststatus in firenvim + opt.wrap = true end -opt.helpheight = 0 -- Disable help window resizing -opt.winwidth = 30 -- Minimum width for active window -opt.winminwidth = 1 -- Minimum width for inactive windows -opt.winheight = 1 -- Minimum height for active window -opt.winminheight = 1 -- Minimum height for inactive window +opt.helpheight = 0 -- Disable help window resizing +opt.winwidth = 30 -- Minimum width for active window +opt.winminwidth = 1 -- Minimum width for inactive windows +opt.winheight = 1 -- Minimum height for active window +opt.winminheight = 1 -- Minimum height for inactive window -opt.showcmd = false -- show command in status line +opt.showcmd = false -- show command in status line opt.cmdheight = 0 -opt.cmdwinheight = 5 -- Command-line lines +opt.cmdwinheight = 5 -- Command-line lines opt.equalalways = true -- Resize windows on split or close opt.colorcolumn = "+0" -- Column highlight at textwidth's max character-limit @@ -102,8 +102,8 @@ opt.cursorline = true opt.cursorlineopt = { "number", "screenline" } opt.pumheight = 10 -- Maximum number of items to show in the popup menu -opt.pumwidth = 10 -- Minimum width for the popup menu -opt.pumblend = 10 -- Popup blend +opt.pumwidth = 10 -- Minimum width for the popup menu +opt.pumblend = 10 -- Popup blend -- Spelling correction -- === @@ -115,50 +115,53 @@ opt.spellsuggest = "double,50,timeout:5000" -- autocommands -- === local function augroup(name) - return vim.api.nvim_create_augroup("plex_" .. name, {}) + return vim.api.nvim_create_augroup("plex_" .. name, {}) end -- highlight on yank vim.api.nvim_create_autocmd("TextYankPost", { - group = augroup "highlight_yank", - callback = function() - vim.highlight.on_yank() - end, + group = augroup "highlight_yank", + callback = function() + vim.highlight.on_yank() + end, }) -- Disable conceallevel for specific file-types. vim.api.nvim_create_autocmd("FileType", { - group = augroup "fix_conceallevel", - pattern = { "latex", "tex" }, - callback = function() - vim.opt_local.conceallevel = 0 - end, + group = augroup "fix_conceallevel", + pattern = { "latex", "tex" }, + callback = function() + vim.opt_local.conceallevel = 0 + end, }) -- Resize splits if window got resized vim.api.nvim_create_autocmd("VimResized", { - group = augroup "resize_splits", - callback = function() - vim.cmd "wincmd =" - end, + group = augroup "resize_splits", + callback = function() + vim.cmd "wincmd =" + end, }) -- Wrap and enable spell-checker in text filetypes vim.api.nvim_create_autocmd("FileType", { - group = augroup "spell_conceal", - pattern = { "gitcommit", "markdown", "tex", "latex", "norg" }, - callback = function() - vim.opt_local.spell = true - vim.opt_local.conceallevel = 0 - end, + group = augroup "spell_conceal", + pattern = { "gitcommit", "markdown", "tex", "latex", "norg" }, + callback = function() + vim.opt_local.spell = true + vim.opt_local.conceallevel = 0 + end, }) -- map resizing for firenvim if vim.g.started_by_firenvim == true then - vim.keymap.set("n", "", function() - vim.o.lines = vim.o.lines + 1 - end, { expr = true, desc = "Make Display bigger" }) - vim.keymap.set("n", "", function() - vim.o.lines = vim.o.lines - 1 - end, { expr = true, desc = "Make Display smaller" }) + vim.keymap.set("n", "", function() + vim.o.lines = vim.o.lines + 1 + end, { expr = true, desc = "Make Display bigger" }) + vim.keymap.set("n", "", function() + vim.o.lines = vim.o.lines - 1 + end, { expr = true, desc = "Make Display smaller" }) end + +-- alias filetypes +vim.filetype.add { extension = { tera = 'html' } } From b3600561aa468553e35ea9a5e6b68257e0878147 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Thu, 15 Feb 2024 14:51:45 +0100 Subject: [PATCH 50/96] args passed to debugger --- lua/custom/plugins.lua | 1490 ++++++++++++++++++++-------------------- lua/custom/utils.lua | 67 ++ 2 files changed, 814 insertions(+), 743 deletions(-) create mode 100644 lua/custom/utils.lua diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index fbb1d0e..cc707f4 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -3,204 +3,204 @@ local overrides = require "custom.configs.overrides" ---@type NvPluginSpec[] local plugins = { - -- Override plugin definition options + -- Override plugin definition options - { - "neovim/nvim-lspconfig", - config = function() - require "plugins.configs.lspconfig" - require "custom.configs.lspconfig" - end, -- Override to setup mason-lspconfig - }, - -- override plugin configs - { - "williamboman/mason.nvim", - opts = overrides.mason, - }, - - { - "nvim-treesitter/nvim-treesitter", - opts = overrides.treesitter, - }, - - { - "nvim-tree/nvim-tree.lua", - opts = overrides.nvimtree, - }, - - -- Install a plugin - { - -- exit insert mode with 'jk' - "max397574/better-escape.nvim", - enabled = true, - event = "InsertEnter", - config = function() - require("better_escape").setup() - end, - }, - - { - "stevearc/conform.nvim", - -- for users those who want auto-save conform + lazyloading! - -- event = "BufWritePre" - config = function() - require "custom.configs.conform" - end, - }, - { - "ggandor/leap.nvim", - lazy = false, - config = function() - require("core.utils").load_mappings "leap" - end, - }, - { - "ggandor/flit.nvim", - lazy = false, - config = function() - require("flit").setup { - keys = { f = "f", F = "F", t = "t", T = "T" }, - -- A string like "nv", "nvo", "o", etc. - labeled_modes = "v", - multiline = true, - -- Like `leap`s similar argument (call-specific overrides). - -- E.g.: opts = { equivalence_classes = {} } - opts = {}, - } - end, - }, - { - "kdheepak/lazygit.nvim", - lazy = false, - keys = { "gg" }, - cmd = "LazyGit", - -- optional for floating window border decoration - dependencies = { - "nvim-lua/plenary.nvim", + { + "neovim/nvim-lspconfig", + config = function() + require "plugins.configs.lspconfig" + require "custom.configs.lspconfig" + end, -- Override to setup mason-lspconfig }, - init = function() - require("core.utils").load_mappings "lazygit" - end, - }, - { - "folke/which-key.nvim", - keys = { "", "", "", "", '"', "'", "`", "c", "v", "g" }, - defaults = { - mode = { "n", "v" }, - [";"] = { name = "+telescope" }, - [";f"] = { name = "+find" }, - [";d"] = { name = "+lsp/todo" }, - ["g"] = { name = "+goto" }, - ["]"] = { name = "+next" }, - ["["] = { name = "+prev" }, - ["x"] = { name = "+diagnostics/quickfix" }, - ["d"] = { name = "+debug" }, - ["c"] = { name = "+code" }, - ["g"] = { name = "+git" }, - ["t"] = { name = "+toggle/tools" }, - ["w"] = { name = "+window/which" }, - ["f"] = { name = "+formatting" }, + -- override plugin configs + { + "williamboman/mason.nvim", + opts = overrides.mason, }, - }, - { "echasnovski/mini.trailspace", lazy = false, event = { "BufReadPost", "BufNewFile" }, opts = {} }, - { - "itchyny/vim-cursorword", - event = "FileType", - init = function() - vim.g.cursorword = 0 - end, - config = function() - local augroup = vim.api.nvim_create_augroup("plex_cursorword", {}) - vim.api.nvim_create_autocmd("FileType", { - group = augroup, - pattern = { - "conf", - "dosini", - "json", - "markdown", - "nginx", - "text", - "yaml", + + { + "nvim-treesitter/nvim-treesitter", + opts = overrides.treesitter, + }, + + { + "nvim-tree/nvim-tree.lua", + opts = overrides.nvimtree, + }, + + -- Install a plugin + { + -- exit insert mode with 'jk' + "max397574/better-escape.nvim", + enabled = true, + event = "InsertEnter", + config = function() + require("better_escape").setup() + end, + }, + + { + "stevearc/conform.nvim", + -- for users those who want auto-save conform + lazyloading! + -- event = "BufWritePre" + config = function() + require "custom.configs.conform" + end, + }, + { + "ggandor/leap.nvim", + lazy = false, + config = function() + require("core.utils").load_mappings "leap" + end, + }, + { + "ggandor/flit.nvim", + lazy = false, + config = function() + require("flit").setup { + keys = { f = "f", F = "F", t = "t", T = "T" }, + -- A string like "nv", "nvo", "o", etc. + labeled_modes = "v", + multiline = true, + -- Like `leap`s similar argument (call-specific overrides). + -- E.g.: opts = { equivalence_classes = {} } + opts = {}, + } + end, + }, + { + "kdheepak/lazygit.nvim", + lazy = false, + keys = { "gg" }, + cmd = "LazyGit", + -- optional for floating window border decoration + dependencies = { + "nvim-lua/plenary.nvim", }, - callback = function() - if vim.wo.diff or vim.wo.previewwindow then - vim.b.cursorword = 0 - else - vim.b.cursorword = 1 - end + init = function() + require("core.utils").load_mappings "lazygit" end, - }) - vim.api.nvim_create_autocmd("InsertEnter", { - group = augroup, - callback = function() - if vim.b["cursorword"] == 1 then - vim.b["cursorword"] = 0 - end - end, - }) - vim.api.nvim_create_autocmd("InsertLeave", { - group = augroup, - callback = function() - if vim.b["cursorword"] == 0 then - vim.b["cursorword"] = 1 - end - end, - }) - end, - }, - - { - "RRethy/vim-illuminate", - lazy = false, - event = { "BufReadPost", "BufNewFile" }, - opts = { - delay = 200, - under_cursor = false, - modes_allowlist = { "n", "no", "nt" }, - filetypes_denylist = { - "DiffviewFileHistory", - "DiffviewFiles", - "SidebarNvim", - "fugitive", - "git", - "minifiles", - "neo-tree", - }, }, - keys = { - { "]]", desc = "Next Reference" }, - { "[[", desc = "Prev Reference" }, + { + "folke/which-key.nvim", + keys = { "", "", "", "", '"', "'", "`", "c", "v", "g" }, + defaults = { + mode = { "n", "v" }, + [";"] = { name = "+telescope" }, + [";f"] = { name = "+find" }, + [";d"] = { name = "+lsp/todo" }, + ["g"] = { name = "+goto" }, + ["]"] = { name = "+next" }, + ["["] = { name = "+prev" }, + ["x"] = { name = "+diagnostics/quickfix" }, + ["d"] = { name = "+debug" }, + ["c"] = { name = "+code" }, + ["g"] = { name = "+git" }, + ["t"] = { name = "+toggle/tools" }, + ["w"] = { name = "+window/which" }, + ["f"] = { name = "+formatting" }, + }, }, - config = function(_, opts) - require("illuminate").configure(opts) - - local function map(key, dir, buffer) - vim.keymap.set("n", key, function() - require("illuminate")["goto_" .. dir .. "_reference"](false) - end, { - desc = dir:sub(1, 1):upper() .. dir:sub(2) .. " Reference", - buffer = buffer, - }) - end - - map("]]", "next") - map("[[", "prev") - - -- also set it after loading ftplugins, since a lot overwrite [[ and ]] - vim.api.nvim_create_autocmd("FileType", { - group = vim.api.nvim_create_augroup("plex_illuminate", {}), - callback = function() - local buffer = vim.api.nvim_get_current_buf() - map("]]", "next", buffer) - map("[[", "prev", buffer) + { "echasnovski/mini.trailspace", lazy = false, event = { "BufReadPost", "BufNewFile" }, opts = {} }, + { + "itchyny/vim-cursorword", + event = "FileType", + init = function() + vim.g.cursorword = 0 end, - }) - end, - }, - { - "folke/todo-comments.nvim", - lazy = false, - dependencies = "nvim-telescope/telescope.nvim", + config = function() + local augroup = vim.api.nvim_create_augroup("plex_cursorword", {}) + vim.api.nvim_create_autocmd("FileType", { + group = augroup, + pattern = { + "conf", + "dosini", + "json", + "markdown", + "nginx", + "text", + "yaml", + }, + callback = function() + if vim.wo.diff or vim.wo.previewwindow then + vim.b.cursorword = 0 + else + vim.b.cursorword = 1 + end + end, + }) + vim.api.nvim_create_autocmd("InsertEnter", { + group = augroup, + callback = function() + if vim.b["cursorword"] == 1 then + vim.b["cursorword"] = 0 + end + end, + }) + vim.api.nvim_create_autocmd("InsertLeave", { + group = augroup, + callback = function() + if vim.b["cursorword"] == 0 then + vim.b["cursorword"] = 1 + end + end, + }) + end, + }, + + { + "RRethy/vim-illuminate", + lazy = false, + event = { "BufReadPost", "BufNewFile" }, + opts = { + delay = 200, + under_cursor = false, + modes_allowlist = { "n", "no", "nt" }, + filetypes_denylist = { + "DiffviewFileHistory", + "DiffviewFiles", + "SidebarNvim", + "fugitive", + "git", + "minifiles", + "neo-tree", + }, + }, + keys = { + { "]]", desc = "Next Reference" }, + { "[[", desc = "Prev Reference" }, + }, + config = function(_, opts) + require("illuminate").configure(opts) + + local function map(key, dir, buffer) + vim.keymap.set("n", key, function() + require("illuminate")["goto_" .. dir .. "_reference"](false) + end, { + desc = dir:sub(1, 1):upper() .. dir:sub(2) .. " Reference", + buffer = buffer, + }) + end + + map("]]", "next") + map("[[", "prev") + + -- also set it after loading ftplugins, since a lot overwrite [[ and ]] + vim.api.nvim_create_autocmd("FileType", { + group = vim.api.nvim_create_augroup("plex_illuminate", {}), + callback = function() + local buffer = vim.api.nvim_get_current_buf() + map("]]", "next", buffer) + map("[[", "prev", buffer) + end, + }) + end, + }, + { + "folke/todo-comments.nvim", + lazy = false, + dependencies = "nvim-telescope/telescope.nvim", -- stylua: ignore keys = { { ']t', function() require('todo-comments').jump_next() end, desc = 'Next todo comment' }, @@ -209,39 +209,39 @@ local plugins = { { 'xt', 'TodoTrouble', desc = 'Todo (Trouble)' }, { 'xT', 'TodoTrouble keywords=TODO,FIX,FIXME', desc = 'Todo/Fix/Fixme (Trouble)' }, }, - opts = { - signs = true, - keywords = { - FIX = { - icon = " ", -- icon used for the sign, and in search results - color = "error", -- can be a hex color, or a named color (see below) - alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords + opts = { + signs = true, + keywords = { + FIX = { + icon = " ", -- icon used for the sign, and in search results + color = "error", -- can be a hex color, or a named color (see below) + alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords + }, + TODO = { icon = " ", color = "todo" }, + HACK = { icon = " ", color = "hack" }, + SECURITY = { icon = "󰒃 ", color = "security" }, + WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } }, + PERF = { icon = " ", color = "perf", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } }, + NOTE = { icon = " ", color = "hint", alt = { "INFO" } }, + TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } }, + }, + colors = { + error = { "DiagnosticError", "ErrorMsg", "#DC2626" }, + warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" }, + todo = { "DiagnosticTodo", "#80e64d" }, + hint = { "DiagnosticHint", "#10B981" }, + hack = { "DiagnosticHack", "#FF33FF" }, + security = { "DiagnosticSecurity", "#FF6600" }, + default = { "Identifier", "#7C3AED" }, + test = { "DiagnosticTest", "#E6E600" }, + perf = { "DiagnosticPerf", "#9999ff" }, + }, }, - TODO = { icon = " ", color = "todo" }, - HACK = { icon = " ", color = "hack" }, - SECURITY = { icon = "󰒃 ", color = "security" }, - WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } }, - PERF = { icon = " ", color = "perf", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } }, - NOTE = { icon = " ", color = "hint", alt = { "INFO" } }, - TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } }, - }, - colors = { - error = { "DiagnosticError", "ErrorMsg", "#DC2626" }, - warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" }, - todo = { "DiagnosticTodo", "#80e64d" }, - hint = { "DiagnosticHint", "#10B981" }, - hack = { "DiagnosticHack", "#FF33FF" }, - security = { "DiagnosticSecurity", "#FF6600" }, - default = { "Identifier", "#7C3AED" }, - test = { "DiagnosticTest", "#E6E600" }, - perf = { "DiagnosticPerf", "#9999ff" }, - }, }, - }, - { - "folke/trouble.nvim", - cmd = { "Trouble", "TroubleToggle" }, - opts = { use_diagnostic_signs = true }, + { + "folke/trouble.nvim", + cmd = { "Trouble", "TroubleToggle" }, + opts = { use_diagnostic_signs = true }, -- stylua: ignore keys = { { @@ -285,548 +285,552 @@ local plugins = { desc = 'Next trouble/quickfix item', }, }, - }, - { - "NvChad/nvterm", - enabled = false, - }, - { - "akinsho/toggleterm.nvim", - init = function() - require("core.utils").load_mappings "toggleterm" - end, - cmd = "ToggleTerm", - opts = { - size = function(term) - if term.direction == "horizontal" then - return vim.o.lines * 0.35 - elseif term.direction == "vertical" then - return vim.o.columns * 0.35 - else - return 20 - end - end, - open_mapping = false, - float_opts = { - border = "curved", - }, }, - }, - -- lazy.nvim - { - "folke/noice.nvim", - event = "VeryLazy", - -- config.lsp.signature.enabled = false - dependencies = { - -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries - "MunifTanjim/nui.nvim", - -- OPTIONAL: - -- `nvim-notify` is only needed, if you want to use the notification view. - -- If not available, we use `mini` as the fallback - "rcarriga/nvim-notify", + { + "NvChad/nvterm", + enabled = false, }, - config = function() - require("noice").setup { - lsp = { - override = { - ["vim.lsp.util.convert_input_to_markdown_lines"] = true, - ["vim.lsp.util.stylize_markdown"] = true, - ["cmp.entry.get_documentation"] = true, - }, - -- IDK how to disable the nvchad builtins for this, which would - -- produce a conflict - signature = { enabled = false }, - hover = { enabled = false }, - }, - -- you can enable a preset for easier configuration - presets = { - bottom_search = true, -- use a classic bottom cmdline for search - command_palette = true, -- position the cmdline and popupmenu together - long_message_to_split = true, -- long messages will be sent to a split - inc_rename = false, -- enables an input dialog for inc-rename.nvim - lsp_doc_border = false, -- add a border to hover docs and signature help - }, - messages = { - enabled = true, - -- NOTE: we keep it with notify, - -- change this to something else if you want - view_error = "notify", - }, - popupmenu = { - enabled = true, - }, - notify = { - enabled = true, - }, - } - end, - }, - { - "goolord/alpha-nvim", - enabled = false, - lazy = false, - dependencies = { "nvim-tree/nvim-web-devicons" }, - config = function() - local dash = require "alpha.themes.dashboard" - require("alpha").setup(dash.config) - end, - }, - { - "stevearc/dressing.nvim", - init = function() - ---@diagnostic disable-next-line: duplicate-set-field - vim.ui.select = function(...) - require("lazy").load { plugins = { "dressing.nvim" } } - return vim.ui.select(...) - end - ---@diagnostic disable-next-line: duplicate-set-field - vim.ui.input = function(...) - require("lazy").load { plugins = { "dressing.nvim" } } - return vim.ui.input(...) - end - end, - }, - { - "chentoast/marks.nvim", - lazy = false, - dependencies = "lewis6991/gitsigns.nvim", - event = "FileType", - opts = { - sign_priority = { lower = 10, upper = 15, builtin = 8, bookmark = 20 }, - bookmark_1 = { sign = "󰉀" }, -- ⚐ ⚑ 󰈻 󰈼 󰈽 󰈾 󰈿 󰉀 - }, - }, - { - "kevinhwang91/nvim-bqf", - ft = "qf", - cmd = "BqfAutoToggle", - event = "QuickFixCmdPost", - opts = { - auto_resize_height = false, - func_map = { - tab = "st", - split = "sv", - vsplit = "sg", - - stoggleup = "K", - stoggledown = "J", - stogglevm = "", - - ptoggleitem = "p", - ptoggleauto = "P", - ptogglemode = "zp", - - pscrollup = "", - pscrolldown = "", - - prevfile = "gk", - nextfile = "gj", - - prevhist = "", - nexthist = "", - }, - preview = { - auto_preview = true, - should_preview_cb = function(bufnr) - -- file size greater than 100kb can't be previewed automatically - local filename = vim.api.nvim_buf_get_name(bufnr) - local fsize = vim.fn.getfsize(filename) - if fsize > 100 * 1024 then - return false - end - return true + { + "akinsho/toggleterm.nvim", + init = function() + require("core.utils").load_mappings "toggleterm" end, - }, - }, - }, - { - "uga-rosa/ccc.nvim", - lazy = false, - event = "FileType", - keys = { - { "cp", "CccPick", desc = "Color-picker" }, - }, - opts = { - highlighter = { - auto_enable = true, - lsp = true, - excludes = { "lazy", "mason", "help", "neo-tree" }, - }, - }, - }, - { - "Bekaboo/deadcolumn.nvim", - event = { "BufReadPre", "BufNewFile" }, - }, - { - "rmagatti/goto-preview", - event = "FileType", - config = function() - require("core.utils").load_mappings "goto_preview" - require("goto-preview").setup {} - end, - dependencies = "nvim-telescope/telescope.nvim", - opts = { - width = 78, - height = 15, - default_mappings = false, - opacity = 10, - }, - }, - { - "glacambre/firenvim", - lazy = not vim.g.started_by_firenvim, - build = function() - vim.fn["firenvim#install"](0) - end, - config = function() - vim.g.firenvim_config = { - localSettings = { - [".*"] = { - filename = "/tmp/{hostname}_{pathname%10}.{extension%5}", - cmdline = "firenvim", - takeover = "never", -- can't open it with never at all? - }, + cmd = "ToggleTerm", + opts = { + size = function(term) + if term.direction == "horizontal" then + return vim.o.lines * 0.35 + elseif term.direction == "vertical" then + return vim.o.columns * 0.35 + else + return 20 + end + end, + open_mapping = false, + float_opts = { + border = "curved", + }, }, - } - end, - }, - { - "sidebar-nvim/sidebar.nvim", - cmd = { "SidebarNvimToggle", "SidebarNvimOpen" }, - config = function() - require("sidebar-nvim").setup { - bindings = { - ["q"] = function() - require("sidebar-nvim").close() - end, + }, + -- lazy.nvim + { + "folke/noice.nvim", + event = "VeryLazy", + -- config.lsp.signature.enabled = false + dependencies = { + -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries + "MunifTanjim/nui.nvim", + -- OPTIONAL: + -- `nvim-notify` is only needed, if you want to use the notification view. + -- If not available, we use `mini` as the fallback + "rcarriga/nvim-notify", }, - } - end, - }, - { - "dhruvasagar/vim-table-mode", - lazy = false, - -- tm is automatically set for toggle - -- see t menu - }, - { - "kevinhwang91/nvim-ufo", - event = { "BufReadPost", "BufNewFile" }, - -- stylua: ignore - keys = { - { 'zR', function() require('ufo').openAllFolds() end }, - { 'zM', function() require('ufo').closeAllFolds() end }, + config = function() + require("noice").setup { + lsp = { + override = { + ["vim.lsp.util.convert_input_to_markdown_lines"] = true, + ["vim.lsp.util.stylize_markdown"] = true, + ["cmp.entry.get_documentation"] = true, + }, + -- IDK how to disable the nvchad builtins for this, which would + -- produce a conflict + signature = { enabled = false }, + hover = { enabled = false }, + }, + -- you can enable a preset for easier configuration + presets = { + bottom_search = true, -- use a classic bottom cmdline for search + command_palette = true, -- position the cmdline and popupmenu together + long_message_to_split = true, -- long messages will be sent to a split + inc_rename = false, -- enables an input dialog for inc-rename.nvim + lsp_doc_border = false, -- add a border to hover docs and signature help + }, + messages = { + enabled = true, + -- NOTE: we keep it with notify, + -- change this to something else if you want + view_error = "notify", + }, + popupmenu = { + enabled = true, + }, + notify = { + enabled = true, + }, + } + end, }, - dependencies = { - "kevinhwang91/promise-async", - "nvim-treesitter/nvim-treesitter", - "neovim/nvim-lspconfig", + { + "goolord/alpha-nvim", + enabled = false, + lazy = false, + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + local dash = require "alpha.themes.dashboard" + require("alpha").setup(dash.config) + end, }, - opts = function() - -- fancy display function for folds (stolen from nvim-ufo readme) - local handler = function(virtText, lnum, endLnum, width, truncate) - local newVirtText = {} - local suffix = (" 󰁂 %d "):format(endLnum - lnum) - local sufWidth = vim.fn.strdisplaywidth(suffix) - local targetWidth = width - sufWidth - local curWidth = 0 - for _, chunk in ipairs(virtText) do - local chunkText = chunk[1] - local chunkWidth = vim.fn.strdisplaywidth(chunkText) - if targetWidth > curWidth + chunkWidth then - table.insert(newVirtText, chunk) - else - chunkText = truncate(chunkText, targetWidth - curWidth) - local hlGroup = chunk[2] - table.insert(newVirtText, { chunkText, hlGroup }) - chunkWidth = vim.fn.strdisplaywidth(chunkText) - -- str width returned from truncate() may less than 2nd argument, need padding - if curWidth + chunkWidth < targetWidth then - suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth) + { + "stevearc/dressing.nvim", + init = function() + ---@diagnostic disable-next-line: duplicate-set-field + vim.ui.select = function(...) + require("lazy").load { plugins = { "dressing.nvim" } } + return vim.ui.select(...) + end + ---@diagnostic disable-next-line: duplicate-set-field + vim.ui.input = function(...) + require("lazy").load { plugins = { "dressing.nvim" } } + return vim.ui.input(...) end - break - end - curWidth = curWidth + chunkWidth - end - table.insert(newVirtText, { suffix, "MoreMsg" }) - return newVirtText - end - require("ufo").setup { - -- use treesitter to get the folds - provider_selector = function(bufnr, filetype, buftype) - return { "treesitter", "indent" } end, - -- apply out fancy fold display - fold_virt_text_handler = handler, - } - end, - }, - { - -- enables UNIX specific stuff in vim, - -- specifically: - -- :SudoWrite - -- :SudoRead - -- :Chmod - -- and also some more, but those are easy done with shell - "tpope/vim-eunuch", - lazy = false, - }, - { - "nvimtools/none-ls.nvim", - event = { "BufReadPre", "BufNewFile" }, - opts = function(_, opts) - opts.sources = {} - local nls = require "null-ls" - local builtins = nls.builtins - local sources = { - builtins.formatting.djlint.with { - filetypes = { "django", "jinja.html", "htmldjango", "tera", "html" }, - }, - builtins.diagnostics.djlint.with { - filetypes = { "django", "jinja.html", "htmldjango", "tera", "html" }, - }, - builtins.formatting.shfmt, - builtins.diagnostics.write_good.with { - diagnostics_postprocess = function(diagnostic) - diagnostic.severity = vim.diagnostic.severity.HINT - end, - }, - } - for _, source in ipairs(sources) do - table.insert(opts.sources, source) - end - end, - }, - { - "lvimuser/lsp-inlayhints.nvim", - event = "LspAttach", - opts = { - inlay_hints = { - parameter_hints = { show = true }, - type_hints = { show = true }, - only_current_line = false, - -- highlight group - highlight = "LspInlayHint", - -- virt_text priority - priority = 0, - }, }, - config = function(_, opts) - require("lsp-inlayhints").setup(opts) - vim.api.nvim_create_augroup("LspAttach_inlayhints", {}) - vim.api.nvim_create_autocmd("LspAttach", { - group = vim.api.nvim_create_augroup("LspAttach_inlayhints", {}), - callback = function(args) - if not (args.data and args.data.client_id) then - return - end - local client = vim.lsp.get_client_by_id(args.data.client_id) - require("lsp-inlayhints").on_attach(client, args.buf) - end, - }) - -- change how the highlighting looks - vim.cmd "hi LspInlayHint guibg=bg guifg=#804d66" - end, - }, - { "kosayoda/nvim-lightbulb", event = { "BufReadPre", "BufNewFile" } }, - { - "Wansmer/treesj", - cmd = { "TSJJoin", "TSJSplit", "TSJSplit" }, - keys = { - { "", "TSJJoin" }, - { "", "TSJSplit" }, + { + "chentoast/marks.nvim", + lazy = false, + dependencies = "lewis6991/gitsigns.nvim", + event = "FileType", + opts = { + sign_priority = { lower = 10, upper = 15, builtin = 8, bookmark = 20 }, + bookmark_1 = { sign = "󰉀" }, -- ⚐ ⚑ 󰈻 󰈼 󰈽 󰈾 󰈿 󰉀 + }, }, - opts = { - use_default_keymaps = false, - }, - }, - { - "b0o/incline.nvim", - event = "FileType", - config = function() - local function get_diagnostic_label(props) - local icons = { error = "", warn = "", info = "", hint = "" } - local label = {} + { + "kevinhwang91/nvim-bqf", + ft = "qf", + cmd = "BqfAutoToggle", + event = "QuickFixCmdPost", + opts = { + auto_resize_height = false, + func_map = { + tab = "st", + split = "sv", + vsplit = "sg", - for severity, icon in pairs(icons) do - local n = #vim.diagnostic.get(props.buf, { severity = vim.diagnostic.severity[string.upper(severity)] }) - if n > 0 then - table.insert(label, { icon .. " " .. n .. " ", group = "DiagnosticSign" .. severity }) - end - end - if #label > 0 then - table.insert(label, { "| " }) - end - return label - end - local function get_git_diff(props) - local icons = { removed = "", changed = "", added = "" } - local labels = {} - -- local signs = vim.api.nvim_buf_get_var(props.buf, "gitsigns_status_dict") - -- local signs = vim.b.gitsigns_status_dict - -- for name, icon in pairs(icons) do - -- if tonumber(signs[name]) and signs[name] > 0 then - -- table.insert(labels, { icon .. " " .. signs[name] .. " ", group = "Diff" .. name }) - -- end - -- end - if #labels > 0 then - table.insert(labels, { "| " }) - end - return labels - end + stoggleup = "K", + stoggledown = "J", + stogglevm = "", - require("incline").setup { - render = function(props) - local filename = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(props.buf), ":t") - local ft_icon, ft_color = require("nvim-web-devicons").get_icon_color(filename) - local modified = vim.api.nvim_buf_get_option(props.buf, "modified") and "bold,italic" or "bold" + ptoggleitem = "p", + ptoggleauto = "P", + ptogglemode = "zp", - local buffer = { - { get_diagnostic_label(props) }, - { get_git_diff(props) }, - { ft_icon, guifg = ft_color }, - { " " }, - { filename, gui = modified }, - } - return buffer - end, - } - end, - }, - { - "mikesmithgh/kitty-scrollback.nvim", - enabled = true, - lazy = true, - cmd = { "KittyScrollbackGenerateKittens", "KittyScrollbackCheckHealth" }, - event = { "User KittyScrollbackLaunch" }, - -- version = '*', -- latest stable version, may have breaking changes if major version changed - -- version = '^3.0.0', -- pin major version, include fixes and features that do not have breaking changes - config = function() - require("kitty-scrollback").setup { - myconfig = function() - return { keymaps_enabled = false } - end, - } - end, - }, - { - "hrsh7th/nvim-cmp", - enabled = not vim.g.started_by_firenvim, - }, - { - "ziontee113/icon-picker.nvim", - keys = { - { "", "IconPickerNormal", desc = "pick icon" }, - { "y", "IconPickerYank", desc = "yank icon" }, + pscrollup = "", + pscrolldown = "", + + prevfile = "gk", + nextfile = "gj", + + prevhist = "", + nexthist = "", + }, + preview = { + auto_preview = true, + should_preview_cb = function(bufnr) + -- file size greater than 100kb can't be previewed automatically + local filename = vim.api.nvim_buf_get_name(bufnr) + local fsize = vim.fn.getfsize(filename) + if fsize > 100 * 1024 then + return false + end + return true + end, + }, + }, }, - cmd = { "IconPickerInsert", "IconPickerYank", "IconPickerNormal" }, - config = function() - require("icon-picker").setup { disable_legacy_commands = true } - end, - }, - { - "mfussenegger/nvim-dap", - lazy = false, - init = function() - require("core.utils").load_mappings "debug" - end, - config = function() - local dap = require "dap" - local mason_registry = require "mason-registry" - local codelldb_root = mason_registry.get_package("codelldb"):get_install_path() .. "/extension/" - local codelldb_path = codelldb_root .. "adapter/codelldb" - local liblldb_path = codelldb_root .. "lldb/lib/liblldb.so" - dap.defaults.fallback.external_terminal = { - command = "/home/plex/.local/bin/kitty", - args = {}, - } - dap.adapters.gdb = { - type = "executable", - command = "gdb", - args = { "-i", "dap" }, - } - dap.adapters.codelldb = { - type = "server", - port = "30333", - executable = { - command = codelldb_path, - args = { "--port", "30333" }, - detached = false, + { + "uga-rosa/ccc.nvim", + lazy = false, + event = "FileType", + keys = { + { "cp", "CccPick", desc = "Color-picker" }, }, - } - dap.configurations.cpp = { - { - name = "Launch file", - type = "codelldb", - request = "launch", - program = function() - return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file") - end, - cwd = "${workspaceFolder}", - -- FIXME: perhaps we can put the stdio somewhere more practical - stopOnEntry = false, + opts = { + highlighter = { + auto_enable = true, + lsp = true, + excludes = { "lazy", "mason", "help", "neo-tree" }, + }, }, - } - dap.configurations.c = dap.configurations.cpp - dap.configurations.rust = dap.configurations.cpp - end, - }, - { - "rcarriga/nvim-dap-ui", - init = function() - require("core.utils").load_mappings "debug" - end, - dependencies = { - "mfussenegger/nvim-dap", }, - config = function(_, opts) - local dap = require "dap" - local dapui = require "dapui" - dapui.setup(opts) - dap.listeners.after.event_initialized["dapui_config"] = function() - dapui.open {} - end - dap.listeners.before.event_terminated["dapui_config"] = function() - -- dapui.close {} - end - dap.listeners.before.event_exited["dapui_config"] = function() - -- dapui.close {} - end - end, - }, - { "folke/neodev.nvim", opts = {} }, - { - "mrcjkb/rustaceanvim", - enabled = true, - version = "^4", -- Recommended - ft = { "rust" }, - config = function() - local dap = require "dap" - vim.g.rustaceanvim = { - -- Plugin configuration - tools = {}, - -- LSP configuration - server = { - auto_attach = false, + { + "Bekaboo/deadcolumn.nvim", + event = { "BufReadPre", "BufNewFile" }, + }, + { + "rmagatti/goto-preview", + event = "FileType", + config = function() + require("core.utils").load_mappings "goto_preview" + require("goto-preview").setup {} + end, + dependencies = "nvim-telescope/telescope.nvim", + opts = { + width = 78, + height = 15, + default_mappings = false, + opacity = 10, }, - -- DAP configuration - dap = { - -- FIXME: the rustaceanvim debug config does not map the stdout/stderr to the - -- opened terminal, effectively rendering debugging with it useless. Luckily, - -- we can use the regular nvim-dap and nvim-dap-ui. - adapter = dap.adapters.codelldb, + }, + { + "glacambre/firenvim", + lazy = not vim.g.started_by_firenvim, + build = function() + vim.fn["firenvim#install"](0) + end, + config = function() + vim.g.firenvim_config = { + localSettings = { + [".*"] = { + filename = "/tmp/{hostname}_{pathname%10}.{extension%5}", + cmdline = "firenvim", + takeover = "never", -- can't open it with never at all? + }, + }, + } + end, + }, + { + "sidebar-nvim/sidebar.nvim", + cmd = { "SidebarNvimToggle", "SidebarNvimOpen" }, + config = function() + require("sidebar-nvim").setup { + bindings = { + ["q"] = function() + require("sidebar-nvim").close() + end, + }, + } + end, + }, + { + "dhruvasagar/vim-table-mode", + lazy = false, + -- tm is automatically set for toggle + -- see t menu + }, + { + "kevinhwang91/nvim-ufo", + event = { "BufReadPost", "BufNewFile" }, + -- stylua: ignore + keys = { + { 'zR', function() require('ufo').openAllFolds() end }, + { 'zM', function() require('ufo').closeAllFolds() end }, }, - } - end, - }, - { - "theHamsta/nvim-dap-virtual-text", - lazy = false, -- PERF: this can be done more elegant - config = function() - require("nvim-dap-virtual-text").setup() - end, - }, + dependencies = { + "kevinhwang91/promise-async", + "nvim-treesitter/nvim-treesitter", + "neovim/nvim-lspconfig", + }, + opts = function() + -- fancy display function for folds (stolen from nvim-ufo readme) + local handler = function(virtText, lnum, endLnum, width, truncate) + local newVirtText = {} + local suffix = (" 󰁂 %d "):format(endLnum - lnum) + local sufWidth = vim.fn.strdisplaywidth(suffix) + local targetWidth = width - sufWidth + local curWidth = 0 + for _, chunk in ipairs(virtText) do + local chunkText = chunk[1] + local chunkWidth = vim.fn.strdisplaywidth(chunkText) + if targetWidth > curWidth + chunkWidth then + table.insert(newVirtText, chunk) + else + chunkText = truncate(chunkText, targetWidth - curWidth) + local hlGroup = chunk[2] + table.insert(newVirtText, { chunkText, hlGroup }) + chunkWidth = vim.fn.strdisplaywidth(chunkText) + -- str width returned from truncate() may less than 2nd argument, need padding + if curWidth + chunkWidth < targetWidth then + suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth) + end + break + end + curWidth = curWidth + chunkWidth + end + table.insert(newVirtText, { suffix, "MoreMsg" }) + return newVirtText + end + require("ufo").setup { + -- use treesitter to get the folds + provider_selector = function(bufnr, filetype, buftype) + return { "treesitter", "indent" } + end, + -- apply out fancy fold display + fold_virt_text_handler = handler, + } + end, + }, + { + -- enables UNIX specific stuff in vim, + -- specifically: + -- :SudoWrite + -- :SudoRead + -- :Chmod + -- and also some more, but those are easy done with shell + "tpope/vim-eunuch", + lazy = false, + }, + { + "nvimtools/none-ls.nvim", + event = { "BufReadPre", "BufNewFile" }, + opts = function(_, opts) + opts.sources = {} + local nls = require "null-ls" + local builtins = nls.builtins + local sources = { + builtins.formatting.djlint.with { + filetypes = { "django", "jinja.html", "htmldjango", "tera", "html" }, + }, + builtins.diagnostics.djlint.with { + filetypes = { "django", "jinja.html", "htmldjango", "tera", "html" }, + }, + builtins.formatting.shfmt, + builtins.diagnostics.write_good.with { + diagnostics_postprocess = function(diagnostic) + diagnostic.severity = vim.diagnostic.severity.HINT + end, + }, + } + for _, source in ipairs(sources) do + table.insert(opts.sources, source) + end + end, + }, + { + "lvimuser/lsp-inlayhints.nvim", + event = "LspAttach", + opts = { + inlay_hints = { + parameter_hints = { show = true }, + type_hints = { show = true }, + only_current_line = false, + -- highlight group + highlight = "LspInlayHint", + -- virt_text priority + priority = 0, + }, + }, + config = function(_, opts) + require("lsp-inlayhints").setup(opts) + vim.api.nvim_create_augroup("LspAttach_inlayhints", {}) + vim.api.nvim_create_autocmd("LspAttach", { + group = vim.api.nvim_create_augroup("LspAttach_inlayhints", {}), + callback = function(args) + if not (args.data and args.data.client_id) then + return + end + local client = vim.lsp.get_client_by_id(args.data.client_id) + require("lsp-inlayhints").on_attach(client, args.buf) + end, + }) + -- change how the highlighting looks + vim.cmd "hi LspInlayHint guibg=bg guifg=#804d66" + end, + }, + { "kosayoda/nvim-lightbulb", event = { "BufReadPre", "BufNewFile" } }, + { + "Wansmer/treesj", + cmd = { "TSJJoin", "TSJSplit", "TSJSplit" }, + keys = { + { "", "TSJJoin" }, + { "", "TSJSplit" }, + }, + opts = { + use_default_keymaps = false, + }, + }, + { + "b0o/incline.nvim", + event = "FileType", + config = function() + local function get_diagnostic_label(props) + local icons = { error = "", warn = "", info = "", hint = "" } + local label = {} + + for severity, icon in pairs(icons) do + local n = #vim.diagnostic.get(props.buf, + { severity = vim.diagnostic.severity[string.upper(severity)] }) + if n > 0 then + table.insert(label, { icon .. " " .. n .. " ", group = "DiagnosticSign" .. severity }) + end + end + if #label > 0 then + table.insert(label, { "| " }) + end + return label + end + local function get_git_diff(props) + local icons = { removed = "", changed = "", added = "" } + local labels = {} + -- local signs = vim.api.nvim_buf_get_var(props.buf, "gitsigns_status_dict") + -- local signs = vim.b.gitsigns_status_dict + -- for name, icon in pairs(icons) do + -- if tonumber(signs[name]) and signs[name] > 0 then + -- table.insert(labels, { icon .. " " .. signs[name] .. " ", group = "Diff" .. name }) + -- end + -- end + if #labels > 0 then + table.insert(labels, { "| " }) + end + return labels + end + + require("incline").setup { + render = function(props) + local filename = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(props.buf), ":t") + local ft_icon, ft_color = require("nvim-web-devicons").get_icon_color(filename) + local modified = vim.api.nvim_buf_get_option(props.buf, "modified") and "bold,italic" or "bold" + + local buffer = { + { get_diagnostic_label(props) }, + { get_git_diff(props) }, + { ft_icon, guifg = ft_color }, + { " " }, + { filename, gui = modified }, + } + return buffer + end, + } + end, + }, + { + "mikesmithgh/kitty-scrollback.nvim", + enabled = true, + lazy = true, + cmd = { "KittyScrollbackGenerateKittens", "KittyScrollbackCheckHealth" }, + event = { "User KittyScrollbackLaunch" }, + -- version = '*', -- latest stable version, may have breaking changes if major version changed + -- version = '^3.0.0', -- pin major version, include fixes and features that do not have breaking changes + config = function() + require("kitty-scrollback").setup { + myconfig = function() + return { keymaps_enabled = false } + end, + } + end, + }, + { + "hrsh7th/nvim-cmp", + enabled = not vim.g.started_by_firenvim, + }, + { + "ziontee113/icon-picker.nvim", + keys = { + { "", "IconPickerNormal", desc = "pick icon" }, + { "y", "IconPickerYank", desc = "yank icon" }, + }, + cmd = { "IconPickerInsert", "IconPickerYank", "IconPickerNormal" }, + config = function() + require("icon-picker").setup { disable_legacy_commands = true } + end, + }, + { + "mfussenegger/nvim-dap", + lazy = false, + init = function() + require("core.utils").load_mappings "debug" + end, + config = function() + local dap = require "dap" + local mason_registry = require "mason-registry" + local codelldb_root = mason_registry.get_package("codelldb"):get_install_path() .. "/extension/" + local codelldb_path = codelldb_root .. "adapter/codelldb" + local liblldb_path = codelldb_root .. "lldb/lib/liblldb.so" + dap.defaults.fallback.external_terminal = { + command = "/home/plex/.local/bin/kitty", + args = {}, + } + dap.adapters.gdb = { + type = "executable", + command = "gdb", + args = { "-i", "dap" }, + } + dap.adapters.codelldb = { + type = "server", + port = "30333", + executable = { + command = codelldb_path, + args = { "--port", "30333" }, + detached = false, + }, + } + dap.configurations.cpp = { + { + name = "Launch file", + type = "codelldb", + request = "launch", + program = function() + return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file") + end, + args = function() + require('custom.utils').tokenize_args(vim.fn.input("args: ")) + end, + cwd = "${workspaceFolder}", + -- FIXME: perhaps we can put the stdio somewhere more practical + stopOnEntry = false, + }, + } + dap.configurations.c = dap.configurations.cpp + dap.configurations.rust = dap.configurations.cpp + end, + }, + { + "rcarriga/nvim-dap-ui", + init = function() + require("core.utils").load_mappings "debug" + end, + dependencies = { + "mfussenegger/nvim-dap", + }, + config = function(_, opts) + local dap = require "dap" + local dapui = require "dapui" + dapui.setup(opts) + dap.listeners.after.event_initialized["dapui_config"] = function() + dapui.open {} + end + dap.listeners.before.event_terminated["dapui_config"] = function() + -- dapui.close {} + end + dap.listeners.before.event_exited["dapui_config"] = function() + -- dapui.close {} + end + end, + }, + { "folke/neodev.nvim", opts = {} }, + { + "mrcjkb/rustaceanvim", + enabled = true, + version = "^4", -- Recommended + ft = { "rust" }, + config = function() + local dap = require "dap" + vim.g.rustaceanvim = { + -- Plugin configuration + tools = {}, + -- LSP configuration + server = { + auto_attach = false, + }, + -- DAP configuration + dap = { + -- FIXME: the rustaceanvim debug config does not map the stdout/stderr to the + -- opened terminal, effectively rendering debugging with it useless. Luckily, + -- we can use the regular nvim-dap and nvim-dap-ui. + adapter = dap.adapters.codelldb, + }, + } + end, + }, + { + "theHamsta/nvim-dap-virtual-text", + lazy = false, -- PERF: this can be done more elegant + config = function() + require("nvim-dap-virtual-text").setup() + end, + }, } return plugins diff --git a/lua/custom/utils.lua b/lua/custom/utils.lua new file mode 100644 index 0000000..524c2d4 --- /dev/null +++ b/lua/custom/utils.lua @@ -0,0 +1,67 @@ +local M = {} +-- this function will split a string into a table of tokens, like it would +-- be passed into the `argv` of a program that was executed from the commandline +-- +-- @param string raw string of cli args that should be split +-- @return table tokens args as a table +M.tokenize_args = function(raw) + -- NOTE: string.gmatch is does not use regex, but a smaller pattern matcher! + -- A complete regex parser would be larger than lua itself. See + -- [Programming in Lua 20.2](https://www.lua.org/pil/20.2.html). + -- + -- Notable differences: + -- '-' is ungreedy wildcard + -- '*?' does not work + -- '|' is not or + -- + -- This means we're better of implementing the lexer with an algorithm. + local t = {} + local current = "" + local in_str = false + local str_seek + for c in string.gmatch(raw, ".") do -- iterate through all chars + if c == ' ' and not in_str then + if string.len(current) > 0 then + table.insert(t, current) + current = "" + end + elseif c == '"' and not in_str then + in_str = true + str_seek = '"' + elseif c == "'" and not in_str then + in_str = true + str_seek = "'" + elseif c == str_seek and in_str then + in_str = false + table.insert(t, current) + current = "" + else + current = current .. c + end + end + if string.len(current) > 0 then + table.insert(t, current) + end + return t +end + +--- dumps a variable into a string, so it can be printed. This is meant for +--- debug prints +--- @param any t any variable +--- @return string t_dumped t dumped to string +M.dump = function(t) + if type(t) == 'table' then + local s = '{ ' + for k, v in pairs(t) do + if type(k) ~= 'number' then k = '"' .. k .. '"' end + if k ~= 1 then + s = s .. ', ' + end + s = s .. '[' .. k .. '] = \'' .. M.dump(v) .. '\'' + end + return s .. ' }' + else + return tostring(t) + end +end +return M From a39c322ca7298d4b664956d179027eb1400da934 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Thu, 15 Feb 2024 14:59:21 +0100 Subject: [PATCH 51/96] bugfix args debugger --- lua/custom/plugins.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index cc707f4..8bff8b6 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -765,7 +765,7 @@ local plugins = { return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file") end, args = function() - require('custom.utils').tokenize_args(vim.fn.input("args: ")) + return require('custom.utils').tokenize_args(vim.fn.input("args: ")) end, cwd = "${workspaceFolder}", -- FIXME: perhaps we can put the stdio somewhere more practical From 6b02194e4d47b965824fdce82b6457cc92bf61b7 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Thu, 15 Feb 2024 16:25:36 +0100 Subject: [PATCH 52/96] conform formatting --- lua/custom/mappings.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index 0dcfdc2..2c5d8f4 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -410,7 +410,8 @@ M.edit = { -- format with conform ["ff"] = { function() - vim.lsp.buf.format() + -- vim.lsp.buf.format() + require("conform").format() end, "format buffer", }, From 0fc0e010c65642d2c4d889760223c0827941a030 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Fri, 16 Feb 2024 10:32:56 +0100 Subject: [PATCH 53/96] better lightm ode --- lua/custom/chadrc.lua | 4 ++-- lua/custom/highlights.lua | 16 ++++++++-------- lua/custom/plugins.lua | 2 +- 3 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lua/custom/chadrc.lua b/lua/custom/chadrc.lua index 7e7dc46..9a0be21 100644 --- a/lua/custom/chadrc.lua +++ b/lua/custom/chadrc.lua @@ -5,8 +5,8 @@ local M = {} local highlights = require "custom.highlights" M.ui = { - theme = "oceanic-next", - theme_toggle = { "kanagawa", "oceanic-next" }, + theme = "github_light", + theme_toggle = { "kanagawa", "github_light" }, hl_override = highlights.override, hl_add = highlights.add, diff --git a/lua/custom/highlights.lua b/lua/custom/highlights.lua index 24d82d5..096b8b8 100644 --- a/lua/custom/highlights.lua +++ b/lua/custom/highlights.lua @@ -9,14 +9,14 @@ M.override = { Comment = { italic = false, }, - NvDashAscii = { - fg = "#b33366", - bg = "#1a1a1a", - }, - NvDashButtons = { - fg = "White", - bg = "#241e1e", - }, + -- NvDashAscii = { + -- fg = "#b33366", + -- bg = "#1a1a1a", + -- }, + -- NvDashButtons = { + -- fg = "White", + -- bg = "#241e1e", + -- }, } ---@type HLTable diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 8bff8b6..e28464d 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -626,7 +626,7 @@ local plugins = { end, }) -- change how the highlighting looks - vim.cmd "hi LspInlayHint guibg=bg guifg=#804d66" + vim.cmd "hi LspInlayHint guibg=(bg*0.8) guifg=#6699b3" end, }, { "kosayoda/nvim-lightbulb", event = { "BufReadPre", "BufNewFile" } }, From e7f7ad4ca863974d47c76ad329ac5ed14fac0012 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Fri, 16 Feb 2024 10:36:41 +0100 Subject: [PATCH 54/96] relative number --- lua/custom/init.lua | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/lua/custom/init.lua b/lua/custom/init.lua index 24586dc..2b1f16f 100644 --- a/lua/custom/init.lua +++ b/lua/custom/init.lua @@ -70,15 +70,16 @@ opt.foldlevel = 10 -- start with all folds open vim.o.guifont = "FiraCode Nerd Font:h22" opt.termguicolors = true opt.shortmess = "xsTOInfFitloCaAs" -opt.showmode = true -- Show mode in cmd window -opt.scrolloff = 2 -- Keep at least n lines above/below -opt.sidescrolloff = 0 -- Keep at least n lines left/right -opt.numberwidth = 2 -- Minimum number of columns to use for the line number -opt.number = true -- Show line numbers -opt.ruler = true -- Default status ruler -opt.list = true -- Show hidden characters -opt.showtabline = 1 -- Don't change this, goes back to a vanilla vim default -opt.laststatus = 3 -- Always show laststatus +opt.showmode = true -- Show mode in cmd window +opt.scrolloff = 2 -- Keep at least n lines above/below +opt.sidescrolloff = 0 -- Keep at least n lines left/right +opt.numberwidth = 2 -- Minimum number of columns to use for the line number +opt.number = true -- Show line numbers + opt.relativenumber = true -- Show relative line numbers +opt.ruler = true -- Default status ruler +opt.list = true -- Show hidden characters +opt.showtabline = 1 -- Don't change this, goes back to a vanilla vim default +opt.laststatus = 3 -- Always show laststatus if vim.g.started_by_firenvim == true then opt.showtabline = 1 -- Don't show tabline in firenvim, unless multitab From 10a01d05035c65b70e1b0d10674ffdf93c2cbe3f Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Fri, 16 Feb 2024 15:53:23 +0100 Subject: [PATCH 55/96] clippy by default --- lua/custom/chadrc.lua | 4 +- lua/custom/configs/lspconfig.lua | 27 +- lua/custom/plugins.lua | 1459 +++++++++++++++--------------- 3 files changed, 761 insertions(+), 729 deletions(-) diff --git a/lua/custom/chadrc.lua b/lua/custom/chadrc.lua index 9a0be21..8f1a86b 100644 --- a/lua/custom/chadrc.lua +++ b/lua/custom/chadrc.lua @@ -5,8 +5,8 @@ local M = {} local highlights = require "custom.highlights" M.ui = { - theme = "github_light", - theme_toggle = { "kanagawa", "github_light" }, + theme = "oceanic-next", + theme_toggle = { "oceanic-next", "oceanic-light" }, hl_override = highlights.override, hl_add = highlights.add, diff --git a/lua/custom/configs/lspconfig.lua b/lua/custom/configs/lspconfig.lua index 88b5536..8175149 100644 --- a/lua/custom/configs/lspconfig.lua +++ b/lua/custom/configs/lspconfig.lua @@ -10,7 +10,7 @@ local servers = { "tsserver", "clangd", "pyright", - "rust_analyzer", -- rustaceanvim wants to do that, but the builtin thing has better integration! + -- "rust_analyzer", -- rustaceanvim wants to do that, but the builtin thing has better integration! "bashls", "cmake", } @@ -21,3 +21,28 @@ for _, lsp in ipairs(servers) do capabilities = capabilities, } end + +lspconfig.rust_analyzer.setup { + on_attach = on_attach, + settings = { + ["rust-analyzer"] = { + check = { + command = "clippy", + }, + imports = { + granularity = { + group = "module", + }, + prefix = "self", + }, + cargo = { + buildScripts = { + enable = true, + }, + }, + procMacro = { + enable = true, + }, + }, + }, +} diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index e28464d..47e17c8 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -3,204 +3,209 @@ local overrides = require "custom.configs.overrides" ---@type NvPluginSpec[] local plugins = { - -- Override plugin definition options + -- Override plugin definition options - { - "neovim/nvim-lspconfig", - config = function() - require "plugins.configs.lspconfig" - require "custom.configs.lspconfig" - end, -- Override to setup mason-lspconfig - }, - -- override plugin configs - { - "williamboman/mason.nvim", - opts = overrides.mason, - }, + { + "neovim/nvim-lspconfig", + config = function() + require "plugins.configs.lspconfig" + require "custom.configs.lspconfig" + end, -- Override to setup mason-lspconfig + }, + -- override plugin configs + { + "williamboman/mason.nvim", + opts = overrides.mason, + }, - { - "nvim-treesitter/nvim-treesitter", - opts = overrides.treesitter, - }, + { + "nvim-treesitter/nvim-treesitter", + opts = overrides.treesitter, + }, - { - "nvim-tree/nvim-tree.lua", - opts = overrides.nvimtree, - }, + { + "nvim-tree/nvim-tree.lua", + opts = overrides.nvimtree, + }, - -- Install a plugin - { - -- exit insert mode with 'jk' - "max397574/better-escape.nvim", - enabled = true, - event = "InsertEnter", - config = function() - require("better_escape").setup() - end, - }, + -- Install a plugin + { + -- exit insert mode with 'jk' + "max397574/better-escape.nvim", + enabled = true, + event = "InsertEnter", + config = function() + require("better_escape").setup() + end, + }, - { - "stevearc/conform.nvim", - -- for users those who want auto-save conform + lazyloading! - -- event = "BufWritePre" - config = function() - require "custom.configs.conform" - end, + { + "stevearc/conform.nvim", + -- for users those who want auto-save conform + lazyloading! + -- event = "BufWritePre" + config = function() + require "custom.configs.conform" + end, + }, + { + "ggandor/leap.nvim", + lazy = false, + config = function() + require("core.utils").load_mappings "leap" + end, + }, + { + "ggandor/flit.nvim", + lazy = false, + config = function() + require("flit").setup { + keys = { f = "f", F = "F", t = "t", T = "T" }, + -- A string like "nv", "nvo", "o", etc. + labeled_modes = "v", + multiline = true, + -- Like `leap`s similar argument (call-specific overrides). + -- E.g.: opts = { equivalence_classes = {} } + opts = {}, + } + end, + }, + { + "kdheepak/lazygit.nvim", + lazy = false, + keys = { "gg" }, + cmd = "LazyGit", + -- optional for floating window border decoration + dependencies = { + "nvim-lua/plenary.nvim", }, - { - "ggandor/leap.nvim", - lazy = false, - config = function() - require("core.utils").load_mappings "leap" - end, + init = function() + require("core.utils").load_mappings "lazygit" + end, + }, + { + "folke/which-key.nvim", + keys = { "", "", "", "", '"', "'", "`", "c", "v", "g" }, + defaults = { + mode = { "n", "v" }, + [";"] = { name = "+telescope" }, + [";f"] = { name = "+find" }, + [";d"] = { name = "+lsp/todo" }, + ["g"] = { name = "+goto" }, + ["]"] = { name = "+next" }, + ["["] = { name = "+prev" }, + ["x"] = { name = "+diagnostics/quickfix" }, + ["d"] = { name = "+debug" }, + ["c"] = { name = "+code" }, + ["g"] = { name = "+git" }, + ["t"] = { name = "+toggle/tools" }, + ["w"] = { name = "+window/which" }, + ["f"] = { name = "+formatting" }, }, - { - "ggandor/flit.nvim", - lazy = false, - config = function() - require("flit").setup { - keys = { f = "f", F = "F", t = "t", T = "T" }, - -- A string like "nv", "nvo", "o", etc. - labeled_modes = "v", - multiline = true, - -- Like `leap`s similar argument (call-specific overrides). - -- E.g.: opts = { equivalence_classes = {} } - opts = {}, - } - end, - }, - { - "kdheepak/lazygit.nvim", - lazy = false, - keys = { "gg" }, - cmd = "LazyGit", - -- optional for floating window border decoration - dependencies = { - "nvim-lua/plenary.nvim", + }, + { + "echasnovski/mini.trailspace", + lazy = false, + event = { "BufReadPost", "BufNewFile" }, + opts = {}, + }, + { + "itchyny/vim-cursorword", + event = "FileType", + init = function() + vim.g.cursorword = 0 + end, + config = function() + local augroup = vim.api.nvim_create_augroup("plex_cursorword", {}) + vim.api.nvim_create_autocmd("FileType", { + group = augroup, + pattern = { + "conf", + "dosini", + "json", + "markdown", + "nginx", + "text", + "yaml", }, - init = function() - require("core.utils").load_mappings "lazygit" + callback = function() + if vim.wo.diff or vim.wo.previewwindow then + vim.b.cursorword = 0 + else + vim.b.cursorword = 1 + end end, - }, - { - "folke/which-key.nvim", - keys = { "", "", "", "", '"', "'", "`", "c", "v", "g" }, - defaults = { - mode = { "n", "v" }, - [";"] = { name = "+telescope" }, - [";f"] = { name = "+find" }, - [";d"] = { name = "+lsp/todo" }, - ["g"] = { name = "+goto" }, - ["]"] = { name = "+next" }, - ["["] = { name = "+prev" }, - ["x"] = { name = "+diagnostics/quickfix" }, - ["d"] = { name = "+debug" }, - ["c"] = { name = "+code" }, - ["g"] = { name = "+git" }, - ["t"] = { name = "+toggle/tools" }, - ["w"] = { name = "+window/which" }, - ["f"] = { name = "+formatting" }, - }, - }, - { "echasnovski/mini.trailspace", lazy = false, event = { "BufReadPost", "BufNewFile" }, opts = {} }, - { - "itchyny/vim-cursorword", - event = "FileType", - init = function() - vim.g.cursorword = 0 + }) + vim.api.nvim_create_autocmd("InsertEnter", { + group = augroup, + callback = function() + if vim.b["cursorword"] == 1 then + vim.b["cursorword"] = 0 + end end, - config = function() - local augroup = vim.api.nvim_create_augroup("plex_cursorword", {}) - vim.api.nvim_create_autocmd("FileType", { - group = augroup, - pattern = { - "conf", - "dosini", - "json", - "markdown", - "nginx", - "text", - "yaml", - }, - callback = function() - if vim.wo.diff or vim.wo.previewwindow then - vim.b.cursorword = 0 - else - vim.b.cursorword = 1 - end - end, - }) - vim.api.nvim_create_autocmd("InsertEnter", { - group = augroup, - callback = function() - if vim.b["cursorword"] == 1 then - vim.b["cursorword"] = 0 - end - end, - }) - vim.api.nvim_create_autocmd("InsertLeave", { - group = augroup, - callback = function() - if vim.b["cursorword"] == 0 then - vim.b["cursorword"] = 1 - end - end, - }) + }) + vim.api.nvim_create_autocmd("InsertLeave", { + group = augroup, + callback = function() + if vim.b["cursorword"] == 0 then + vim.b["cursorword"] = 1 + end end, + }) + end, + }, + + { + "RRethy/vim-illuminate", + lazy = false, + event = { "BufReadPost", "BufNewFile" }, + opts = { + delay = 200, + under_cursor = false, + modes_allowlist = { "n", "no", "nt" }, + filetypes_denylist = { + "DiffviewFileHistory", + "DiffviewFiles", + "SidebarNvim", + "fugitive", + "git", + "minifiles", + "neo-tree", + }, }, + keys = { + { "]]", desc = "Next Reference" }, + { "[[", desc = "Prev Reference" }, + }, + config = function(_, opts) + require("illuminate").configure(opts) - { - "RRethy/vim-illuminate", - lazy = false, - event = { "BufReadPost", "BufNewFile" }, - opts = { - delay = 200, - under_cursor = false, - modes_allowlist = { "n", "no", "nt" }, - filetypes_denylist = { - "DiffviewFileHistory", - "DiffviewFiles", - "SidebarNvim", - "fugitive", - "git", - "minifiles", - "neo-tree", - }, - }, - keys = { - { "]]", desc = "Next Reference" }, - { "[[", desc = "Prev Reference" }, - }, - config = function(_, opts) - require("illuminate").configure(opts) + local function map(key, dir, buffer) + vim.keymap.set("n", key, function() + require("illuminate")["goto_" .. dir .. "_reference"](false) + end, { + desc = dir:sub(1, 1):upper() .. dir:sub(2) .. " Reference", + buffer = buffer, + }) + end - local function map(key, dir, buffer) - vim.keymap.set("n", key, function() - require("illuminate")["goto_" .. dir .. "_reference"](false) - end, { - desc = dir:sub(1, 1):upper() .. dir:sub(2) .. " Reference", - buffer = buffer, - }) - end + map("]]", "next") + map("[[", "prev") - map("]]", "next") - map("[[", "prev") - - -- also set it after loading ftplugins, since a lot overwrite [[ and ]] - vim.api.nvim_create_autocmd("FileType", { - group = vim.api.nvim_create_augroup("plex_illuminate", {}), - callback = function() - local buffer = vim.api.nvim_get_current_buf() - map("]]", "next", buffer) - map("[[", "prev", buffer) - end, - }) + -- also set it after loading ftplugins, since a lot overwrite [[ and ]] + vim.api.nvim_create_autocmd("FileType", { + group = vim.api.nvim_create_augroup("plex_illuminate", {}), + callback = function() + local buffer = vim.api.nvim_get_current_buf() + map("]]", "next", buffer) + map("[[", "prev", buffer) end, - }, - { - "folke/todo-comments.nvim", - lazy = false, - dependencies = "nvim-telescope/telescope.nvim", + }) + end, + }, + { + "folke/todo-comments.nvim", + lazy = false, + dependencies = "nvim-telescope/telescope.nvim", -- stylua: ignore keys = { { ']t', function() require('todo-comments').jump_next() end, desc = 'Next todo comment' }, @@ -209,39 +214,39 @@ local plugins = { { 'xt', 'TodoTrouble', desc = 'Todo (Trouble)' }, { 'xT', 'TodoTrouble keywords=TODO,FIX,FIXME', desc = 'Todo/Fix/Fixme (Trouble)' }, }, - opts = { - signs = true, - keywords = { - FIX = { - icon = " ", -- icon used for the sign, and in search results - color = "error", -- can be a hex color, or a named color (see below) - alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords - }, - TODO = { icon = " ", color = "todo" }, - HACK = { icon = " ", color = "hack" }, - SECURITY = { icon = "󰒃 ", color = "security" }, - WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } }, - PERF = { icon = " ", color = "perf", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } }, - NOTE = { icon = " ", color = "hint", alt = { "INFO" } }, - TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } }, - }, - colors = { - error = { "DiagnosticError", "ErrorMsg", "#DC2626" }, - warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" }, - todo = { "DiagnosticTodo", "#80e64d" }, - hint = { "DiagnosticHint", "#10B981" }, - hack = { "DiagnosticHack", "#FF33FF" }, - security = { "DiagnosticSecurity", "#FF6600" }, - default = { "Identifier", "#7C3AED" }, - test = { "DiagnosticTest", "#E6E600" }, - perf = { "DiagnosticPerf", "#9999ff" }, - }, + opts = { + signs = true, + keywords = { + FIX = { + icon = " ", -- icon used for the sign, and in search results + color = "error", -- can be a hex color, or a named color (see below) + alt = { "FIXME", "BUG", "FIXIT", "ISSUE" }, -- a set of other keywords that all map to this FIX keywords }, + TODO = { icon = " ", color = "todo" }, + HACK = { icon = " ", color = "hack" }, + SECURITY = { icon = "󰒃 ", color = "security" }, + WARN = { icon = " ", color = "warning", alt = { "WARNING", "XXX" } }, + PERF = { icon = " ", color = "perf", alt = { "OPTIM", "PERFORMANCE", "OPTIMIZE" } }, + NOTE = { icon = " ", color = "hint", alt = { "INFO" } }, + TEST = { icon = "⏲ ", color = "test", alt = { "TESTING", "PASSED", "FAILED" } }, + }, + colors = { + error = { "DiagnosticError", "ErrorMsg", "#DC2626" }, + warning = { "DiagnosticWarn", "WarningMsg", "#FBBF24" }, + todo = { "DiagnosticTodo", "#80e64d" }, + hint = { "DiagnosticHint", "#10B981" }, + hack = { "DiagnosticHack", "#FF33FF" }, + security = { "DiagnosticSecurity", "#FF6600" }, + default = { "Identifier", "#7C3AED" }, + test = { "DiagnosticTest", "#E6E600" }, + perf = { "DiagnosticPerf", "#9999ff" }, + }, }, - { - "folke/trouble.nvim", - cmd = { "Trouble", "TroubleToggle" }, - opts = { use_diagnostic_signs = true }, + }, + { + "folke/trouble.nvim", + cmd = { "Trouble", "TroubleToggle" }, + opts = { use_diagnostic_signs = true }, -- stylua: ignore keys = { { @@ -285,552 +290,554 @@ local plugins = { desc = 'Next trouble/quickfix item', }, }, + }, + { + "NvChad/nvterm", + enabled = false, + }, + { + "akinsho/toggleterm.nvim", + init = function() + require("core.utils").load_mappings "toggleterm" + end, + cmd = "ToggleTerm", + opts = { + size = function(term) + if term.direction == "horizontal" then + return vim.o.lines * 0.35 + elseif term.direction == "vertical" then + return vim.o.columns * 0.35 + else + return 20 + end + end, + open_mapping = false, + float_opts = { + border = "curved", + }, }, - { - "NvChad/nvterm", - enabled = false, + }, + -- lazy.nvim + { + "folke/noice.nvim", + event = "VeryLazy", + -- config.lsp.signature.enabled = false + dependencies = { + -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries + "MunifTanjim/nui.nvim", + -- OPTIONAL: + -- `nvim-notify` is only needed, if you want to use the notification view. + -- If not available, we use `mini` as the fallback + "rcarriga/nvim-notify", }, - { - "akinsho/toggleterm.nvim", - init = function() - require("core.utils").load_mappings "toggleterm" - end, - cmd = "ToggleTerm", - opts = { - size = function(term) - if term.direction == "horizontal" then - return vim.o.lines * 0.35 - elseif term.direction == "vertical" then - return vim.o.columns * 0.35 - else - return 20 - end - end, - open_mapping = false, - float_opts = { - border = "curved", - }, + config = function() + require("noice").setup { + lsp = { + override = { + ["vim.lsp.util.convert_input_to_markdown_lines"] = true, + ["vim.lsp.util.stylize_markdown"] = true, + ["cmp.entry.get_documentation"] = true, + }, + -- IDK how to disable the nvchad builtins for this, which would + -- produce a conflict + signature = { enabled = false }, + hover = { enabled = false }, }, - }, - -- lazy.nvim - { - "folke/noice.nvim", - event = "VeryLazy", - -- config.lsp.signature.enabled = false - dependencies = { - -- if you lazy-load any plugin below, make sure to add proper `module="..."` entries - "MunifTanjim/nui.nvim", - -- OPTIONAL: - -- `nvim-notify` is only needed, if you want to use the notification view. - -- If not available, we use `mini` as the fallback - "rcarriga/nvim-notify", + -- you can enable a preset for easier configuration + presets = { + bottom_search = true, -- use a classic bottom cmdline for search + command_palette = true, -- position the cmdline and popupmenu together + long_message_to_split = true, -- long messages will be sent to a split + inc_rename = false, -- enables an input dialog for inc-rename.nvim + lsp_doc_border = false, -- add a border to hover docs and signature help }, - config = function() - require("noice").setup { - lsp = { - override = { - ["vim.lsp.util.convert_input_to_markdown_lines"] = true, - ["vim.lsp.util.stylize_markdown"] = true, - ["cmp.entry.get_documentation"] = true, - }, - -- IDK how to disable the nvchad builtins for this, which would - -- produce a conflict - signature = { enabled = false }, - hover = { enabled = false }, - }, - -- you can enable a preset for easier configuration - presets = { - bottom_search = true, -- use a classic bottom cmdline for search - command_palette = true, -- position the cmdline and popupmenu together - long_message_to_split = true, -- long messages will be sent to a split - inc_rename = false, -- enables an input dialog for inc-rename.nvim - lsp_doc_border = false, -- add a border to hover docs and signature help - }, - messages = { - enabled = true, - -- NOTE: we keep it with notify, - -- change this to something else if you want - view_error = "notify", - }, - popupmenu = { - enabled = true, - }, - notify = { - enabled = true, - }, - } - end, - }, - { - "goolord/alpha-nvim", - enabled = false, - lazy = false, - dependencies = { "nvim-tree/nvim-web-devicons" }, - config = function() - local dash = require "alpha.themes.dashboard" - require("alpha").setup(dash.config) - end, - }, - { - "stevearc/dressing.nvim", - init = function() - ---@diagnostic disable-next-line: duplicate-set-field - vim.ui.select = function(...) - require("lazy").load { plugins = { "dressing.nvim" } } - return vim.ui.select(...) - end - ---@diagnostic disable-next-line: duplicate-set-field - vim.ui.input = function(...) - require("lazy").load { plugins = { "dressing.nvim" } } - return vim.ui.input(...) - end - end, - }, - { - "chentoast/marks.nvim", - lazy = false, - dependencies = "lewis6991/gitsigns.nvim", - event = "FileType", - opts = { - sign_priority = { lower = 10, upper = 15, builtin = 8, bookmark = 20 }, - bookmark_1 = { sign = "󰉀" }, -- ⚐ ⚑ 󰈻 󰈼 󰈽 󰈾 󰈿 󰉀 + messages = { + enabled = true, + -- NOTE: we keep it with notify, + -- change this to something else if you want + view_error = "notify", }, + popupmenu = { + enabled = true, + }, + notify = { + enabled = true, + }, + } + end, + }, + { + "goolord/alpha-nvim", + enabled = false, + lazy = false, + dependencies = { "nvim-tree/nvim-web-devicons" }, + config = function() + local dash = require "alpha.themes.dashboard" + require("alpha").setup(dash.config) + end, + }, + { + "stevearc/dressing.nvim", + init = function() + ---@diagnostic disable-next-line: duplicate-set-field + vim.ui.select = function(...) + require("lazy").load { plugins = { "dressing.nvim" } } + return vim.ui.select(...) + end + ---@diagnostic disable-next-line: duplicate-set-field + vim.ui.input = function(...) + require("lazy").load { plugins = { "dressing.nvim" } } + return vim.ui.input(...) + end + end, + }, + { + "chentoast/marks.nvim", + lazy = false, + dependencies = "lewis6991/gitsigns.nvim", + event = "FileType", + opts = { + sign_priority = { lower = 10, upper = 15, builtin = 8, bookmark = 20 }, + bookmark_1 = { sign = "󰉀" }, -- ⚐ ⚑ 󰈻 󰈼 󰈽 󰈾 󰈿 󰉀 }, - { - "kevinhwang91/nvim-bqf", - ft = "qf", - cmd = "BqfAutoToggle", - event = "QuickFixCmdPost", - opts = { - auto_resize_height = false, - func_map = { - tab = "st", - split = "sv", - vsplit = "sg", + }, + { + "kevinhwang91/nvim-bqf", + ft = "qf", + cmd = "BqfAutoToggle", + event = "QuickFixCmdPost", + opts = { + auto_resize_height = false, + func_map = { + tab = "st", + split = "sv", + vsplit = "sg", - stoggleup = "K", - stoggledown = "J", - stogglevm = "", + stoggleup = "K", + stoggledown = "J", + stogglevm = "", - ptoggleitem = "p", - ptoggleauto = "P", - ptogglemode = "zp", + ptoggleitem = "p", + ptoggleauto = "P", + ptogglemode = "zp", - pscrollup = "", - pscrolldown = "", + pscrollup = "", + pscrolldown = "", - prevfile = "gk", - nextfile = "gj", + prevfile = "gk", + nextfile = "gj", - prevhist = "", - nexthist = "", - }, - preview = { - auto_preview = true, - should_preview_cb = function(bufnr) - -- file size greater than 100kb can't be previewed automatically - local filename = vim.api.nvim_buf_get_name(bufnr) - local fsize = vim.fn.getfsize(filename) - if fsize > 100 * 1024 then - return false - end - return true - end, - }, - }, - }, - { - "uga-rosa/ccc.nvim", - lazy = false, - event = "FileType", - keys = { - { "cp", "CccPick", desc = "Color-picker" }, - }, - opts = { - highlighter = { - auto_enable = true, - lsp = true, - excludes = { "lazy", "mason", "help", "neo-tree" }, - }, - }, - }, - { - "Bekaboo/deadcolumn.nvim", - event = { "BufReadPre", "BufNewFile" }, - }, - { - "rmagatti/goto-preview", - event = "FileType", - config = function() - require("core.utils").load_mappings "goto_preview" - require("goto-preview").setup {} + prevhist = "", + nexthist = "", + }, + preview = { + auto_preview = true, + should_preview_cb = function(bufnr) + -- file size greater than 100kb can't be previewed automatically + local filename = vim.api.nvim_buf_get_name(bufnr) + local fsize = vim.fn.getfsize(filename) + if fsize > 100 * 1024 then + return false + end + return true end, - dependencies = "nvim-telescope/telescope.nvim", - opts = { - width = 78, - height = 15, - default_mappings = false, - opacity = 10, + }, + }, + }, + { + "uga-rosa/ccc.nvim", + lazy = false, + event = "FileType", + keys = { + { "cp", "CccPick", desc = "Color-picker" }, + }, + opts = { + highlighter = { + auto_enable = true, + lsp = true, + excludes = { "lazy", "mason", "help", "neo-tree" }, + }, + }, + }, + { + "Bekaboo/deadcolumn.nvim", + event = { "BufReadPre", "BufNewFile" }, + }, + { + "rmagatti/goto-preview", + event = "FileType", + config = function() + require("core.utils").load_mappings "goto_preview" + require("goto-preview").setup {} + end, + dependencies = "nvim-telescope/telescope.nvim", + opts = { + width = 78, + height = 15, + default_mappings = false, + opacity = 10, + }, + }, + { + "glacambre/firenvim", + lazy = not vim.g.started_by_firenvim, + build = function() + vim.fn["firenvim#install"](0) + end, + config = function() + vim.g.firenvim_config = { + localSettings = { + [".*"] = { + filename = "/tmp/{hostname}_{pathname%10}.{extension%5}", + cmdline = "firenvim", + takeover = "never", -- can't open it with never at all? + }, }, - }, - { - "glacambre/firenvim", - lazy = not vim.g.started_by_firenvim, - build = function() - vim.fn["firenvim#install"](0) - end, - config = function() - vim.g.firenvim_config = { - localSettings = { - [".*"] = { - filename = "/tmp/{hostname}_{pathname%10}.{extension%5}", - cmdline = "firenvim", - takeover = "never", -- can't open it with never at all? - }, - }, - } - end, - }, - { - "sidebar-nvim/sidebar.nvim", - cmd = { "SidebarNvimToggle", "SidebarNvimOpen" }, - config = function() - require("sidebar-nvim").setup { - bindings = { - ["q"] = function() - require("sidebar-nvim").close() - end, - }, - } - end, - }, - { - "dhruvasagar/vim-table-mode", - lazy = false, - -- tm is automatically set for toggle - -- see t menu - }, - { - "kevinhwang91/nvim-ufo", - event = { "BufReadPost", "BufNewFile" }, + } + end, + }, + { + "sidebar-nvim/sidebar.nvim", + cmd = { "SidebarNvimToggle", "SidebarNvimOpen" }, + config = function() + require("sidebar-nvim").setup { + bindings = { + ["q"] = function() + require("sidebar-nvim").close() + end, + }, + } + end, + }, + { + "dhruvasagar/vim-table-mode", + lazy = false, + -- tm is automatically set for toggle + -- see t menu + }, + { + "kevinhwang91/nvim-ufo", + event = { "BufReadPost", "BufNewFile" }, -- stylua: ignore keys = { { 'zR', function() require('ufo').openAllFolds() end }, { 'zM', function() require('ufo').closeAllFolds() end }, }, - dependencies = { - "kevinhwang91/promise-async", - "nvim-treesitter/nvim-treesitter", - "neovim/nvim-lspconfig", - }, - opts = function() - -- fancy display function for folds (stolen from nvim-ufo readme) - local handler = function(virtText, lnum, endLnum, width, truncate) - local newVirtText = {} - local suffix = (" 󰁂 %d "):format(endLnum - lnum) - local sufWidth = vim.fn.strdisplaywidth(suffix) - local targetWidth = width - sufWidth - local curWidth = 0 - for _, chunk in ipairs(virtText) do - local chunkText = chunk[1] - local chunkWidth = vim.fn.strdisplaywidth(chunkText) - if targetWidth > curWidth + chunkWidth then - table.insert(newVirtText, chunk) - else - chunkText = truncate(chunkText, targetWidth - curWidth) - local hlGroup = chunk[2] - table.insert(newVirtText, { chunkText, hlGroup }) - chunkWidth = vim.fn.strdisplaywidth(chunkText) - -- str width returned from truncate() may less than 2nd argument, need padding - if curWidth + chunkWidth < targetWidth then - suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth) - end - break - end - curWidth = curWidth + chunkWidth - end - table.insert(newVirtText, { suffix, "MoreMsg" }) - return newVirtText + dependencies = { + "kevinhwang91/promise-async", + "nvim-treesitter/nvim-treesitter", + "neovim/nvim-lspconfig", + }, + opts = function() + -- fancy display function for folds (stolen from nvim-ufo readme) + local handler = function(virtText, lnum, endLnum, width, truncate) + local newVirtText = {} + local suffix = (" 󰁂 %d "):format(endLnum - lnum) + local sufWidth = vim.fn.strdisplaywidth(suffix) + local targetWidth = width - sufWidth + local curWidth = 0 + for _, chunk in ipairs(virtText) do + local chunkText = chunk[1] + local chunkWidth = vim.fn.strdisplaywidth(chunkText) + if targetWidth > curWidth + chunkWidth then + table.insert(newVirtText, chunk) + else + chunkText = truncate(chunkText, targetWidth - curWidth) + local hlGroup = chunk[2] + table.insert(newVirtText, { chunkText, hlGroup }) + chunkWidth = vim.fn.strdisplaywidth(chunkText) + -- str width returned from truncate() may less than 2nd argument, need padding + if curWidth + chunkWidth < targetWidth then + suffix = suffix .. (" "):rep(targetWidth - curWidth - chunkWidth) end - require("ufo").setup { - -- use treesitter to get the folds - provider_selector = function(bufnr, filetype, buftype) - return { "treesitter", "indent" } - end, - -- apply out fancy fold display - fold_virt_text_handler = handler, - } + break + end + curWidth = curWidth + chunkWidth + end + table.insert(newVirtText, { suffix, "MoreMsg" }) + return newVirtText + end + require("ufo").setup { + -- use treesitter to get the folds + provider_selector = function(bufnr, filetype, buftype) + return { "treesitter", "indent" } end, + -- apply out fancy fold display + fold_virt_text_handler = handler, + } + end, + }, + { + -- enables UNIX specific stuff in vim, + -- specifically: + -- :SudoWrite + -- :SudoRead + -- :Chmod + -- and also some more, but those are easy done with shell + "tpope/vim-eunuch", + lazy = false, + }, + { + "nvimtools/none-ls.nvim", + event = { "BufReadPre", "BufNewFile" }, + opts = function(_, opts) + opts.sources = {} + local nls = require "null-ls" + local builtins = nls.builtins + local sources = { + builtins.formatting.djlint.with { + filetypes = { "django", "jinja.html", "htmldjango", "tera", "html" }, + }, + builtins.diagnostics.djlint.with { + filetypes = { "django", "jinja.html", "htmldjango", "tera", "html" }, + }, + builtins.formatting.shfmt, + builtins.diagnostics.write_good.with { + diagnostics_postprocess = function(diagnostic) + diagnostic.severity = vim.diagnostic.severity.HINT + end, + }, + } + for _, source in ipairs(sources) do + table.insert(opts.sources, source) + end + end, + }, + { + "lvimuser/lsp-inlayhints.nvim", + event = "LspAttach", + opts = { + inlay_hints = { + parameter_hints = { show = true }, + type_hints = { show = true }, + only_current_line = false, + -- highlight group + highlight = "LspInlayHint", + -- virt_text priority + priority = 0, + }, }, - { - -- enables UNIX specific stuff in vim, - -- specifically: - -- :SudoWrite - -- :SudoRead - -- :Chmod - -- and also some more, but those are easy done with shell - "tpope/vim-eunuch", - lazy = false, - }, - { - "nvimtools/none-ls.nvim", - event = { "BufReadPre", "BufNewFile" }, - opts = function(_, opts) - opts.sources = {} - local nls = require "null-ls" - local builtins = nls.builtins - local sources = { - builtins.formatting.djlint.with { - filetypes = { "django", "jinja.html", "htmldjango", "tera", "html" }, - }, - builtins.diagnostics.djlint.with { - filetypes = { "django", "jinja.html", "htmldjango", "tera", "html" }, - }, - builtins.formatting.shfmt, - builtins.diagnostics.write_good.with { - diagnostics_postprocess = function(diagnostic) - diagnostic.severity = vim.diagnostic.severity.HINT - end, - }, - } - for _, source in ipairs(sources) do - table.insert(opts.sources, source) - end + config = function(_, opts) + require("lsp-inlayhints").setup(opts) + vim.api.nvim_create_augroup("LspAttach_inlayhints", {}) + vim.api.nvim_create_autocmd("LspAttach", { + group = vim.api.nvim_create_augroup("LspAttach_inlayhints", {}), + callback = function(args) + if not (args.data and args.data.client_id) then + return + end + local client = vim.lsp.get_client_by_id(args.data.client_id) + require("lsp-inlayhints").on_attach(client, args.buf) end, + }) + -- change how the highlighting looks + vim.cmd "hi LspInlayHint guibg=(bg*0.8) guifg=#6699b3" + end, + }, + { "kosayoda/nvim-lightbulb", event = { "BufReadPre", "BufNewFile" } }, + { + "Wansmer/treesj", + cmd = { "TSJJoin", "TSJSplit", "TSJSplit" }, + keys = { + { "", "TSJJoin" }, + { "", "TSJSplit" }, }, - { - "lvimuser/lsp-inlayhints.nvim", - event = "LspAttach", - opts = { - inlay_hints = { - parameter_hints = { show = true }, - type_hints = { show = true }, - only_current_line = false, - -- highlight group - highlight = "LspInlayHint", - -- virt_text priority - priority = 0, - }, - }, - config = function(_, opts) - require("lsp-inlayhints").setup(opts) - vim.api.nvim_create_augroup("LspAttach_inlayhints", {}) - vim.api.nvim_create_autocmd("LspAttach", { - group = vim.api.nvim_create_augroup("LspAttach_inlayhints", {}), - callback = function(args) - if not (args.data and args.data.client_id) then - return - end - local client = vim.lsp.get_client_by_id(args.data.client_id) - require("lsp-inlayhints").on_attach(client, args.buf) - end, - }) - -- change how the highlighting looks - vim.cmd "hi LspInlayHint guibg=(bg*0.8) guifg=#6699b3" - end, + opts = { + use_default_keymaps = false, }, - { "kosayoda/nvim-lightbulb", event = { "BufReadPre", "BufNewFile" } }, - { - "Wansmer/treesj", - cmd = { "TSJJoin", "TSJSplit", "TSJSplit" }, - keys = { - { "", "TSJJoin" }, - { "", "TSJSplit" }, - }, - opts = { - use_default_keymaps = false, - }, - }, - { - "b0o/incline.nvim", - event = "FileType", - config = function() - local function get_diagnostic_label(props) - local icons = { error = "", warn = "", info = "", hint = "" } - local label = {} + }, + { + "b0o/incline.nvim", + event = "FileType", + config = function() + local function get_diagnostic_label(props) + local icons = { error = "", warn = "", info = "", hint = "" } + local label = {} - for severity, icon in pairs(icons) do - local n = #vim.diagnostic.get(props.buf, - { severity = vim.diagnostic.severity[string.upper(severity)] }) - if n > 0 then - table.insert(label, { icon .. " " .. n .. " ", group = "DiagnosticSign" .. severity }) - end - end - if #label > 0 then - table.insert(label, { "| " }) - end - return label - end - local function get_git_diff(props) - local icons = { removed = "", changed = "", added = "" } - local labels = {} - -- local signs = vim.api.nvim_buf_get_var(props.buf, "gitsigns_status_dict") - -- local signs = vim.b.gitsigns_status_dict - -- for name, icon in pairs(icons) do - -- if tonumber(signs[name]) and signs[name] > 0 then - -- table.insert(labels, { icon .. " " .. signs[name] .. " ", group = "Diff" .. name }) - -- end - -- end - if #labels > 0 then - table.insert(labels, { "| " }) - end - return labels - end + for severity, icon in pairs(icons) do + local n = #vim.diagnostic.get(props.buf, { severity = vim.diagnostic.severity[string.upper(severity)] }) + if n > 0 then + table.insert(label, { icon .. " " .. n .. " ", group = "DiagnosticSign" .. severity }) + end + end + if #label > 0 then + table.insert(label, { "| " }) + end + return label + end + local function get_git_diff(props) + local icons = { removed = "", changed = "", added = "" } + local labels = {} + -- local signs = vim.api.nvim_buf_get_var(props.buf, "gitsigns_status_dict") + -- local signs = vim.b.gitsigns_status_dict + -- for name, icon in pairs(icons) do + -- if tonumber(signs[name]) and signs[name] > 0 then + -- table.insert(labels, { icon .. " " .. signs[name] .. " ", group = "Diff" .. name }) + -- end + -- end + if #labels > 0 then + table.insert(labels, { "| " }) + end + return labels + end - require("incline").setup { - render = function(props) - local filename = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(props.buf), ":t") - local ft_icon, ft_color = require("nvim-web-devicons").get_icon_color(filename) - local modified = vim.api.nvim_buf_get_option(props.buf, "modified") and "bold,italic" or "bold" + require("incline").setup { + render = function(props) + local filename = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(props.buf), ":t") + local ft_icon, ft_color = require("nvim-web-devicons").get_icon_color(filename) + local modified = vim.api.nvim_buf_get_option(props.buf, "modified") and "bold,italic" or "bold" - local buffer = { - { get_diagnostic_label(props) }, - { get_git_diff(props) }, - { ft_icon, guifg = ft_color }, - { " " }, - { filename, gui = modified }, - } - return buffer - end, - } + local buffer = { + { get_diagnostic_label(props) }, + { get_git_diff(props) }, + { ft_icon, guifg = ft_color }, + { " " }, + { filename, gui = modified }, + } + return buffer end, - }, - { - "mikesmithgh/kitty-scrollback.nvim", - enabled = true, - lazy = true, - cmd = { "KittyScrollbackGenerateKittens", "KittyScrollbackCheckHealth" }, - event = { "User KittyScrollbackLaunch" }, - -- version = '*', -- latest stable version, may have breaking changes if major version changed - -- version = '^3.0.0', -- pin major version, include fixes and features that do not have breaking changes - config = function() - require("kitty-scrollback").setup { - myconfig = function() - return { keymaps_enabled = false } - end, - } + } + end, + }, + { + "mikesmithgh/kitty-scrollback.nvim", + enabled = true, + lazy = true, + cmd = { "KittyScrollbackGenerateKittens", "KittyScrollbackCheckHealth" }, + event = { "User KittyScrollbackLaunch" }, + -- version = '*', -- latest stable version, may have breaking changes if major version changed + -- version = '^3.0.0', -- pin major version, include fixes and features that do not have breaking changes + config = function() + require("kitty-scrollback").setup { + myconfig = function() + return { keymaps_enabled = false } end, + } + end, + }, + { + "hrsh7th/nvim-cmp", + enabled = not vim.g.started_by_firenvim, + }, + { + "ziontee113/icon-picker.nvim", + keys = { + { "", "IconPickerNormal", desc = "pick icon" }, + { "y", "IconPickerYank", desc = "yank icon" }, }, - { - "hrsh7th/nvim-cmp", - enabled = not vim.g.started_by_firenvim, - }, - { - "ziontee113/icon-picker.nvim", - keys = { - { "", "IconPickerNormal", desc = "pick icon" }, - { "y", "IconPickerYank", desc = "yank icon" }, + cmd = { "IconPickerInsert", "IconPickerYank", "IconPickerNormal" }, + config = function() + require("icon-picker").setup { disable_legacy_commands = true } + end, + }, + { + "mfussenegger/nvim-dap", + lazy = false, + init = function() + require("core.utils").load_mappings "debug" + end, + config = function() + local dap = require "dap" + local mason_registry = require "mason-registry" + local codelldb_root = mason_registry.get_package("codelldb"):get_install_path() .. "/extension/" + local codelldb_path = codelldb_root .. "adapter/codelldb" + local liblldb_path = codelldb_root .. "lldb/lib/liblldb.so" + dap.defaults.fallback.external_terminal = { + command = "/home/plex/.local/bin/kitty", + args = {}, + } + dap.adapters.gdb = { + type = "executable", + command = "gdb", + args = { "-i", "dap" }, + } + dap.adapters.codelldb = { + type = "server", + port = "30333", + executable = { + command = codelldb_path, + args = { "--port", "30333" }, + detached = false, }, - cmd = { "IconPickerInsert", "IconPickerYank", "IconPickerNormal" }, - config = function() - require("icon-picker").setup { disable_legacy_commands = true } - end, - }, - { - "mfussenegger/nvim-dap", - lazy = false, - init = function() - require("core.utils").load_mappings "debug" - end, - config = function() - local dap = require "dap" - local mason_registry = require "mason-registry" - local codelldb_root = mason_registry.get_package("codelldb"):get_install_path() .. "/extension/" - local codelldb_path = codelldb_root .. "adapter/codelldb" - local liblldb_path = codelldb_root .. "lldb/lib/liblldb.so" - dap.defaults.fallback.external_terminal = { - command = "/home/plex/.local/bin/kitty", - args = {}, - } - dap.adapters.gdb = { - type = "executable", - command = "gdb", - args = { "-i", "dap" }, - } - dap.adapters.codelldb = { - type = "server", - port = "30333", - executable = { - command = codelldb_path, - args = { "--port", "30333" }, - detached = false, - }, - } - dap.configurations.cpp = { - { - name = "Launch file", - type = "codelldb", - request = "launch", - program = function() - return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file") - end, - args = function() - return require('custom.utils').tokenize_args(vim.fn.input("args: ")) - end, - cwd = "${workspaceFolder}", - -- FIXME: perhaps we can put the stdio somewhere more practical - stopOnEntry = false, - }, - } - dap.configurations.c = dap.configurations.cpp - dap.configurations.rust = dap.configurations.cpp - end, - }, - { - "rcarriga/nvim-dap-ui", - init = function() - require("core.utils").load_mappings "debug" - end, - dependencies = { - "mfussenegger/nvim-dap", + } + dap.configurations.cpp = { + { + name = "Launch file", + type = "codelldb", + request = "launch", + program = function() + return vim.fn.input("Path to executable: ", vim.fn.getcwd() .. "/", "file") + end, + args = function() + return require("custom.utils").tokenize_args(vim.fn.input "args: ") + end, + cwd = "${workspaceFolder}", + -- FIXME: perhaps we can put the stdio somewhere more practical + stopOnEntry = false, }, - config = function(_, opts) - local dap = require "dap" - local dapui = require "dapui" - dapui.setup(opts) - dap.listeners.after.event_initialized["dapui_config"] = function() - dapui.open {} - end - dap.listeners.before.event_terminated["dapui_config"] = function() - -- dapui.close {} - end - dap.listeners.before.event_exited["dapui_config"] = function() - -- dapui.close {} - end - end, - }, - { "folke/neodev.nvim", opts = {} }, - { - "mrcjkb/rustaceanvim", - enabled = true, - version = "^4", -- Recommended - ft = { "rust" }, - config = function() - local dap = require "dap" - vim.g.rustaceanvim = { - -- Plugin configuration - tools = {}, - -- LSP configuration - server = { - auto_attach = false, - }, - -- DAP configuration - dap = { - -- FIXME: the rustaceanvim debug config does not map the stdout/stderr to the - -- opened terminal, effectively rendering debugging with it useless. Luckily, - -- we can use the regular nvim-dap and nvim-dap-ui. - adapter = dap.adapters.codelldb, - }, - } - end, - }, - { - "theHamsta/nvim-dap-virtual-text", - lazy = false, -- PERF: this can be done more elegant - config = function() - require("nvim-dap-virtual-text").setup() - end, + } + dap.configurations.c = dap.configurations.cpp + dap.configurations.rust = dap.configurations.cpp + end, + }, + { + "rcarriga/nvim-dap-ui", + init = function() + require("core.utils").load_mappings "debug" + end, + dependencies = { + "mfussenegger/nvim-dap", }, + config = function(_, opts) + local dap = require "dap" + local dapui = require "dapui" + dapui.setup(opts) + dap.listeners.after.event_initialized["dapui_config"] = function() + dapui.open {} + end + dap.listeners.before.event_terminated["dapui_config"] = function() + -- dapui.close {} + end + dap.listeners.before.event_exited["dapui_config"] = function() + -- dapui.close {} + end + end, + }, + { "folke/neodev.nvim", opts = {} }, + { + "mrcjkb/rustaceanvim", + enabled = true, + version = "^4", -- Recommended + ft = { "rust" }, + config = function() + local dap = require "dap" + vim.g.rustaceanvim = { + enable_clippy = true, + -- Plugin configuration + tools = { + enable_clippy = true, + }, + -- LSP configuration + server = { + auto_attach = false, + }, + -- DAP configuration + dap = { + -- FIXME: the rustaceanvim debug config does not map the stdout/stderr to the + -- opened terminal, effectively rendering debugging with it useless. Luckily, + -- we can use the regular nvim-dap and nvim-dap-ui. + adapter = dap.adapters.codelldb, + }, + } + end, + }, + { + "theHamsta/nvim-dap-virtual-text", + lazy = false, -- PERF: this can be done more elegant + config = function() + require("nvim-dap-virtual-text").setup() + end, + }, } return plugins From 86876da8962577fb31e510c39e0ca706ac194d03 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Fri, 16 Feb 2024 18:03:35 +0100 Subject: [PATCH 56/96] firenvim things --- lua/custom/plugins.lua | 4 +++- spell/en.utf-8.add | 4 ++++ spell/en.utf-8.add.spl | Bin 3559 -> 3642 bytes 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index fbb1d0e..5c9d348 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -315,6 +315,7 @@ local plugins = { -- lazy.nvim { "folke/noice.nvim", + enabled = not vim.g.started_by_firenvim, event = "VeryLazy", -- config.lsp.signature.enabled = false dependencies = { @@ -475,7 +476,8 @@ local plugins = { }, { "glacambre/firenvim", - lazy = not vim.g.started_by_firenvim, + enabled = vim.g.started_by_firenvim, + lazy = false, build = function() vim.fn["firenvim#install"](0) end, diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index c241e59..ffff2ce 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -279,3 +279,7 @@ Lockscreen licht/! Licht ESRDD +erstmal +warmweißer +WG +SilverBullet diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl index cb8d3cd33a8412fe74d956c70c77ee545edbac2d..1e3d00ca9ae53a17813c89f64dac7875891d1362 100644 GIT binary patch delta 724 zcmYjPOK1~O6n*!-Wb*4&QCf|aVoM=V3@z~=a3d6rXm=GvL1vO^I(Cv7CzFJVV0PUo zh}XS{3lSGVDis5TV#S3^H!kd6)Ro{;spn0*kb#-YednBe?wR*(Y;bh=TIFgha6GTH zBSiY$>){V_M20PD5(&}wDWV1{+Hdi;d_q0Gqekcvuc`?O)?TWEL;-Ikrp;BCEV5&k z8s*=Ki~D*m`RLWi1z-N+%gJdP;&$?Q{=G#l3ed0V86^jmr7`O~NX}9Du~D2E*h$Or zqmDv5xZMbGoX9!U*08`+e$+)pK?oTV>MP$g=JJ&$WFm5?8_S9L6(y?Rm3d&?rwW%- zi?qPcQe&{Ok-A4~TuwinG$Sa8ewCKMgw}8%mEbE?Jj^Ndc z2_E3umgqOA6W2EEd3dypn2-2YrcgfTVMzexqOTlZ=crc@=e2z`8Y}&2t6I2%Md_4- z*9+Ijne6dq=I|x6PW3%?3)5^!=`@qu5mhOY0#Z{gG!j2NvehDTazThkY=(%xwwu^> zK9()gIL~Jb_=BD7jB%hw!g$NCvg73Nr|gl*N&)cQ@O(_tp~$~WhW0w^xR{V6?c3|%3m9G87_{E)X7$A$mH&PV*fJWaE_WlsGA D2w0@a delta 648 zcmX9+O=}ZT6rJ-XGifJHLlvx;(nTmlT1%z1sEclbK?>T1pdbYyAJg=iNhVAtEdxU9 zvI}u>UHA_~X$g|9bfF6i-MG`epi&TVC9Z^eUR=C4mviqq_uTvD&D2SL{NC#AZpROT z#Z$`~dHQ<%gYpoe4Omt`loR#rdg4P9XcEGCA3oEt)Lw&8z|-PsBSsYo>quLxBeq$g z2Z#1qK+ADzHoL1)VTsYTb8?!xnM*W6V)Y?O{gAuPEF9T&F5#^lIFsnhkyFN!WZe0M zLDi}FVZ1ezeb_PvQYjxjV?+mb7;iH|Cql>Qf0BkPVMA|$-h0j9wju2WuMmz9kNg*J=@Yf)oha)vs=X3jeEy!pn2SF*owja@p7HaYim?uC62z4I0lOjhW<@`IRZ~F(<}WaeuHrb_+`R@+vzmU$V={ I%enEHf8bM Date: Tue, 20 Feb 2024 10:15:23 +0100 Subject: [PATCH 57/96] fix hi for notes in light mode --- lua/custom/chadrc.lua | 2 +- lua/custom/highlights.lua | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/custom/chadrc.lua b/lua/custom/chadrc.lua index 8f1a86b..7167bc6 100644 --- a/lua/custom/chadrc.lua +++ b/lua/custom/chadrc.lua @@ -5,7 +5,7 @@ local M = {} local highlights = require "custom.highlights" M.ui = { - theme = "oceanic-next", + theme = "oceanic-light", theme_toggle = { "oceanic-next", "oceanic-light" }, hl_override = highlights.override, diff --git a/lua/custom/highlights.lua b/lua/custom/highlights.lua index 096b8b8..6ff2e60 100644 --- a/lua/custom/highlights.lua +++ b/lua/custom/highlights.lua @@ -17,6 +17,9 @@ M.override = { -- fg = "White", -- bg = "#241e1e", -- }, + TodoFgNOTE = { + fg = "#cccccc" + } } ---@type HLTable From fb1d6b670f4426e5f834c2710f329af125f01db7 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Tue, 20 Feb 2024 10:15:55 +0100 Subject: [PATCH 58/96] enable noice for lsp stuff again --- lua/custom/plugins.lua | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 3fcf528..fe69a90 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -335,22 +335,22 @@ local plugins = { require("noice").setup { lsp = { override = { - ["vim.lsp.util.convert_input_to_markdown_lines"] = true, - ["vim.lsp.util.stylize_markdown"] = true, - ["cmp.entry.get_documentation"] = true, + -- ["vim.lsp.util.convert_input_to_markdown_lines"] = true, + -- ["vim.lsp.util.stylize_markdown"] = true, + -- ["cmp.entry.get_documentation"] = true, }, -- IDK how to disable the nvchad builtins for this, which would -- produce a conflict - signature = { enabled = false }, - hover = { enabled = false }, + signature = { enabled = true }, + hover = { enabled = true }, }, -- you can enable a preset for easier configuration presets = { bottom_search = true, -- use a classic bottom cmdline for search command_palette = true, -- position the cmdline and popupmenu together long_message_to_split = true, -- long messages will be sent to a split - inc_rename = false, -- enables an input dialog for inc-rename.nvim - lsp_doc_border = false, -- add a border to hover docs and signature help + inc_rename = true, -- enables an input dialog for inc-rename.nvim + lsp_doc_border = true, -- add a border to hover docs and signature help }, messages = { enabled = true, From be267b68dae0d21e4d9af0d5fce4b22fc41022df Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Wed, 21 Feb 2024 12:00:32 +0100 Subject: [PATCH 59/96] telescope mappings --- lua/custom/mappings.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index 2c5d8f4..0647703 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -222,7 +222,8 @@ M.telescope = { -- lsp stuff ["cw"] = { " Telescope lsp_dynamic_workspace_symbols ", "telescope dynamic workspace symbols" }, - ["cd"] = { " Telescope lsp_document_symbols ", "telescope document symbols" }, + ["cf"] = { " Telescope lsp_document_symbols ", "telescope document symbols" }, + ["ci"] = { " Telescope diagnostics ", "telescope diagnostics" }, }, } From e8e8b3d9ac923d35d8983bdf9f39c5465b2e41a8 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Wed, 21 Feb 2024 22:05:24 +0100 Subject: [PATCH 60/96] noice lsp fix --- lua/custom/plugins.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index fe69a90..9ae1ad2 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -335,8 +335,8 @@ local plugins = { require("noice").setup { lsp = { override = { - -- ["vim.lsp.util.convert_input_to_markdown_lines"] = true, - -- ["vim.lsp.util.stylize_markdown"] = true, + ["vim.lsp.util.convert_input_to_markdown_lines"] = true, + ["vim.lsp.util.stylize_markdown"] = true, -- ["cmp.entry.get_documentation"] = true, }, -- IDK how to disable the nvchad builtins for this, which would From dfc8e5a7ecd56e54810a91886196584942e4a233 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Wed, 21 Feb 2024 22:05:24 +0100 Subject: [PATCH 61/96] noice lsp fix --- lua/custom/chadrc.lua | 2 +- lua/custom/plugins.lua | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lua/custom/chadrc.lua b/lua/custom/chadrc.lua index 7167bc6..8f1a86b 100644 --- a/lua/custom/chadrc.lua +++ b/lua/custom/chadrc.lua @@ -5,7 +5,7 @@ local M = {} local highlights = require "custom.highlights" M.ui = { - theme = "oceanic-light", + theme = "oceanic-next", theme_toggle = { "oceanic-next", "oceanic-light" }, hl_override = highlights.override, diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index fe69a90..0b738c4 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -335,14 +335,14 @@ local plugins = { require("noice").setup { lsp = { override = { - -- ["vim.lsp.util.convert_input_to_markdown_lines"] = true, - -- ["vim.lsp.util.stylize_markdown"] = true, - -- ["cmp.entry.get_documentation"] = true, + ["vim.lsp.util.convert_input_to_markdown_lines"] = true, + ["vim.lsp.util.stylize_markdown"] = true, + ["cmp.entry.get_documentation"] = true, }, -- IDK how to disable the nvchad builtins for this, which would -- produce a conflict - signature = { enabled = true }, - hover = { enabled = true }, + signature = { enabled = false }, + hover = { enabled = false }, }, -- you can enable a preset for easier configuration presets = { From fd46b2a6b6265cffe6a3a1068c516db9ac02bd1b Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Thu, 29 Feb 2024 20:10:26 +0100 Subject: [PATCH 62/96] important changes --- lua/custom/init.lua | 2 +- lua/custom/plugins.lua | 48 +++++++++++++++++++++++++++++++++++++++++- spell/en.utf-8.add | 5 +++++ 3 files changed, 53 insertions(+), 2 deletions(-) diff --git a/lua/custom/init.lua b/lua/custom/init.lua index 2b1f16f..bb0538c 100644 --- a/lua/custom/init.lua +++ b/lua/custom/init.lua @@ -67,7 +67,7 @@ opt.foldlevel = 10 -- start with all folds open -- Editor UI -- === -vim.o.guifont = "FiraCode Nerd Font:h22" +vim.o.guifont = "FiraCode Nerd Font:h15" opt.termguicolors = true opt.shortmess = "xsTOInfFitloCaAs" opt.showmode = true -- Show mode in cmd window diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 9ae1ad2..4b9eef9 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -821,7 +821,17 @@ local plugins = { }, -- LSP configuration server = { - auto_attach = false, + on_attach = function(client, bufnr) + -- you can also put keymaps in here + end, + settings = { + -- rust-analyzer language server configuration + ["rust-analyzer"] = { + cargo = { + features = "all", + }, + }, + }, }, -- DAP configuration dap = { @@ -840,6 +850,42 @@ local plugins = { require("nvim-dap-virtual-text").setup() end, }, + { + "jvgrootveld/telescope-zoxide", + dependencies = "nvim-telescope/telescope.nvim", + config = function() + -- Useful for easily creating commands + local z_utils = require "telescope._extensions.zoxide.utils" + + require("telescope").setup { + -- (other Telescope configuration...) + extensions = { + zoxide = { + prompt_title = "[ Walking on the shoulders of TJ ]", + mappings = { + default = { + after_action = function(selection) + print("Update to (" .. selection.z_score .. ") " .. selection.path) + end, + }, + [""] = { + before_action = function(selection) + print "before C-s" + end, + action = function(selection) + vim.cmd.edit(selection.path) + end, + }, + -- Opens the selected entry in a new split + [""] = { action = z_utils.create_basic_command "split" }, + }, + }, + }, + } + require("telescope").load_extension "zoxide" + end, + }, + { "nanotee/zoxide.vim" }, } return plugins diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index ffff2ce..ff89454 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -283,3 +283,8 @@ erstmal warmweißer WG SilverBullet +Forgejo +additional +scriptable +Autcrate +rustaceans From 4e77f5836e29f6be031aac36e8fdef73a8d3c5de Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Thu, 29 Feb 2024 20:13:12 +0100 Subject: [PATCH 63/96] zoxide --- lua/custom/mappings.lua | 3 +++ lua/custom/plugins.lua | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index 0647703..b8e91a2 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -208,6 +208,9 @@ M.telescope = { ["fo"] = { " Telescope oldfiles ", "Find oldfiles" }, ["fz"] = { " Telescope current_buffer_fuzzy_find ", "Find in current buffer" }, + -- directory + ["cd"] = { " Telescope zoxide list", "telescope zoxide cd" }, + -- git ["cm"] = { " Telescope git_commits ", "Git commits" }, ["gt"] = { " Telescope git_status ", "Git status" }, diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 9d2040c..b74ccaf 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -885,7 +885,7 @@ local plugins = { require("telescope").load_extension "zoxide" end, }, - { "nanotee/zoxide.vim" }, + { "nanotee/zoxide.vim", lazy = false, enabled = false }, } return plugins From 6ca750b1e3a09c20a35ba007d97d68e31fb4065c Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Fri, 1 Mar 2024 13:54:24 +0100 Subject: [PATCH 64/96] set font --- lua/custom/init.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/custom/init.lua b/lua/custom/init.lua index 2b1f16f..bb0538c 100644 --- a/lua/custom/init.lua +++ b/lua/custom/init.lua @@ -67,7 +67,7 @@ opt.foldlevel = 10 -- start with all folds open -- Editor UI -- === -vim.o.guifont = "FiraCode Nerd Font:h22" +vim.o.guifont = "FiraCode Nerd Font:h15" opt.termguicolors = true opt.shortmess = "xsTOInfFitloCaAs" opt.showmode = true -- Show mode in cmd window From 53d285d130879fdccd7ee554feef15cb252f7582 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Fri, 1 Mar 2024 16:18:19 +0100 Subject: [PATCH 65/96] add zoxide to dash --- lua/custom/chadrc.lua | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lua/custom/chadrc.lua b/lua/custom/chadrc.lua index 8f1a86b..a1284cc 100644 --- a/lua/custom/chadrc.lua +++ b/lua/custom/chadrc.lua @@ -64,7 +64,8 @@ local get_info = function() }, { " Mappings", "ch", "NvCheatsheet" }, { " Git", "gg", "LazyGit" }, - { " Files", "", "NvimTreeToggle" }, + { " Files", "", "NvimTreeToggle" }, + { " Change Directory", ";cd", "Telescope zoxide list" }, { " Terminal", "", "ToggleTerm direction=float" }, } return buf From 1541574eee83a7446debf669ffe1f66b35914aee Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Fri, 1 Mar 2024 16:41:14 +0100 Subject: [PATCH 66/96] better scrolling for neovide --- lua/custom/init.lua | 143 +++++++++++++++++++++++++------------------- 1 file changed, 80 insertions(+), 63 deletions(-) diff --git a/lua/custom/init.lua b/lua/custom/init.lua index bb0538c..a0a8f5d 100644 --- a/lua/custom/init.lua +++ b/lua/custom/init.lua @@ -2,7 +2,7 @@ local opt = vim.opt local g = vim.g g.maplocalleader = ";" -opt.mouse = "a" -- mouse does annoying things for me if it's not 'a' +opt.mouse = "a" -- mouse does annoying things for me if it's not 'a' opt.signcolumn = "yes" opt.clipboard = "" -- don't just use the system clipboard opt.wrap = false @@ -19,13 +19,13 @@ opt.shada = { "'1000", "<50", "s10", "h" } -- Tabs and Indents -- === -opt.textwidth = 80 -- Text width maximum chars before wrapping -opt.tabstop = 4 -- The number of spaces a tab is -opt.shiftwidth = 4 -- Number of spaces to use in auto(indent) -opt.smarttab = true -- Tab insert blanks according to 'shiftwidth' -opt.autoindent = true -- Use same indenting on new lines +opt.textwidth = 80 -- Text width maximum chars before wrapping +opt.tabstop = 4 -- The number of spaces a tab is +opt.shiftwidth = 4 -- Number of spaces to use in auto(indent) +opt.smarttab = true -- Tab insert blanks according to 'shiftwidth' +opt.autoindent = true -- Use same indenting on new lines opt.smartindent = true -- Smart autoindenting on new lines -opt.shiftround = true -- Round indent to multiple of 'shiftwidth' +opt.shiftround = true -- Round indent to multiple of 'shiftwidth' -- Timing -- === @@ -37,18 +37,18 @@ opt.updatetime = 500 -- Idle time to write swap and trigger CursorHold -- Searching -- === opt.ignorecase = true -- Search ignoring case -opt.smartcase = true -- Keep case when searching with * -opt.infercase = true -- Adjust case in insert completion mode -opt.incsearch = true -- Incremental search +opt.smartcase = true -- Keep case when searching with * +opt.infercase = true -- Adjust case in insert completion mode +opt.incsearch = true -- Incremental search -- Formatting -- === -opt.wrap = false -- No wrap by default -opt.linebreak = true -- Break long lines at 'breakat' +opt.wrap = false -- No wrap by default +opt.linebreak = true -- Break long lines at 'breakat' opt.breakat = "\\ \\ ;:,!?" -- Long lines break chars -opt.startofline = false -- Cursor in same column for few commands -opt.splitbelow = true -- Splits open bottom right +opt.startofline = false -- Cursor in same column for few commands +opt.splitbelow = true -- Splits open bottom right opt.splitright = true opt.breakindentopt = { shift = 2, min = 20 } opt.formatoptions = "qnlmBjp" -- see :h fo-table & :h formatoptions @@ -70,32 +70,49 @@ opt.foldlevel = 10 -- start with all folds open vim.o.guifont = "FiraCode Nerd Font:h15" opt.termguicolors = true opt.shortmess = "xsTOInfFitloCaAs" -opt.showmode = true -- Show mode in cmd window -opt.scrolloff = 2 -- Keep at least n lines above/below -opt.sidescrolloff = 0 -- Keep at least n lines left/right -opt.numberwidth = 2 -- Minimum number of columns to use for the line number -opt.number = true -- Show line numbers - opt.relativenumber = true -- Show relative line numbers -opt.ruler = true -- Default status ruler -opt.list = true -- Show hidden characters -opt.showtabline = 1 -- Don't change this, goes back to a vanilla vim default -opt.laststatus = 3 -- Always show laststatus +opt.showmode = true -- Show mode in cmd window +opt.scrolloff = 2 -- Keep at least n lines above/below +opt.sidescrolloff = 0 -- Keep at least n lines left/right +opt.numberwidth = 2 -- Minimum number of columns to use for the line number +opt.number = true -- Show line numbers +opt.relativenumber = true -- Show relative line numbers +opt.ruler = true -- Default status ruler +opt.list = true -- Show hidden characters +opt.showtabline = 1 -- Don't change this, goes back to a vanilla vim default +opt.laststatus = 3 -- Always show laststatus if vim.g.started_by_firenvim == true then - opt.showtabline = 1 -- Don't show tabline in firenvim, unless multitab - opt.laststatus = 1 -- Don't show laststatus in firenvim - opt.wrap = true + opt.showtabline = 1 -- Don't show tabline in firenvim, unless multitab + opt.laststatus = 1 -- Don't show laststatus in firenvim + opt.wrap = true end -opt.helpheight = 0 -- Disable help window resizing -opt.winwidth = 30 -- Minimum width for active window -opt.winminwidth = 1 -- Minimum width for inactive windows -opt.winheight = 1 -- Minimum height for active window -opt.winminheight = 1 -- Minimum height for inactive window +if vim.g.neovide == true then + -- fulscreen with F11 + vim.api.nvim_set_keymap("n", "", ":let g:neovide_fullscreen = !g:neovide_fullscreen", {}) -opt.showcmd = false -- show command in status line + vim.g.neovide_underline_automatic_scaling = true + + -- vim.g.neovide_floating_blur_amount_x = 2.0 + -- vim.g.neovide_floating_blur_amount_y = 2.0 + + vim.g.neovide_scroll_animation_length = 0.1 + -- vim.g.neovide_cursor_animation_length = 0 + -- vim.g.neovide_cursor_trail_size = 0 + vim.g.neovide_hide_mouse_when_typing = true + + vim.g.neovide_fullscreen = true +end + +opt.helpheight = 0 -- Disable help window resizing +opt.winwidth = 30 -- Minimum width for active window +opt.winminwidth = 1 -- Minimum width for inactive windows +opt.winheight = 1 -- Minimum height for active window +opt.winminheight = 1 -- Minimum height for inactive window + +opt.showcmd = false -- show command in status line opt.cmdheight = 0 -opt.cmdwinheight = 5 -- Command-line lines +opt.cmdwinheight = 5 -- Command-line lines opt.equalalways = true -- Resize windows on split or close opt.colorcolumn = "+0" -- Column highlight at textwidth's max character-limit @@ -103,8 +120,8 @@ opt.cursorline = true opt.cursorlineopt = { "number", "screenline" } opt.pumheight = 10 -- Maximum number of items to show in the popup menu -opt.pumwidth = 10 -- Minimum width for the popup menu -opt.pumblend = 10 -- Popup blend +opt.pumwidth = 10 -- Minimum width for the popup menu +opt.pumblend = 10 -- Popup blend -- Spelling correction -- === @@ -116,53 +133,53 @@ opt.spellsuggest = "double,50,timeout:5000" -- autocommands -- === local function augroup(name) - return vim.api.nvim_create_augroup("plex_" .. name, {}) + return vim.api.nvim_create_augroup("plex_" .. name, {}) end -- highlight on yank vim.api.nvim_create_autocmd("TextYankPost", { - group = augroup "highlight_yank", - callback = function() - vim.highlight.on_yank() - end, + group = augroup "highlight_yank", + callback = function() + vim.highlight.on_yank() + end, }) -- Disable conceallevel for specific file-types. vim.api.nvim_create_autocmd("FileType", { - group = augroup "fix_conceallevel", - pattern = { "latex", "tex" }, - callback = function() - vim.opt_local.conceallevel = 0 - end, + group = augroup "fix_conceallevel", + pattern = { "latex", "tex" }, + callback = function() + vim.opt_local.conceallevel = 0 + end, }) -- Resize splits if window got resized vim.api.nvim_create_autocmd("VimResized", { - group = augroup "resize_splits", - callback = function() - vim.cmd "wincmd =" - end, + group = augroup "resize_splits", + callback = function() + vim.cmd "wincmd =" + end, }) -- Wrap and enable spell-checker in text filetypes vim.api.nvim_create_autocmd("FileType", { - group = augroup "spell_conceal", - pattern = { "gitcommit", "markdown", "tex", "latex", "norg" }, - callback = function() - vim.opt_local.spell = true - vim.opt_local.conceallevel = 0 - end, + group = augroup "spell_conceal", + pattern = { "gitcommit", "markdown", "tex", "latex", "norg" }, + callback = function() + vim.opt_local.spell = true + vim.opt_local.conceallevel = 0 + end, }) -- map resizing for firenvim if vim.g.started_by_firenvim == true then - vim.keymap.set("n", "", function() - vim.o.lines = vim.o.lines + 1 - end, { expr = true, desc = "Make Display bigger" }) - vim.keymap.set("n", "", function() - vim.o.lines = vim.o.lines - 1 - end, { expr = true, desc = "Make Display smaller" }) + vim.keymap.set("n", "", function() + vim.o.lines = vim.o.lines + 1 + end, { expr = true, desc = "Make Display bigger" }) + vim.keymap.set("n", "", function() + vim.o.lines = vim.o.lines - 1 + end, { expr = true, desc = "Make Display smaller" }) end -- alias filetypes -vim.filetype.add { extension = { tera = 'html' } } +vim.filetype.add { extension = { tera = "html" } } From 7efca1eaaeb9cd4ede49d96d8ee0d9579393a37d Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Fri, 1 Mar 2024 16:52:26 +0100 Subject: [PATCH 67/96] disable write-good --- lua/custom/configs/overrides.lua | 2 +- lua/custom/plugins.lua | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lua/custom/configs/overrides.lua b/lua/custom/configs/overrides.lua index 713113d..d1217f5 100644 --- a/lua/custom/configs/overrides.lua +++ b/lua/custom/configs/overrides.lua @@ -57,7 +57,7 @@ M.mason = { "pyright", -- english?? - "write-good", + -- "write-good", -- shell "shellcheck", diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index b74ccaf..da21276 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -594,11 +594,11 @@ local plugins = { filetypes = { "django", "jinja.html", "htmldjango", "tera", "html" }, }, builtins.formatting.shfmt, - builtins.diagnostics.write_good.with { - diagnostics_postprocess = function(diagnostic) - diagnostic.severity = vim.diagnostic.severity.HINT - end, - }, + -- builtins.diagnostics.write_good.with { + -- diagnostics_postprocess = function(diagnostic) + -- diagnostic.severity = vim.diagnostic.severity.HINT + -- end, + -- }, } for _, source in ipairs(sources) do table.insert(opts.sources, source) From 2d241f89fc328a5e5bb9605c0702f0073118575a Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Mon, 4 Mar 2024 13:50:12 +0100 Subject: [PATCH 68/96] markdown preview --- lua/custom/plugins.lua | 13 +++++++++++++ spell/en.utf-8.add | 6 ++++++ spell/en.utf-8.add.spl | Bin 3642 -> 3792 bytes 3 files changed, 19 insertions(+) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index da21276..2c0d500 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -886,6 +886,19 @@ local plugins = { end, }, { "nanotee/zoxide.vim", lazy = false, enabled = false }, + { + "iamcco/markdown-preview.nvim", + cmd = { "MarkdownPreviewToggle", "MarkdownPreview", "MarkdownPreviewStop" }, + ft = { "markdown" }, + build = function() + vim.fn["mkdp#util#install"]() + end, + config = function() + -- Ugly fix for wsl not finding my browser + -- I HATE windows + vim.g.mkdp_echo_preview_url = 1 + end, + }, } return plugins diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index ff89454..70c8f61 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -288,3 +288,9 @@ additional scriptable Autcrate rustaceans +serv0 +serv1 +serv2 +sequenceDiagram +style +BT diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl index 1e3d00ca9ae53a17813c89f64dac7875891d1362..754a803d31e352e635f9512a9ab18981cf5cdfb5 100644 GIT binary patch literal 3792 zcmZ8kO>A6O6@KTwd3Fmz*cB4hbUUpPUEtWAOuDcXJ2oW|X(4u~s8{cA-n_iO$@`gj zvLO*HAXJtR0ts&r605GfENua)kw7ev8VT<}LV~bjhsw5m-?`(+!Xv-A@80u&zH`o< z?_9sxOyfM?_{?#hH!t}?7{%jclHSSkqO7KO>!$5y_vZKi`JZKH7?pL~i7^tHw3b#< zsiYKNa&aV<2A@i5gLB6jG&s)%t5I$ILPD8jfA{~SzIQ1ovvFZZLaRNat{;@uzxD33NS~M2ZgP0u0>B8OS zc^`DcFfXbpVu{_>>c2`qDV|nDP@RK^B1`O!u}+M`qecm)FnwZm-mvC35HrKh1_Csc zOQagS{@f+9ycQ#Y70H~@hUaGu7u^gRau|9avQseDF1EXvXKEJ~g9PWLhNFh_8Ej>= z%nMBEC2aAw|HR$S}uH0Xh;r;5_!KgQEZjM6{hzbl4|onY$!{DB&`hI8 z?bzaJYf{3-JVJx&0p!R{uZQ^1NQPPU9y0;d%3!&_qNqU8;;yHfSkRe-mFL4ib_^O} z>r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}d}CS>hWth3GS=4ve8$h-2pyeD7D zukxzArO!|FNe8aTr{;|}XE^+Zk86B<%g1+od{0sBEeCw@!0F|cr&rH*o(0|~YC From e2fc4111a132d8ded6ef155f6963b40172389577 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Wed, 6 Mar 2024 10:48:40 +0100 Subject: [PATCH 69/96] add mini --- lua/custom/init.lua | 1 + mini.lua | 138 ++++++++++++++++++++++++++++++++++++++++++++ spell/en.utf-8.add | 1 + 3 files changed, 140 insertions(+) create mode 100644 mini.lua diff --git a/lua/custom/init.lua b/lua/custom/init.lua index a0a8f5d..115e432 100644 --- a/lua/custom/init.lua +++ b/lua/custom/init.lua @@ -1,6 +1,7 @@ local opt = vim.opt local g = vim.g g.maplocalleader = ";" +g.python3_host_prog = '/usr/bin/python3' opt.mouse = "a" -- mouse does annoying things for me if it's not 'a' opt.signcolumn = "yes" diff --git a/mini.lua b/mini.lua new file mode 100644 index 0000000..6b85f01 --- /dev/null +++ b/mini.lua @@ -0,0 +1,138 @@ +local opt = vim.opt +local g = vim.g +g.maplocalleader = ";" +g.python3_host_prog = '/usr/bin/python3' + +opt.mouse = "a" -- mouse does annoying things for me if it's not 'a' +opt.signcolumn = "yes" +opt.clipboard = "" -- don't just use the system clipboard +opt.wrap = false +opt.breakindent = false +opt.spell = false +opt.list = true +opt.conceallevel = 2 +opt.undofile = true +opt.undolevels = 10000 +opt.writebackup = false +opt.history = 5000 +opt.shada = { "'1000", "<50", "s10", "h" } + +-- Tabs and Indents +-- === + +opt.textwidth = 80 -- Text width maximum chars before wrapping +opt.tabstop = 4 -- The number of spaces a tab is +opt.shiftwidth = 4 -- Number of spaces to use in auto(indent) +opt.smarttab = true -- Tab insert blanks according to 'shiftwidth' +opt.autoindent = true -- Use same indenting on new lines +opt.smartindent = true -- Smart autoindenting on new lines +opt.shiftround = true -- Round indent to multiple of 'shiftwidth' + +-- Timing +-- === +opt.ttimeout = true +opt.timeoutlen = 500 -- Time out on mappings +opt.ttimeoutlen = 10 -- Time out on key codes +opt.updatetime = 500 -- Idle time to write swap and trigger CursorHold + +-- Searching +-- === +opt.ignorecase = true -- Search ignoring case +opt.smartcase = true -- Keep case when searching with * +opt.infercase = true -- Adjust case in insert completion mode +opt.incsearch = true -- Incremental search + +-- Formatting +-- === + +opt.wrap = false -- No wrap by default +opt.linebreak = true -- Break long lines at 'breakat' +opt.breakat = "\\ \\ ;:,!?" -- Long lines break chars +opt.startofline = false -- Cursor in same column for few commands +opt.splitbelow = true -- Splits open bottom right +opt.splitright = true +opt.breakindentopt = { shift = 2, min = 20 } +opt.formatoptions = "" -- see :h fo-table & :h formatoptions + +-- Diff +-- === + +opt.diffopt:append { "iwhite", "indent-heuristic", "algorithm:patience" } +opt.wildmode = "longest:full,full" -- Command-line completion mode + +-- Folds +-- === + +opt.foldlevel = 10 -- start with all folds open + +-- Editor UI +-- === + +vim.o.guifont = "FiraCode Nerd Font:h15" +opt.termguicolors = true +opt.shortmess = "xsTOInfFitloCaAs" +opt.showmode = true -- Show mode in cmd window +opt.scrolloff = 2 -- Keep at least n lines above/below +opt.sidescrolloff = 0 -- Keep at least n lines left/right +opt.numberwidth = 2 -- Minimum number of columns to use for the line number +opt.number = true -- Show line numbers +opt.relativenumber = true -- Show relative line numbers +opt.ruler = true -- Default status ruler +opt.list = true -- Show hidden characters +opt.showtabline = 1 -- Don't change this, goes back to a vanilla vim default +opt.laststatus = 3 -- Always show laststatus + +if vim.g.started_by_firenvim == true then + opt.showtabline = 1 -- Don't show tabline in firenvim, unless multitab + opt.laststatus = 1 -- Don't show laststatus in firenvim + opt.wrap = true +end + +if vim.g.neovide == true then + -- fulscreen with F11 + vim.api.nvim_set_keymap("n", "", ":let g:neovide_fullscreen = !g:neovide_fullscreen", {}) + + vim.g.neovide_underline_automatic_scaling = true + + -- vim.g.neovide_floating_blur_amount_x = 2.0 + -- vim.g.neovide_floating_blur_amount_y = 2.0 + + vim.g.neovide_scroll_animation_length = 0.1 + -- vim.g.neovide_cursor_animation_length = 0 + -- vim.g.neovide_cursor_trail_size = 0 + vim.g.neovide_hide_mouse_when_typing = true + + vim.g.neovide_fullscreen = true +end + +opt.helpheight = 0 -- Disable help window resizing +opt.winwidth = 30 -- Minimum width for active window +opt.winminwidth = 1 -- Minimum width for inactive windows +opt.winheight = 1 -- Minimum height for active window +opt.winminheight = 1 -- Minimum height for inactive window + +opt.showcmd = false -- show command in status line +opt.cmdheight = 0 +opt.cmdwinheight = 5 -- Command-line lines +opt.equalalways = true -- Resize windows on split or close +opt.colorcolumn = "+0" -- Column highlight at textwidth's max character-limit + +opt.cursorline = true +opt.cursorlineopt = { "number", "screenline" } + +opt.pumheight = 10 -- Maximum number of items to show in the popup menu +opt.pumwidth = 10 -- Minimum width for the popup menu +opt.pumblend = 10 -- Popup blend + +-- Spelling correction +-- === + +opt.spell = false -- manually enable spell with `set spell` or `ts` +opt.spelllang = "en,de_de," +opt.spellsuggest = "double,50,timeout:5000" + +-- autocommands +-- === +local function augroup(name) + return vim.api.nvim_create_augroup("plex_" .. name, {}) +end diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index 70c8f61..e3a8d52 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -294,3 +294,4 @@ serv2 sequenceDiagram style BT +style From cd91bf774d4c964953160cf04c7e6b3bbd820baf Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Thu, 7 Mar 2024 14:31:20 +0100 Subject: [PATCH 70/96] theme --- lua/custom/chadrc.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/custom/chadrc.lua b/lua/custom/chadrc.lua index a1284cc..ba6b286 100644 --- a/lua/custom/chadrc.lua +++ b/lua/custom/chadrc.lua @@ -6,7 +6,7 @@ local highlights = require "custom.highlights" M.ui = { theme = "oceanic-next", - theme_toggle = { "oceanic-next", "oceanic-light" }, + theme_toggle = { "oceanic-next", "ayu_light" }, hl_override = highlights.override, hl_add = highlights.add, From 57a1f365e7135dbd28b8393bff74fb5c73d669d5 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Fri, 8 Mar 2024 20:01:53 +0100 Subject: [PATCH 71/96] disable rustaceanvim --- lua/custom/plugins.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 2c0d500..627bb7f 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -808,7 +808,7 @@ local plugins = { { "folke/neodev.nvim", opts = {} }, { "mrcjkb/rustaceanvim", - enabled = true, + enabled = false, version = "^4", -- Recommended ft = { "rust" }, config = function() From b49f437428847ce244661a4fbbd85a3edc68efa5 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Mon, 11 Mar 2024 14:38:16 +0100 Subject: [PATCH 72/96] add yamlls --- lua/custom/configs/lspconfig.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/custom/configs/lspconfig.lua b/lua/custom/configs/lspconfig.lua index 8175149..efaf2ab 100644 --- a/lua/custom/configs/lspconfig.lua +++ b/lua/custom/configs/lspconfig.lua @@ -13,6 +13,7 @@ local servers = { -- "rust_analyzer", -- rustaceanvim wants to do that, but the builtin thing has better integration! "bashls", "cmake", + "yamlls", } for _, lsp in ipairs(servers) do From 04bef0b100bf5733cf17c88436fc9bcff7583fa4 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Tue, 12 Mar 2024 11:33:07 +0100 Subject: [PATCH 73/96] moar lsp --- lua/custom/configs/lspconfig.lua | 65 +++++++++++++++++++++++++++++++ lua/custom/utils.lua | 12 +++--- spell/en.utf-8.add | 2 + spell/en.utf-8.add.spl | Bin 3792 -> 3831 bytes 4 files changed, 73 insertions(+), 6 deletions(-) diff --git a/lua/custom/configs/lspconfig.lua b/lua/custom/configs/lspconfig.lua index efaf2ab..4a98009 100644 --- a/lua/custom/configs/lspconfig.lua +++ b/lua/custom/configs/lspconfig.lua @@ -14,6 +14,8 @@ local servers = { "bashls", "cmake", "yamlls", + "textlsp", + "texlab", } for _, lsp in ipairs(servers) do @@ -47,3 +49,66 @@ lspconfig.rust_analyzer.setup { }, }, } + +lspconfig.ltex.setup { + on_attach = on_attach, + capabilities = capabilities, + settings = { + ltex = { + -- specific language (such as en-GB or de-DE is recommended, but I + -- want multilingual) + language = "en-GB", + enabled = { + -- I'm writing in german but the commands are in english, + -- does not really work + -- "bibtex", + -- "tex", + -- "latex", + "gitcommit", + "markdown", + "org", + "restructuredtext", + "rsweave", + "quarto", + "rmd", + "context", + "html", + "xhtml", + }, + }, + }, +} + +lspconfig.textlsp.setup { + on_attach = on_attach, + capabilities = capabilities, + filetypes = { + "bibtex", + "tex", + "latex", + "gitcommit", + "markdown", + "org", + "restructuredtext", + "rsweave", + "quarto", + "rmd", + "context", + "html", + "xhtml", + }, + settings = { + textLSP = { + analysers = { + languagetool = { + check_text = { + on_change = false, + on_open = true, + on_save = true, + }, + enabled = false, + }, + }, + }, + }, +} diff --git a/lua/custom/utils.lua b/lua/custom/utils.lua index 524c2d4..11158b9 100644 --- a/lua/custom/utils.lua +++ b/lua/custom/utils.lua @@ -1,9 +1,9 @@ local M = {} --- this function will split a string into a table of tokens, like it would --- be passed into the `argv` of a program that was executed from the commandline --- --- @param string raw string of cli args that should be split --- @return table tokens args as a table +--- this function will split a string into a table of tokens, like it would +--- be passed into the `argv` of a program that was executed from the commandline +--- +--- @param raw string string of cli args that should be split +--- @return table tokens args as a table M.tokenize_args = function(raw) -- NOTE: string.gmatch is does not use regex, but a smaller pattern matcher! -- A complete regex parser would be larger than lua itself. See @@ -47,7 +47,7 @@ end --- dumps a variable into a string, so it can be printed. This is meant for --- debug prints ---- @param any t any variable +--- @param t any variable --- @return string t_dumped t dumped to string M.dump = function(t) if type(t) == 'table' then diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index e3a8d52..189375b 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -295,3 +295,5 @@ sequenceDiagram style BT style +T2000 +TINF22CS diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl index 754a803d31e352e635f9512a9ab18981cf5cdfb5..caeff38b716c19839225114b9774294f359c5766 100644 GIT binary patch delta 139 zcmca0`(2hV%+t5HAT=k)=syDkr@%(OOI$LXMvM$h`bnu7nT!mKf;ss`6^sTz$jHE; zVleq5m#I8cZXRPQV=-e1Vux&gH3K?B4v0r<;+9v1oD&UoilP C{2U1Y From fbde01e2dd5706842341f1d4b255450c372d391f Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Tue, 12 Mar 2024 11:55:34 +0100 Subject: [PATCH 74/96] format latex --- lua/custom/configs/conform.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/custom/configs/conform.lua b/lua/custom/configs/conform.lua index a020d83..766f55e 100644 --- a/lua/custom/configs/conform.lua +++ b/lua/custom/configs/conform.lua @@ -11,6 +11,9 @@ local options = { sh = { "shfmt" }, toml = { "taplo" }, rust = { "rustfmt" }, + + tex = { "latexindent" }, + latex = { "latexindent" }, }, -- adding same formatter for multiple filetypes can look too much work for some From 65155cf697385d0516f3f5f118e2ecd41052cf2b Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Tue, 12 Mar 2024 17:23:58 +0100 Subject: [PATCH 75/96] join and formatoptions --- lua/custom/init.lua | 2 +- lua/custom/mappings.lua | 2 -- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/custom/init.lua b/lua/custom/init.lua index 115e432..609b5b6 100644 --- a/lua/custom/init.lua +++ b/lua/custom/init.lua @@ -52,7 +52,7 @@ opt.startofline = false -- Cursor in same column for few commands opt.splitbelow = true -- Splits open bottom right opt.splitright = true opt.breakindentopt = { shift = 2, min = 20 } -opt.formatoptions = "qnlmBjp" -- see :h fo-table & :h formatoptions +opt.formatoptions = "qnlmBjpt" -- see :h fo-table & :h formatoptions -- Diff -- === diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index b8e91a2..937c3a6 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -41,7 +41,6 @@ M.disabled = { ["td"] = "", ["wk"] = "", ["#"] = "", - ["J"] = "", }, t = { [""] = "", @@ -50,7 +49,6 @@ M.disabled = { ["#"] = "", ["?"] = "", ["/"] = "", - ["J"] = "", }, } From e357684dea188d14b321be49c5a3bcabd95de345 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Tue, 12 Mar 2024 17:30:16 +0100 Subject: [PATCH 76/96] disable ltex --- lua/custom/configs/lspconfig.lua | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lua/custom/configs/lspconfig.lua b/lua/custom/configs/lspconfig.lua index 4a98009..3e30794 100644 --- a/lua/custom/configs/lspconfig.lua +++ b/lua/custom/configs/lspconfig.lua @@ -50,7 +50,7 @@ lspconfig.rust_analyzer.setup { }, } -lspconfig.ltex.setup { +local ltex_table = { on_attach = on_attach, capabilities = capabilities, settings = { @@ -61,9 +61,9 @@ lspconfig.ltex.setup { enabled = { -- I'm writing in german but the commands are in english, -- does not really work - -- "bibtex", - -- "tex", - -- "latex", + "bibtex", + "tex", + "latex", "gitcommit", "markdown", "org", @@ -78,6 +78,7 @@ lspconfig.ltex.setup { }, }, } +-- lspconfig.ltex.setup(ltex_table) lspconfig.textlsp.setup { on_attach = on_attach, From 408dbcdf86135dbc19de48f5d8fff6f206da04d5 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Tue, 12 Mar 2024 18:15:29 +0100 Subject: [PATCH 77/96] spell --- spell/en.utf-8.add | 5 +++++ spell/en.utf-8.add.spl | Bin 3792 -> 3867 bytes 2 files changed, 5 insertions(+) diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index e3a8d52..c16c782 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -295,3 +295,8 @@ sequenceDiagram style BT style +logdir +traceback +timestamp +LoggerBuilder +libpt diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl index 754a803d31e352e635f9512a9ab18981cf5cdfb5..3eef9d43392d06d63541a8948efaab5096d28a89 100644 GIT binary patch delta 629 zcmY*W&ubGw7@fD9-6l=4QV`p))(W+Tf`X*hA6P<@Y$}!1A_fZ;3cH(SDb1$a?55Eo z6v3Mw#P1Rm!Lx`U;=kb8lV>k__2j{melzjn4!b*VzBk`{^XAL!t25TU^^GJBy4}hj zA#&$FSdR=d1EGyPdTN}_=zb8=dt+u!>x6(1w{{Vr4-W(EqKghAUcKL^&qfasEt@rz zX=n}+ef()213zd#JHjeubC>X&uIK6oL}n$XC%G3$XnOKaX*EQML)Fz)odfO+VVz#u}Sh=s--IjC3~`z-Oulm;Wq$b&pZP8&XF2p7K1!5%w8nM&#yiphd6qTiB*w z`T40vsw%qgGmjZ2Efy|lS4R$e5Ters>-}P{tn@Y7ZGd)gae0rbL U;~QC{XVxridTY&1*pZOWUpD!9_5c6? delta 593 zcmXX@O=}ZT6n$r=lQ?ZMD2SSos!&5fEo!P#kSvnUCmbLY%SD^9S395JA*sXnbCdbII5mETSek+cgK+K^r3+T^k320sEIvEj z48ohs;+CtizlbJQc&{R0qB>Eh%m}N^OJV0o+p#0R#qQ#C)LH>@NZ0}NH#DZgztQonCElmjf=p0PF#Z7j2CUHGk tiam%rZWqTf~e`w!)sbTt3~ From 2673b3ce1e92788ed1a8936f33eb821ffef4d315 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Tue, 12 Mar 2024 19:37:42 +0100 Subject: [PATCH 78/96] lspsettings --- lua/custom/configs/lspconfig.lua | 96 ++-------------- lua/custom/configs/lspsettings.lua | 169 +++++++++++++++++++++++++++++ spell/en.utf-8.add | 1 + spell/en.utf-8.add.spl | Bin 3867 -> 3927 bytes 4 files changed, 178 insertions(+), 88 deletions(-) create mode 100644 lua/custom/configs/lspsettings.lua diff --git a/lua/custom/configs/lspconfig.lua b/lua/custom/configs/lspconfig.lua index 3e30794..93d9858 100644 --- a/lua/custom/configs/lspconfig.lua +++ b/lua/custom/configs/lspconfig.lua @@ -2,6 +2,7 @@ local on_attach = require("plugins.configs.lspconfig").on_attach local capabilities = require("plugins.configs.lspconfig").capabilities local lspconfig = require "lspconfig" +local lspsettings = require "custom.configs.lspsettings" -- if you just want default config for the servers then put them in a table local servers = { @@ -10,11 +11,9 @@ local servers = { "tsserver", "clangd", "pyright", - -- "rust_analyzer", -- rustaceanvim wants to do that, but the builtin thing has better integration! "bashls", "cmake", "yamlls", - "textlsp", "texlab", } @@ -25,91 +24,12 @@ for _, lsp in ipairs(servers) do } end -lspconfig.rust_analyzer.setup { - on_attach = on_attach, - settings = { - ["rust-analyzer"] = { - check = { - command = "clippy", - }, - imports = { - granularity = { - group = "module", - }, - prefix = "self", - }, - cargo = { - buildScripts = { - enable = true, - }, - }, - procMacro = { - enable = true, - }, - }, - }, +local server_with_settings = { + -- "textlsp", + "ltex", + "rust_analyzer", } -local ltex_table = { - on_attach = on_attach, - capabilities = capabilities, - settings = { - ltex = { - -- specific language (such as en-GB or de-DE is recommended, but I - -- want multilingual) - language = "en-GB", - enabled = { - -- I'm writing in german but the commands are in english, - -- does not really work - "bibtex", - "tex", - "latex", - "gitcommit", - "markdown", - "org", - "restructuredtext", - "rsweave", - "quarto", - "rmd", - "context", - "html", - "xhtml", - }, - }, - }, -} --- lspconfig.ltex.setup(ltex_table) - -lspconfig.textlsp.setup { - on_attach = on_attach, - capabilities = capabilities, - filetypes = { - "bibtex", - "tex", - "latex", - "gitcommit", - "markdown", - "org", - "restructuredtext", - "rsweave", - "quarto", - "rmd", - "context", - "html", - "xhtml", - }, - settings = { - textLSP = { - analysers = { - languagetool = { - check_text = { - on_change = false, - on_open = true, - on_save = true, - }, - enabled = false, - }, - }, - }, - }, -} +for _, lsp in ipairs(server_with_settings) do + lspconfig[lsp].setup(lspsettings[lsp]) +end diff --git a/lua/custom/configs/lspsettings.lua b/lua/custom/configs/lspsettings.lua new file mode 100644 index 0000000..f66f3ff --- /dev/null +++ b/lua/custom/configs/lspsettings.lua @@ -0,0 +1,169 @@ +local on_attach = require("plugins.configs.lspconfig").on_attach +local capabilities = require("plugins.configs.lspconfig").capabilities + +local M = {} + +M.rust_analyzer = { + on_attach = on_attach, + capabilities = capabilities, + settings = { + ["rust-analyzer"] = { + check = { + command = "clippy", + }, + imports = { + granularity = { + group = "module", + }, + prefix = "self", + }, + cargo = { + buildScripts = { + enable = true, + }, + }, + procMacro = { + enable = true, + }, + }, + }, +} + +M.ltex = { + on_attach = on_attach, + capabilities = capabilities, + settings = { + ltex = { + -- specific language (such as en-GB or de-DE is recommended, but I + -- want multilingual) + language = "auto", + enabled = { + -- I'm writing in german but the commands are in english, + -- does not really work + "bibtex", + "tex", + "latex", + "gitcommit", + "markdown", + "org", + "restructuredtext", + "rsweave", + "quarto", + "rmd", + "context", + "html", + "xhtml", + }, + }, + }, +} + +M.textlsp = { + on_attach = on_attach, + capabilities = capabilities, + filetypes = { + "bibtex", + "tex", + "latex", + "gitcommit", + "markdown", + "org", + "restructuredtext", + "rsweave", + "quarto", + "rmd", + "context", + "html", + "xhtml", + }, + settings = { + textLSP = { + analysers = { + languagetool = { + enabled = true, + check_text = { + on_open = true, + on_save = true, + on_change = false, + }, + }, + gramformer = { + -- gramformer dependency needs to be installed manually + enabled = true, + gpu = false, + check_text = { + on_open = false, + on_save = true, + on_change = false, + }, + }, + hf_checker = { + enabled = false, + gpu = false, + quantize = 32, + model = "pszemraj/flan-t5-large-grammar-synthesis", + min_length = 40, + check_text = { + on_open = false, + on_save = true, + on_change = false, + }, + }, + hf_instruction_checker = { + enabled = true, + gpu = false, + quantize = 32, + model = "grammarly/coedit-large", + min_length = 40, + check_text = { + on_open = false, + on_save = true, + on_change = false, + }, + }, + hf_completion = { + enabled = true, + gpu = false, + quantize = 32, + model = "bert-base-multilingual-cased", + topk = 5, + }, + -- openai = { + -- enabled = false, + -- api_key = "", + -- check_text = { + -- on_open = false, + -- on_save = false, + -- on_change = false, + -- }, + -- model = "gpt-3.5-turbo", + -- max_token = 16, + -- }, + -- grammarbot = { + -- enabled = false, + -- api_key = "", + -- -- longer texts are split, this parameter sets the maximum number of splits per analysis + -- input_max_requests = 1, + -- check_text = { + -- on_open = false, + -- on_save = false, + -- on_change = false, + -- }, + -- }, + }, + documents = { + -- org = { + -- org_todo_keywords = { + -- "TODO", + -- "IN_PROGRESS", + -- "DONE", + -- }, + -- }, + txt = { + parse = true, + }, + }, + }, + }, +} +return M diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index 5ba36f5..eacef56 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -302,3 +302,4 @@ LoggerBuilder libpt T2000 TINF22CS +Fliegendes/! diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl index 3eef9d43392d06d63541a8948efaab5096d28a89..24b986498648d03e967bb1edaf264b1e6a08e72f 100644 GIT binary patch delta 684 zcmX9*O=}ZT6n*!-WRgjf7EK|B*4D3Dqt=9iq(T)+jasmUqI6+Vm?V>C>@*W+Cj9`Z zg6>`13Tk$x3ri3`3L@%%aH%Vy3zu%(xNxE8MIQ6!an5 zsLj73r&I47vZxFx2{pyJ=+)tlLmsdy41f(bXtnDsT5bduyZj_NOhtYjy`KGPQ9w=T zs!)n4UDDEJ_PO6E(I($A#_~VPQOowiRRz3#cSXmDOxV=Yy0)vla1AGVbq5^i4`(qC%NhkS>7=x(eu8!K#zGMF?e{&)%pW1RrNQJj;`6*J~|#y+2MPML)rNy%vN{r zBZrSE=?+O4M|eANo?QNx$W55zkmt*G-O*;Q=dV)%3-dTpkik0I&;}L!wXt~P`RP^apK78PtHi`?cfJw>zQQymoA>q};6nMaey`)+D+yx<`QbQxYuj-|4J qvb~@5lEQ9xGI1ySnRRA%H-cax zSZpE6ZI-c6!6sHp3b9LJXQLq4*eP~aq96!*CVB9`3tQbif4$^1z1aW&?g<5)@#KmF{)cz9W)T=JYz&G+~Fnuuod+e<(;vHFOrWJ z@IgxP6|}{Tmn)y@M$LAEzM{r(yB*ny&D!WO>cf_Dg8?(#_t1@0e#v_>EyRyZA1vkl14i|Br72}Wi z$rUWh+vFlw@H@EyU)EETsLFO~Vm$0A&FSgQ4#fgK)8j58kH(TbO%-rN-lQ&|DL+!B za)R=ey4`R%Ki_h_9o^p{C)$?9=#r(q@|dwNlxykZlV}t3S*bB28g_MJr#7LP$K+AE zf|2Z}$7ifrk^{C57!L(hp%Euxp=xtlY)$^A7p6mx{vvIcGb6BX*6e5(w;b1_ Date: Tue, 12 Mar 2024 22:40:55 +0100 Subject: [PATCH 79/96] languagetool ltex --- .gitignore | 1 + lua/custom/configs/lspsettings.lua | 5 +++++ lua/custom/plugins.lua | 15 +++++++++++++++ spell/en.utf-8.add | 4 ++++ spell/en.utf-8.add.spl | Bin 3927 -> 4017 bytes 5 files changed, 25 insertions(+) diff --git a/.gitignore b/.gitignore index 0cc9af9..ed11bf1 100644 --- a/.gitignore +++ b/.gitignore @@ -6,3 +6,4 @@ coc-settings.json lazy-lock.json after **/.DS_Store +lua/custom/secret diff --git a/lua/custom/configs/lspsettings.lua b/lua/custom/configs/lspsettings.lua index f66f3ff..b2cf427 100644 --- a/lua/custom/configs/lspsettings.lua +++ b/lua/custom/configs/lspsettings.lua @@ -54,6 +54,11 @@ M.ltex = { "html", "xhtml", }, + languageToolOrg = { + apiKey = require "custom.secret.languagetool_token", + username = "accounts@cscherr.de", + languageToolHttpServerUrl = "https://api.languagetoolplus.com/v2/", + }, }, }, } diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 627bb7f..6448e09 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -899,6 +899,21 @@ local plugins = { vim.g.mkdp_echo_preview_url = 1 end, }, + { + "rhysd/vim-grammarous", + enabled = false, + -- TODO: figure out how i can login to languagetool.org + lazy = false, + config = function() + vim.g["grammarous#jar_url"] = "https://www.languagetool.org/download/LanguageTool-5.9.zip" + vim.g["grammarous#use_vim_spelllang"] = 1 + vim.cmd [[ + let g:grammarous#default_comments_only_filetypes = { + \ '*' : 1, 'help' : 0, 'markdown' : 0, + \ } + ]] + end, + }, } return plugins diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index eacef56..a52f6a5 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -303,3 +303,7 @@ libpt T2000 TINF22CS Fliegendes/! +Gewöhnungsphase +Notfallmaßnahmen +übergriffig +Eligswalde diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl index 24b986498648d03e967bb1edaf264b1e6a08e72f..2fe2d8a8ff787b7811dd3dd74b4b2da111079efd 100644 GIT binary patch literal 4017 zcmZ8kOK%)m6|QruU3L&c#zIJ_*|x%Bkep8J=~-aOuMAcu6No)C(x?@vS65fMs;g6v zw%e;P$^s-tmXKgESM3Mm{yZ~l}varNvHjMHI*sub=@7#7|;g+j!-Fx2W zJLlYfckgyJiL5K1SwyAnab;89=dT>VLOy{S>-{$ z2T7EX;+qmEImiE+M0|h0E42xs09&;Z#9+2>v2l!9^n*Cf>c)hXj9|~$^1+fAs}!VU zsA(hE#hXz`FEl<)uVG(m8G4pAl|&i{NpR{*AOqC}mXid6YW!n;PH`jf7HZKzObcQ% z9H(=4t1CX}*263>CI}{WYpZ{geo{QGh@d(H4@Hi#JHR?I4v#7&n85U*)p^UBUqQ?i zJ6!~5O|Fru^TyIOvfPM~!GdH?ue;!nDlVESG-NRJ7_w6^mM*rZG0)U4EIJ9!#~O|j z&W~U#qh(f@(q0H2a5CSiq0AGC!lnrj&kq`$FvcVugKr`g(((|YW3&(XTw%KAK6eVZ z#K2RgLgO^SN^^ZH{z4d~fFSU91l{6=5oo#aL7^e(6D9I=>_#z-fL8dz{9d3^{qM{) zfrn}}O^$#meD_26hwsO^DJxYkUIAuo-N<1Q%@8jFTcC-d>)83Mfm=2VIlh_980X+R z&su3#)b1dI?=IkoJ%wH^Gw^_S1u#TFmNjO?5CKZVSTl;^m}jv@azrt&#Sll6&8HNc;s3(m00t@2`jMQ;@3b&4 zfIh*SR^JI^0w3l{J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ff --git a/lua/custom/init.lua b/lua/custom/init.lua index 609b5b6..115e432 100644 --- a/lua/custom/init.lua +++ b/lua/custom/init.lua @@ -52,7 +52,7 @@ opt.startofline = false -- Cursor in same column for few commands opt.splitbelow = true -- Splits open bottom right opt.splitright = true opt.breakindentopt = { shift = 2, min = 20 } -opt.formatoptions = "qnlmBjpt" -- see :h fo-table & :h formatoptions +opt.formatoptions = "qnlmBjp" -- see :h fo-table & :h formatoptions -- Diff -- === diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index 937c3a6..cc07fa9 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -399,7 +399,6 @@ M.edit = { ["s"] = { "s", "replace with insert mode" }, -- split and join lines - ["J"] = { "j" }, [""] = { "join", "join lines" }, [""] = { "il", "split line" }, @@ -437,6 +436,7 @@ M.edit = { [""] = { ":move'>+gv=gv", "Move lines down", opts = { silent = true } }, [""] = { ""] = { ">gv", "More indentation" }, + ["fl"] = {":!fmt -w80", "Reorder lines"} }, x = {}, t = { From 069751a4885bca622346d9730946d42daa07e8cf Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Wed, 13 Mar 2024 11:59:33 +0100 Subject: [PATCH 81/96] paste to terminal --- lua/custom/mappings.lua | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index cc07fa9..246285d 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -222,7 +222,10 @@ M.telescope = { ["ma"] = { " Telescope marks ", "telescope bookmarks" }, -- lsp stuff - ["cw"] = { " Telescope lsp_dynamic_workspace_symbols ", "telescope dynamic workspace symbols" }, + ["cw"] = { + " Telescope lsp_dynamic_workspace_symbols ", + "telescope dynamic workspace symbols", + }, ["cf"] = { " Telescope lsp_document_symbols ", "telescope document symbols" }, ["ci"] = { " Telescope diagnostics ", "telescope diagnostics" }, }, @@ -384,6 +387,10 @@ M.movements = { vim.api.nvim_replace_termcodes("", true, true, true), "Escape terminal mode", }, + [""] = { + '"+pi', + "paste into terminal", + }, }, } @@ -436,7 +443,7 @@ M.edit = { [""] = { ":move'>+gv=gv", "Move lines down", opts = { silent = true } }, [""] = { ""] = { ">gv", "More indentation" }, - ["fl"] = {":!fmt -w80", "Reorder lines"} + ["fl"] = { ":!fmt -w80", "Reorder lines" }, }, x = {}, t = { From 9c176e33cfb8350f2cd51450233e1d1d1de655dc Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Wed, 13 Mar 2024 12:27:36 +0100 Subject: [PATCH 82/96] timeouts better --- lua/custom/init.lua | 10 ++++++++-- lua/custom/plugins.lua | 21 +++++++++++++++++++++ 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/lua/custom/init.lua b/lua/custom/init.lua index 115e432..6731ad5 100644 --- a/lua/custom/init.lua +++ b/lua/custom/init.lua @@ -30,10 +30,16 @@ opt.shiftround = true -- Round indent to multiple of 'shiftwidth' -- Timing -- === +-- NOTE: the which-key plugin makes this a little different. Instead of going +-- to a newline after "o", the which-key panel opens. Only when we input +-- something other than "o" it will go to the line and write that. I don't +-- really like this behavior. We can disable this for specific triggers. +-- See https://github.com/folke/which-key.nvim +opt.timeout = true opt.ttimeout = true -opt.timeoutlen = 500 -- Time out on mappings +opt.timeoutlen = 250 -- Time out on mappings opt.ttimeoutlen = 10 -- Time out on key codes -opt.updatetime = 500 -- Idle time to write swap and trigger CursorHold +opt.updatetime = 300 -- Idle time to write swap and trigger CursorHold -- Searching -- === diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 6448e09..239ac5a 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -101,6 +101,27 @@ local plugins = { ["w"] = { name = "+window/which" }, ["f"] = { name = "+formatting" }, }, + opts = { + triggers_nowait = { + -- marks + "`", + "'", + "g`", + "g'", + -- registers + '"', + "", + -- spelling + "z=", + }, + triggers_blacklist = { + -- list of mode / prefixes that should never be hooked by WhichKey + -- this is mostly relevant for keymaps that start with a native binding + i = { "j", "k" }, + v = { "j", "k" }, + n = { "o", "O" }, + }, + }, }, { "echasnovski/mini.trailspace", From 852c3a5d864a324ee6f29ef16b2ad78293038961 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Thu, 14 Mar 2024 10:21:09 +0100 Subject: [PATCH 83/96] remove mark with # --- lua/custom/mappings.lua | 3 --- spell/en.utf-8.add | 1 + spell/en.utf-8.add.spl | Bin 4017 -> 4032 bytes 3 files changed, 1 insertion(+), 3 deletions(-) diff --git a/lua/custom/mappings.lua b/lua/custom/mappings.lua index 246285d..a783009 100644 --- a/lua/custom/mappings.lua +++ b/lua/custom/mappings.lua @@ -362,9 +362,6 @@ M.movements = { ["H"] = { "", "Beginning of line" }, ["L"] = { "", "End of line" }, - -- go to mark with "#" - ["#"] = { "'", "go to mark" }, - -- spell ["]s"] = { "]s", "go to next spelling mark" }, ["[s"] = { "[s", "go to last spelling mark" }, diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index a52f6a5..8e33318 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -307,3 +307,4 @@ Gewöhnungsphase Notfallmaßnahmen übergriffig Eligswalde +Usecases diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl index 2fe2d8a8ff787b7811dd3dd74b4b2da111079efd..87389b77e55a5256f018c89681a7d4dea14dfd0c 100644 GIT binary patch delta 52 zcmdlee?Xou%+t5HAT=k)=syDk=ZuYff4Etg)AEWZ^YWgzfqnq%+t5HAT=k)=syDkXYWS7KiterX?c_RcvLq#^3*c}0OkV=ga7~l From 7a5c8428c9fbe63f6deabce3933a71c1d3ed0760 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Thu, 14 Mar 2024 12:10:48 +0100 Subject: [PATCH 84/96] fix ltex --- lua/custom/configs/lspsettings.lua | 3 +-- spell/en.utf-8.add | 1 + spell/en.utf-8.add.spl | Bin 4032 -> 4058 bytes 3 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/custom/configs/lspsettings.lua b/lua/custom/configs/lspsettings.lua index b2cf427..e8da2c4 100644 --- a/lua/custom/configs/lspsettings.lua +++ b/lua/custom/configs/lspsettings.lua @@ -38,8 +38,6 @@ M.ltex = { -- want multilingual) language = "auto", enabled = { - -- I'm writing in german but the commands are in english, - -- does not really work "bibtex", "tex", "latex", @@ -59,6 +57,7 @@ M.ltex = { username = "accounts@cscherr.de", languageToolHttpServerUrl = "https://api.languagetoolplus.com/v2/", }, + languageToolHttpServerUrl = "https://api.languagetoolplus.com/v2/", }, }, } diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index 8e33318..2586189 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -308,3 +308,4 @@ Notfallmaßnahmen übergriffig Eligswalde Usecases +OpenAPI diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl index 87389b77e55a5256f018c89681a7d4dea14dfd0c..0b2cb082701923cde15f2a1758294694e4968fb6 100644 GIT binary patch delta 523 zcmXX@Jxjw-6wPVDwnkHMt42CFI0;fe5SP+6Q3}?o6+v-nEfjf5^eU|DaU}E)Y|Bsm6Zi7A zZzOclCLXTJ_r6#CX&`0U^Vx;mVqV_#kF1+BNFm2F1xrmGOt4P}d0&I+VT*V{F=mSW z+gRW<6_tXP-B4cAMh4SJV3MYoiSAnt8AH0+3RxXrIXGoUGWRHZoifY`+jY*wib zWlnA*jRsA{)u5;}sG-CEa#$;)QN487g!{kMGY5WSaxF&{=Ok1H%JtOSW4SOpUAqQS(V1`83z#4`$)7?blOg4o#xTm(C9 z11gArKrF1q%8$Py=$k!n*uB|#GjHC`ehohlCs*^ucGLB|)URPguOE{akr3KXH<5K< zO8xX-qpPl>R_TvM=_WSA+^9HE4!oUAss8DG(UhV(uPY$ix0 zY&-knr5(&-8YxWD1ewr#8T*u1)AF)7WUWUoS7WWPT@F08kTgvzi#BabXXo^F>N-!I zCC4_?4I(}(kN-P&=#~GOs$o&E>~(lPq0U|YT{J_6ghz#>QVO|;IDmtO=B%-kk1W+` z^_DURt@G0+)diyztsX7VCxbJr*-*ZPMdWzN6fY~G6{ZQ%T0nExAnpjlt}frg4&v!5 qhYJI_BBMStgt*St&>}j>OU Date: Sun, 17 Mar 2024 09:51:01 -0400 Subject: [PATCH 85/96] optional ltex languagetool secret --- lua/custom/configs/lspsettings.lua | 20 ++++-- lua/custom/configs/overrides.lua | 19 +---- lua/custom/utils.lua | 112 ++++++++++++++++------------- 3 files changed, 81 insertions(+), 70 deletions(-) diff --git a/lua/custom/configs/lspsettings.lua b/lua/custom/configs/lspsettings.lua index e8da2c4..0a26aee 100644 --- a/lua/custom/configs/lspsettings.lua +++ b/lua/custom/configs/lspsettings.lua @@ -52,12 +52,7 @@ M.ltex = { "html", "xhtml", }, - languageToolOrg = { - apiKey = require "custom.secret.languagetool_token", - username = "accounts@cscherr.de", - languageToolHttpServerUrl = "https://api.languagetoolplus.com/v2/", - }, - languageToolHttpServerUrl = "https://api.languagetoolplus.com/v2/", + -- load token and additional languagetool items later }, }, } @@ -170,4 +165,17 @@ M.textlsp = { }, }, } + +-- load secrets +-- the secret module should just return a string with the token +local available, token = require("custom.utils").try_require "custom.secret.languagetool_token" +if available then + M.ltex.languageToolOrg = { + apiKey = token, + username = "accounts@cscherr.de", + languageToolHttpServerUrl = "https://api.languagetoolplus.com/v2/", + } + M.ltex.languageToolHttpServerUrl = "https://api.languagetoolplus.com/v2/" +end + return M diff --git a/lua/custom/configs/overrides.lua b/lua/custom/configs/overrides.lua index d1217f5..5226d76 100644 --- a/lua/custom/configs/overrides.lua +++ b/lua/custom/configs/overrides.lua @@ -30,38 +30,25 @@ M.treesitter = { M.mason = { ensure_installed = { - -- general purpose "purpose", - - -- lua stuff "lua-language-server", "stylua", - - -- web dev stuff "css-lsp", "html-lsp", "typescript-language-server", "deno", "prettier", - - -- c/cpp stuff "clangd", "clang-format", "cmake-language-server", - - -- rust "rust-analyzer", "taplo", - - -- python "pyright", - - -- english?? - -- "write-good", - - -- shell "shellcheck", "bash-language-server", + "ltex-ls", + "shellcheck", + "taplo", }, } diff --git a/lua/custom/utils.lua b/lua/custom/utils.lua index 11158b9..cef1dc2 100644 --- a/lua/custom/utils.lua +++ b/lua/custom/utils.lua @@ -5,44 +5,44 @@ local M = {} --- @param raw string string of cli args that should be split --- @return table tokens args as a table M.tokenize_args = function(raw) - -- NOTE: string.gmatch is does not use regex, but a smaller pattern matcher! - -- A complete regex parser would be larger than lua itself. See - -- [Programming in Lua 20.2](https://www.lua.org/pil/20.2.html). - -- - -- Notable differences: - -- '-' is ungreedy wildcard - -- '*?' does not work - -- '|' is not or - -- - -- This means we're better of implementing the lexer with an algorithm. - local t = {} - local current = "" - local in_str = false - local str_seek - for c in string.gmatch(raw, ".") do -- iterate through all chars - if c == ' ' and not in_str then - if string.len(current) > 0 then - table.insert(t, current) - current = "" - end - elseif c == '"' and not in_str then - in_str = true - str_seek = '"' - elseif c == "'" and not in_str then - in_str = true - str_seek = "'" - elseif c == str_seek and in_str then - in_str = false - table.insert(t, current) - current = "" - else - current = current .. c - end - end - if string.len(current) > 0 then + -- NOTE: string.gmatch is does not use regex, but a smaller pattern matcher! + -- A complete regex parser would be larger than lua itself. See + -- [Programming in Lua 20.2](https://www.lua.org/pil/20.2.html). + -- + -- Notable differences: + -- '-' is ungreedy wildcard + -- '*?' does not work + -- '|' is not or + -- + -- This means we're better of implementing the lexer with an algorithm. + local t = {} + local current = "" + local in_str = false + local str_seek + for c in string.gmatch(raw, ".") do -- iterate through all chars + if c == " " and not in_str then + if string.len(current) > 0 then table.insert(t, current) + current = "" + end + elseif c == '"' and not in_str then + in_str = true + str_seek = '"' + elseif c == "'" and not in_str then + in_str = true + str_seek = "'" + elseif c == str_seek and in_str then + in_str = false + table.insert(t, current) + current = "" + else + current = current .. c end - return t + end + if string.len(current) > 0 then + table.insert(t, current) + end + return t end --- dumps a variable into a string, so it can be printed. This is meant for @@ -50,18 +50,34 @@ end --- @param t any variable --- @return string t_dumped t dumped to string M.dump = function(t) - if type(t) == 'table' then - local s = '{ ' - for k, v in pairs(t) do - if type(k) ~= 'number' then k = '"' .. k .. '"' end - if k ~= 1 then - s = s .. ', ' - end - s = s .. '[' .. k .. '] = \'' .. M.dump(v) .. '\'' - end - return s .. ' }' - else - return tostring(t) + if type(t) == "table" then + local s = "{ " + for k, v in pairs(t) do + if type(k) ~= "number" then + k = '"' .. k .. '"' + end + if k ~= 1 then + s = s .. ", " + end + s = s .. "[" .. k .. "] = '" .. M.dump(v) .. "'" end + return s .. " }" + else + return tostring(t) + end end + +--- Try to require a module +--- @param module string module name +--- @return boolean available is the module available? +--- @return any loaded_module the loaded module if it is available +M.try_require = function(module) + local available, loaded_module = pcall(require, module) + if not available then + return available, nil + else + return available, loaded_module + end +end + return M From 35dd2cb5a46f7183983cf15a462ca0b722122935 Mon Sep 17 00:00:00 2001 From: "Christoph J. Scherr" Date: Fri, 22 Mar 2024 11:17:00 +0100 Subject: [PATCH 86/96] lualine --- lua/custom/plugins.lua | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 239ac5a..1b66546 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -935,6 +935,25 @@ local plugins = { ]] end, }, + { + "NvChad/ui", + enabled = true, + branch = "v2.0", + lazy = false, + }, + { + "nvim-lualine/lualine.nvim", + lazy = false, + dependencies = { + "nvim-tree/nvim-web-devicons", + "NvChad/ui", -- load after nvchad ui + }, + config = function() + -- TODO: add lsp module for lualine + -- Maybe we can steal modules from the nvchad ui + require("lualine").setup() + end, + }, } return plugins From 971a5c234977ef504e5c0ca7282d3336fb8680b0 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sat, 6 Apr 2024 17:17:06 +0200 Subject: [PATCH 87/96] spell --- spell/en.utf-8.add | 7 +++++++ spell/en.utf-8.add.spl | Bin 4058 -> 4153 bytes 2 files changed, 7 insertions(+) diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index 2586189..dfe01e9 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -309,3 +309,10 @@ Notfallmaßnahmen Eligswalde Usecases OpenAPI +homeserver +theseus +Kernelmodus +entziehbares +vorkompiliert +vorkompilierte +Wordle diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl index 0b2cb082701923cde15f2a1758294694e4968fb6..80ab7d20d952a4aabcbc5119b1ebcbe352dde44d 100644 GIT binary patch delta 824 zcmXX^&rcIU6rMM;ZJ|HVaH)!-!2<_Wuxdhr1P&5H6b~dK8Y5|!fi7&jb-FEJOt@%b zJm}$F^rHR+n#M!x!H{U8>5VJ?xT!Zi=uI*D&Eh7zvor5|-+SLT@BQJIN4jRGrmGe0 z`?+%99}y)UElCT#k{DBNZ;I`D|MQQl=FfJf;D*FuBd2 z)hM;N&$;S2c^&YEbA3+<(dvH$eXa9H=gRq(k!8!*Q;7mv0GVji zkQQQx{|5%Ep*s2@;W!@F0`Mf%8kb^|V{H%dJn}qyHd6*t+q}B(psjZWcd-mPp~SNn z5tr8ST3+Ac%ltETfyQ_|o~10$#V2TsAIFam_7q|e5!MwrTFWIX(YdFohE=wF6@;t! zquYimHZsS*;zKme1Bt=?%`&h}Y1+ z3*U>8k?3fn;}&V&>3Epi3?qaqizX7KDh4tuptoj7Q&8>=+rlXtrqeiyukqW?33|fm zI{wW zc&p6=~ZnX1YMyBDLr T@PSMphGI06rI{C(GI!)ZZ(6=X delta 691 zcmX9*O=}ZT6n*!-$z<}0#!3yvMs!h7YMRDMDYl@YNWkK*h)C;X^3s_)&BVzhAtIIL`V0cD>p9e&L1GU(~TeZjSReZ-~BlEoHK6@?H01j)unbzy6*H} z#uATqvfns|4(7yqyam7@C-Ih8g%H1r{qPZgig_5~jCN57QzB|B2(b(MhCb(-2Tjhn zrb*lNp^rCWqgnCA0TXJ_BqU+uIGQAqx!l0 zhzV_IQD0rv&q#_)HDlmieG#_tvp!i&*J7shg07(1;rfP8b!}Bbhi*P}g%|WFf=!=r zs4|JA_!KN)EndtInuHe6?p}n-F7*YosAn6W#qYoX%SHp9;zMJM*t{~X!yJ|q52m*Q zg{NEG_9NQjvQM;H1f-~OvnH&oYFQa(;RI#$CH$ROga9kaQ{>ytfpcddulvAusFr#IMS vdP8o4?mFO7W<1OPw1w$)Kmmyl*v}l!8xFjSWcegiQE$*k)yj*PncMsyhTxsi From 0c5be1344f597fb495a42bfbefc1105643171d69 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Fri, 12 Apr 2024 11:03:25 +0200 Subject: [PATCH 88/96] spell --- spell/en.utf-8.add | 20 ++++++++++++++++++++ spell/en.utf-8.add.spl | Bin 4153 -> 4352 bytes 2 files changed, 20 insertions(+) diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index dfe01e9..c27c6fb 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -316,3 +316,23 @@ entziehbares vorkompiliert vorkompilierte Wordle +Quotientenkriterium +neovim +authentik +auth +Mesum +Raza +letsencrypt +MTA +STS +BIMI +Minecraft +exfiltrate +VPS +JVM +Dammit/! +Maxdorf +Leininger +Dockerfile +yml +CMD diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl index 80ab7d20d952a4aabcbc5119b1ebcbe352dde44d..4c84b89be4768cc03b913a67ba3b4936708d65f7 100644 GIT binary patch delta 2229 zcmX|CU1%It7@d1(HrZ^FQfh~$DQU8`+fa$MO_R8_indD7QmcKiR2!%>v$MO?{h7_o z?4~I~ng>CAC<#}5DIpYuyb1oiD2;-B^hLCfMKHw#>61R#Ac~%ICzyfF+cGVSx0|A(FO)<{N~@k;-%uZkBa?Ov`yE^y7n68S5LY#?I0WEU_tFfL7FbIW%F< zkyM_s?64_>!jrX_I8jb1E!AP3rkZrQu5QV}LE9^dn0IYQq;JNI!}X8qJNeAQQVFa8 zp7CVT7OCH=aN&luMP4hi){s%GjS4%23*aXj0F(%^O8~p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* zZ{bzfU_J&f^c+?Z%7J==@$>P3Ih3*B@eFT%<=y!)7@lIOUb7WXl4LO7=EdN zr+}Z{R{eeuMsbpL@_E7TegIp3aACnu*0fvVgZug~@jCVNxO{oBYBIhZi>zZ1$w>=w zCSyclWO4#9@J#j~&L>a1V9L)S#rRH)a1lpXkL)l?b2$?s9cc*=v1%RIAi(2G2oO=1pNI9I^1$etGAXzCWWRzH6A@4JG5g3^50Xf{ zt*B<qRJmE&cJf-t{7_qvtW)frK zCgF|Q&4g!RV?_NnwF8x;g5e$QmiF(c zMv~>`*nU(0;*6di4Mdam;VI(CRP_s*^;jAOj<6;PI!ZKJq>RJ~3u`i8iVy}l|L9Uj zpDS;<$n$dF&A;d}~)7;F)hZ)L(n+x2trg2t% z5i={!h#u&t$M;)pZSE)3Qqf7k+!Lg+Trq%ey6f$ z@4D}}ttibFFt%=v9_5kbz*e1IteSCjLVdSVqh7RX!cjnvrs1)2M}!E<}AuTD-kFE^X1B0x7)y+ zzz32p`)CgF7S>K#$I?|@Q!H-2lK#YOR>Z}@KcZ3%TkGD_p^W=QZge#w>CYBv;7P>kP&w$6F7q#(d z+OpaKC5#!~G8CD`hcH8(6VgqKS&_d*;0*?kbCeC Date: Mon, 15 Apr 2024 00:10:16 +0200 Subject: [PATCH 89/96] cslsp --- lua/custom/configs/lspconfig.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/custom/configs/lspconfig.lua b/lua/custom/configs/lspconfig.lua index 93d9858..7498a2a 100644 --- a/lua/custom/configs/lspconfig.lua +++ b/lua/custom/configs/lspconfig.lua @@ -15,6 +15,7 @@ local servers = { "cmake", "yamlls", "texlab", + "csharp_ls", } for _, lsp in ipairs(servers) do From e102335f6e1f006d9cb7a6eb8d3bf27452d57174 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sat, 20 Apr 2024 17:18:13 +0200 Subject: [PATCH 90/96] make ltex shut up --- lua/custom/configs/lspsettings.lua | 8 +++++++- lua/custom/init.lua | 4 +++- lua/custom/plugins.lua | 15 +++++++++++++-- spell/en.utf-8.add | 1 + spell/en.utf-8.add.spl | Bin 4352 -> 4361 bytes 5 files changed, 24 insertions(+), 4 deletions(-) diff --git a/lua/custom/configs/lspsettings.lua b/lua/custom/configs/lspsettings.lua index 0a26aee..6490918 100644 --- a/lua/custom/configs/lspsettings.lua +++ b/lua/custom/configs/lspsettings.lua @@ -32,8 +32,10 @@ M.rust_analyzer = { M.ltex = { on_attach = on_attach, capabilities = capabilities, + use_spellfile = false, settings = { ltex = { + checkFrequency = "save", -- shut up while i'm just editing, see -- specific language (such as en-GB or de-DE is recommended, but I -- want multilingual) language = "auto", @@ -52,7 +54,11 @@ M.ltex = { "html", "xhtml", }, - -- load token and additional languagetool items later + additionalRules = { + enablePickyRules = true, + motherTongue = "de", + }, + -- load token and additional languagetool items later }, }, } diff --git a/lua/custom/init.lua b/lua/custom/init.lua index 6731ad5..d0117d8 100644 --- a/lua/custom/init.lua +++ b/lua/custom/init.lua @@ -1,7 +1,7 @@ local opt = vim.opt local g = vim.g g.maplocalleader = ";" -g.python3_host_prog = '/usr/bin/python3' +g.python3_host_prog = "/usr/bin/python3" opt.mouse = "a" -- mouse does annoying things for me if it's not 'a' opt.signcolumn = "yes" @@ -169,12 +169,14 @@ vim.api.nvim_create_autocmd("VimResized", { }) -- Wrap and enable spell-checker in text filetypes +-- also enable wrap on these text filetypes vim.api.nvim_create_autocmd("FileType", { group = augroup "spell_conceal", pattern = { "gitcommit", "markdown", "tex", "latex", "norg" }, callback = function() vim.opt_local.spell = true vim.opt_local.conceallevel = 0 + vim.opt.wrap = true end, }) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index 1b66546..aade18d 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -364,6 +364,17 @@ local plugins = { -- produce a conflict signature = { enabled = false }, hover = { enabled = false }, + progress = { + enabled = true, + -- Lsp Progress is formatted using the builtins for lsp_progress. See config.format.builtin + -- See the section on formatting for more details on how to customize. + --- @type NoiceFormat|string + format = "lsp_progress", + --- @type NoiceFormat|string + format_done = "lsp_progress_done", + throttle = 1000 / 30, -- frequency to update lsp progress message + view = "mini", -- default: mini + }, }, -- you can enable a preset for easier configuration presets = { @@ -949,8 +960,8 @@ local plugins = { "NvChad/ui", -- load after nvchad ui }, config = function() - -- TODO: add lsp module for lualine - -- Maybe we can steal modules from the nvchad ui + -- TODO: add lsp module for lualine + -- Maybe we can steal modules from the nvchad ui require("lualine").setup() end, }, diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index c27c6fb..74464ec 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -336,3 +336,4 @@ Leininger Dockerfile yml CMD +UDPP diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl index 4c84b89be4768cc03b913a67ba3b4936708d65f7..36739aa116af20dd2223bc4413426d066046689a 100644 GIT binary patch delta 41 wcmZor>Qv$j^Ykq)NX^MH`p>|?mA;UVmzO0aEw7ldfRT}bQM6#Q5brx?0Q?{eJ^%m! delta 32 ncmeBFYEa?}^Ykq)NX^MH`p>|?m9&tLmxVbkuXwXG?>lAyq@@Yl From 7858161a4c321e519826330ea0bf1cdac7b8c9d1 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Mon, 22 Apr 2024 18:59:10 +0200 Subject: [PATCH 91/96] lang stuff --- lua/custom/configs/lspsettings.lua | 10 +++++++++- spell/en.utf-8.add | 5 +++++ spell/en.utf-8.add.spl | Bin 4361 -> 4419 bytes 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/lua/custom/configs/lspsettings.lua b/lua/custom/configs/lspsettings.lua index 6490918..f154822 100644 --- a/lua/custom/configs/lspsettings.lua +++ b/lua/custom/configs/lspsettings.lua @@ -56,7 +56,15 @@ M.ltex = { }, additionalRules = { enablePickyRules = true, - motherTongue = "de", + -- thats cool, but often adds diagnostics in + -- places where a german might confuse words that are similar + -- between english and german REGARDLESS of context. I seem to use the + -- english words only in the proper contexts, so leaving this on + -- just adds annoying hints like 'Hinweis: "list/NN.*" (English) bedeutet "Liste", + -- "Verzeichnis" (German). Meinten Sie vielleicht 'cunning', 'trick'?' + -- everytime I use the word "list". I liked that this makes the hints be + -- in german regardless of the language I'm working in through... + --motherTongue = "de", }, -- load token and additional languagetool items later }, diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index 74464ec..1227cd2 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -337,3 +337,8 @@ Dockerfile yml CMD UDPP +Unknowability +unknowability +talmann +Goldberger +ofc diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl index 36739aa116af20dd2223bc4413426d066046689a..a1662a5ca570c1c1b1bd526066361b60852e18c7 100644 GIT binary patch delta 780 zcmX|9O=uHA6rMM;o6XNAN~N^1QY5ihr2bH_7Lp=Zq_mp%fid z=?jdF`1nc5t3>P6F;w0VZ(W^EPupM+(UtL=_)DF+724ntR;CPut+~PuT67-mp1aT_ zITy?*Bj0Twh_@UC7~d_K6&Gp{aC#2Yi3x4efIp^G>fmbZ8m!=t*Z|DnUTi*|H+U16 zvV!y4rHLyg)v&yvB}k}yzabk^zFV+FEAKkO3zj)at@|wk)VvLglJE+*wR7+Y_q4O4 zJ(sEuDC;t<)bO3QVCDh0Mtdk2B+YgzI2V5iJ=~60U?0yUhM=?)p z4|?$6=S|1F$WDU8t9tP)?x0>giXEN=4_g&PpD#@yKkv`;KF{-h?+XtKnVHL1f5@Ygs-hS5n~&p{Zgw5w2-N_H(3+<@VGC&qkN@=s1wir0j7G5Cb`P`V zYNW8;s#*8QrjX&J`u9S7}N7jOS=V==wDyUts|$+LD;lFO(*$(8I%) z3ZR|a3sQl$ZBY|%w&SWiTxNjU@LLGP@(wM^f`{UZUZho_8)t?)9(aeCx{Nn;-fF9g z*{ikjPh%A(=8RS9h_6Qd@Gq`fev=ktCfkH&lU6`IGHzYWCCXs>H1U~c#ZvNQ|4q+2~a!7;bdZ+5i9m From 57bb771ca182d453f396976444d316dfa86d6a21 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Mon, 22 Apr 2024 18:59:21 +0200 Subject: [PATCH 92/96] nui stuff in the bottom corner yay --- lua/custom/plugins.lua | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lua/custom/plugins.lua b/lua/custom/plugins.lua index aade18d..70723a4 100644 --- a/lua/custom/plugins.lua +++ b/lua/custom/plugins.lua @@ -353,6 +353,9 @@ local plugins = { "rcarriga/nvim-notify", }, config = function() + require("notify").setup { + top_down = false, + } require("noice").setup { lsp = { override = { From 4b5eaa3a2a114bf6bc0cbd65fe2a234360cbedf6 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Wed, 24 Apr 2024 13:45:35 +0200 Subject: [PATCH 93/96] no set formatoptions to nothing in md --- lua/custom/init.lua | 1 + spell/en.utf-8.add | 3 +++ spell/en.utf-8.add.spl | Bin 4419 -> 4456 bytes 3 files changed, 4 insertions(+) diff --git a/lua/custom/init.lua b/lua/custom/init.lua index d0117d8..23848ff 100644 --- a/lua/custom/init.lua +++ b/lua/custom/init.lua @@ -177,6 +177,7 @@ vim.api.nvim_create_autocmd("FileType", { vim.opt_local.spell = true vim.opt_local.conceallevel = 0 vim.opt.wrap = true + -- vim.opt.formatoptions = "" end, }) diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index 1227cd2..f7e4148 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -342,3 +342,6 @@ unknowability talmann Goldberger ofc +shockwaves +deerhash +argon2 diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl index a1662a5ca570c1c1b1bd526066361b60852e18c7..196353d30e198f1c9b3a2e410966f2936682de99 100644 GIT binary patch literal 4456 zcmZ8k&u<)A5$<~36URA#$qlQI4Drz!$IdK@WW}*JGTv;K*dYw&a3#QFam1N+fVWf?eQXANdP7E&<76FK90-?E${8o*fLa($n3qUj6v$ ztE$)E+`Lhb;wSjFIo$epJ_;kiuj*6-oi!lTp_J-U{Nl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yc+DM7`>n%hX>jA_n|&us}7=y&zCSWj>XJ(+MwMkSG6+{M0Fi-a&kY6(M_SW_V|kyIq2 z9!knZ2oM7^Vytv<*Yk)LBJA@0oV0m@g=K3diV7x!qLb7bFi7o{h%k@H_pN%1g zo~ScVV#5OnONlEhueGF?bOEAQpS0l4tU4+APkSj;*Eiw$)OKnu^jsqFvlS|>kTfSKp4Q9qdo*Xn4ofKqxB!DebM=wTF*ZT;UR-GB#(O>a_Mn-1B;yyI5 zcHqx)t07SfXv_{L&Pnl3jdx0kC^LdZN9YnFp2Gh_AlJsBJY}Q2Vbax#yclq^m=9T4 zOs_A)WEQ%jrHJ{?oS5*C3oNd4%jvdwaXlUNV}MO<;2N!(s`)JvrxJb zHx^(D9WdcQb`6a#=Uw53I==|9w{aLFcb-1tnEEtVq^s&?u7sidOYXo6H#)GTlguS0V_-6U z2RN)BE{H@wF)fKc7GK)ZxfEgj8cpl&9h4D@leU8kX|Vv)k^sIE@Yq;YnW6D*=AUgG zIgma=$otar)Ul!BN$%rxP>HoBx=%EjZ*D>=@R)-fFmbwgiXf?uw$?;d(w6}6=hZhu zyU9^^hj!20(w@bRSw(tOhnj$}^mCezrpEqsquS6O}Y#<_68X>yS3;RcdFl|nA+(*1P hexkk`-o9@o9jhMQMgbX(HO@@)43yWte?0t=_!sB{?S}vW From d62f578caa7a383d3e260dc70ac53f436bbe0e6f Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Sun, 28 Apr 2024 15:13:48 +0200 Subject: [PATCH 94/96] disable ltex for html --- lua/custom/configs/lspsettings.lua | 4 ++-- spell/en.utf-8.add | 8 ++++++++ spell/en.utf-8.add.spl | Bin 4456 -> 4521 bytes 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/lua/custom/configs/lspsettings.lua b/lua/custom/configs/lspsettings.lua index f154822..f1450ff 100644 --- a/lua/custom/configs/lspsettings.lua +++ b/lua/custom/configs/lspsettings.lua @@ -51,8 +51,8 @@ M.ltex = { "quarto", "rmd", "context", - "html", - "xhtml", + -- "html", + -- "xhtml", }, additionalRules = { enablePickyRules = true, diff --git a/spell/en.utf-8.add b/spell/en.utf-8.add index f7e4148..f165737 100644 --- a/spell/en.utf-8.add +++ b/spell/en.utf-8.add @@ -345,3 +345,11 @@ ofc shockwaves deerhash argon2 +SCSS +Eligswalde's +Achmarel +aswell +AGI +FTL +Houten +Gabriella diff --git a/spell/en.utf-8.add.spl b/spell/en.utf-8.add.spl index 196353d30e198f1c9b3a2e410966f2936682de99..5a11cdf2139a6e521ca940c66d8f13603418b77b 100644 GIT binary patch literal 4521 zcmZ8kO^6(68Ls!M>inIC;7OWzoIWTsnfz>mgdxfFHi2Zb$z+o@XtcVjy1J(8r&E73 zJ+hD$4+i!mn8U8H2FdD~`WNVscc`>_RR&~>E&v&2xM|JcKH&8V^D#_Y6wck248?l#p1jNVfL zmIonHV7ye_6O-dTabn|eu~LzlMq4v>&$>_nsD%-02;3PtNvYoXqqxpaa@%P?0vC!B zq0InRi#dMCkERvZnifW;FnJd%2{1|*uOHE~ff|XMUJU#RjI{dcV6L$$5t%9Q=&*cP zk{*Kq5C9@~5B`5cf*J_K?t6b3=6_*JbQD^ z_O?0^N@R(@zl`W%M;jOf#yT~D-Smf6E8O$Ul$Et?SO6FDmoo^cg~JfSBL+tO5yvby zW<0~AbqOfTzAhzDWoaH^4ew3rC23K+;}k)2!E^vCqiZ35&BGaZJ9sF=G!MIzI? zxlByJERv<5lC9nF3dbqcwv+m+D?XQM$0yN7WI4@e*kVz5!N`iuBM9beGQevwc1T8BD*Kh zqCM0mh~RP8F!K=1(v)+Agel3eQJJ{kXbRQLJtmjdFxcKMRg9Fu?w1LCpV1u?lSMur z*dA#d14MS^5Fs0s{k^OMIu&@IRmjrZ#N?5?!s=oTk_7JOxtr9jCJ9e}VJ9Kg*~jtx zt+|DIlzMy`1>+pLYLuW^!b)JX@eP|B42Osmph1Z2^%8d^77X|*HlcRZd$!m{SYVym zs&Lw}8loHI6+_~_8=47wCr1!HkP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lasx`mHu43sbruI5j%y$suL~d$7ar_!Ju`b(O@vp+$Mqbm{9lz(U13J84-B4{W4}<=a zO7DOutV$xbhPpa+w(%=>eMh^7zpUSU-;moc&kbvkrnNQ2%^pBrg${mM^L=cvbsK6= zCjGVR$cLTu+xR^_>7CX8oAmf%-jy9}rlwHySs?Z|^m&t0fAv_ z6bWw{6xw~+0EMW5AJz^0Jw8AALzjn3dvs Date: Mon, 20 May 2024 17:54:51 +0200 Subject: [PATCH 95/96] alias plaintex to tex --- lua/custom/init.lua | 1 + 1 file changed, 1 insertion(+) diff --git a/lua/custom/init.lua b/lua/custom/init.lua index 23848ff..2e82000 100644 --- a/lua/custom/init.lua +++ b/lua/custom/init.lua @@ -193,3 +193,4 @@ end -- alias filetypes vim.filetype.add { extension = { tera = "html" } } +vim.filetype.add { extension = { plaintex = "tex" } } From 430d9ff9d6c338ee3a93add350f46d616273c430 Mon Sep 17 00:00:00 2001 From: PlexSheep Date: Tue, 28 May 2024 23:07:01 +0200 Subject: [PATCH 96/96] finally, peace --- lua/core/init.lua | 36 ------------------------------------ lua/plugins/init.lua | 27 --------------------------- 2 files changed, 63 deletions(-) diff --git a/lua/core/init.lua b/lua/core/init.lua index 19804e1..ce8db46 100644 --- a/lua/core/init.lua +++ b/lua/core/init.lua @@ -71,42 +71,6 @@ autocmd("FileType", { end, }) --- reload some chadrc options on-save -autocmd("BufWritePost", { - pattern = vim.tbl_map(function(path) - return vim.fs.normalize(vim.loop.fs_realpath(path)) - end, vim.fn.glob(vim.fn.stdpath "config" .. "/lua/custom/**/*.lua", true, true, true)), - group = vim.api.nvim_create_augroup("ReloadNvChad", {}), - - callback = function(opts) - local fp = vim.fn.fnamemodify(vim.fs.normalize(vim.api.nvim_buf_get_name(opts.buf)), ":r") --[[@as string]] - local app_name = vim.env.NVIM_APPNAME and vim.env.NVIM_APPNAME or "nvim" - local module = string.gsub(fp, "^.*/" .. app_name .. "/lua/", ""):gsub("/", ".") - - require("plenary.reload").reload_module "base46" - require("plenary.reload").reload_module(module) - require("plenary.reload").reload_module "custom.chadrc" - - config = require("core.utils").load_config() - - vim.g.nvchad_theme = config.ui.theme - vim.g.transparency = config.ui.transparency - - -- statusline - require("plenary.reload").reload_module("nvchad.statusline." .. config.ui.statusline.theme) - vim.opt.statusline = "%!v:lua.require('nvchad.statusline." .. config.ui.statusline.theme .. "').run()" - - -- tabufline - if config.ui.tabufline.enabled then - require("plenary.reload").reload_module "nvchad.tabufline.modules" - vim.opt.tabline = "%!v:lua.require('nvchad.tabufline.modules').run()" - end - - require("base46").load_all_highlights() - -- vim.cmd("redraw!") - end, -}) - -------------------------------------- commands ------------------------------------------ local new_cmd = vim.api.nvim_create_user_command diff --git a/lua/plugins/init.lua b/lua/plugins/init.lua index 27d9e7f..8f458ec 100644 --- a/lua/plugins/init.lua +++ b/lua/plugins/init.lua @@ -1,34 +1,8 @@ -- All plugins have lazy=true by default,to load a plugin on startup just lazy=false -- List of all default plugins & their definitions local default_plugins = { - "nvim-lua/plenary.nvim", - { - "NvChad/base46", - branch = "v2.0", - build = function() - require("base46").load_all_highlights() - end, - }, - - { - "NvChad/ui", - branch = "v2.0", - lazy = false, - }, - - { - "NvChad/nvterm", - init = function() - require("core.utils").load_mappings "nvterm" - end, - config = function(_, opts) - require "base46.term" - require("nvterm").setup(opts) - end, - }, - { "NvChad/nvim-colorizer.lua", init = function() @@ -73,7 +47,6 @@ local default_plugins = { { "nvim-treesitter/nvim-treesitter", - tag = "v0.9.2", init = function() require("core.utils").lazy_load "nvim-treesitter" end,