diff --git a/config/nvim/init.lua b/config/nvim/init.lua index 8ae75a4..0f0846b 100644 --- a/config/nvim/init.lua +++ b/config/nvim/init.lua @@ -9,12 +9,12 @@ vim.g.maplocalleader = " " -- Set 'Space' as key to leadermap key key("n", "", "", remap) --- Filetype specialties. -require("filetype") - -- Global, windows options of neovim: require("options") +-- Filetype specialties. +require("filetype") + -- To adminstrate packages: require("plugin-manager") diff --git a/config/nvim/lua/autocmd.lua b/config/nvim/lua/autocmd.lua index 8a1f3e3..88ea589 100644 --- a/config/nvim/lua/autocmd.lua +++ b/config/nvim/lua/autocmd.lua @@ -29,3 +29,118 @@ local autoCommands = { } M.nvim_create_augroups(autoCommands) + +vim.api.nvim_create_autocmd("FileType", { + pattern = { + "help", + "alpha", + "dashboard", + "neo-tree", + "Trouble", + "lazy", + "mason", + "notify", + "toggleterm", + "lazyterm", + }, + callback = function(event) + vim.b[event.buf].miniindentscope_disable = true + end, +}) + + +-- ╭──────────────────────────────────────────────────────────╮ +-- │ taken from LazyVim repository │ +-- ╭─────────────────────────────────────────────────────────────────────────────╮ +-- │ https://github.com/LazyVim/LazyVim/blob/main/lua/lazyvim/config/autocmds.lua│ +-- ╰─────────────────────────────────────────────────────────────────────────────╯ + +local function augroup(name) + return vim.api.nvim_create_augroup("ivuorinen_" .. name, { clear = true }) +end +-- Check if we need to reload the file when it changed +vim.api.nvim_create_autocmd({ "FocusGained", "TermClose", "TermLeave" }, { + group = augroup("checktime"), + command = "checktime", +}) + +-- Highlight on yank +vim.api.nvim_create_autocmd("TextYankPost", { + group = augroup("highlight_yank"), + callback = function() + vim.highlight.on_yank() + end, +}) + +-- resize splits if window got resized +vim.api.nvim_create_autocmd({ "VimResized" }, { + group = augroup("resize_splits"), + callback = function() + local current_tab = vim.fn.tabpagenr() + vim.cmd("tabdo wincmd =") + vim.cmd("tabnext " .. current_tab) + end, +}) + +-- go to last loc when opening a buffer +vim.api.nvim_create_autocmd("BufReadPost", { + group = augroup("last_loc"), + callback = function() + local exclude = { "gitcommit" } + local buf = vim.api.nvim_get_current_buf() + if vim.tbl_contains(exclude, vim.bo[buf].filetype) then + return + end + local mark = vim.api.nvim_buf_get_mark(buf, '"') + local lcount = vim.api.nvim_buf_line_count(buf) + if mark[1] > 0 and mark[1] <= lcount then + pcall(vim.api.nvim_win_set_cursor, 0, mark) + end + end, +}) + +-- close some filetypes with +vim.api.nvim_create_autocmd("FileType", { + group = augroup("close_with_q"), + pattern = { + "PlenaryTestPopup", + "help", + "lspinfo", + "man", + "notify", + "qf", + "spectre_panel", + "startuptime", + "tsplayground", + "neotest-output", + "checkhealth", + "neotest-summary", + "neotest-output-panel", + }, + callback = function(event) + vim.bo[event.buf].buflisted = false + vim.keymap.set("n", "q", "close", { buffer = event.buf, silent = true }) + end, +}) + +-- wrap and check for spell in text filetypes +vim.api.nvim_create_autocmd("FileType", { + group = augroup("wrap_spell"), + pattern = { "gitcommit", "markdown" }, + callback = function() + vim.opt_local.wrap = true + vim.opt_local.spell = true + end, +}) + +-- Auto create dir when saving a file, in case some intermediate directory does not exist +vim.api.nvim_create_autocmd({ "BufWritePre" }, { + group = augroup("auto_create_dir"), + callback = function(event) + if event.match:match("^%w%w+://") then + return + end + local file = vim.loop.fs_realpath(event.match) or event.match + vim.fn.mkdir(vim.fn.fnamemodify(file, ":p:h"), "p") + end, +}) diff --git a/config/nvim/lua/keymappings.lua b/config/nvim/lua/keymappings.lua index c5fadb4..1fc27aa 100644 --- a/config/nvim/lua/keymappings.lua +++ b/config/nvim/lua/keymappings.lua @@ -13,20 +13,19 @@ local wk = require("which-key") -- │ Register keybindings │ -- ╰──────────────────────────────────────────────────────────╯ --- Register in all modes, prefix +-- ╭──────────────────────────────────────────────────────────╮ +-- │ Register in all modes, prefix │ +-- ╰──────────────────────────────────────────────────────────╯ wk.register({ b = { - name = "[b]uffer", - n = { - "tabnew", - "[n]ew tab", - }, + name = "+buffer", + n = { "tabnew", "[n]ew tab" }, a = { - name = "[a]nnotate" + name = "+annotate" -- defined in plugins/neogen.lua }, c = { - name = "[c]omments", + name = "+comments", b = { "lua require('comment-box').lbox()", "Left aligned fixed size box with left aligned text", @@ -41,53 +40,42 @@ wk.register({ }, }, d = { - name = "[d]elete buffers", + name = "+delete buffers", h = { "lua require('close_buffers').delete({type = 'hidden'})", "Delete hidden buffers", }, }, - g = { - name = "[g]oto buffer", - ["1"] = { "buffer! 1", "Buffer 1" }, - ["2"] = { "buffer! 2", "Buffer 2" }, - ["3"] = { "buffer! 3", "Buffer 3" }, - ["4"] = { "buffer! 4", "Buffer 4" }, - ["5"] = { "buffer! 5", "Buffer 5" }, - ["6"] = { "buffer! 6", "Buffer 6" }, - ["7"] = { "buffer! 7", "Buffer 7" }, - ["8"] = { "buffer! 8", "Buffer 8" }, - ["9"] = { "buffer! 9", "Buffer 9" }, - }, + t = { ":TabnineToggle", "Toggle TabNine" }, }, D = { - name = "[D]iagnostics (Trouble)", + name = "+Diagnostics (Trouble)", t = { ":TroubleToggle", "[D]iagnostics [t]oggle" }, -- Quick navigation between diagonostics. f = { ":lua vim.diagnostic.open_float()", "[D]iagnostics: Open [f]loat" }, n = { ":lua vim.diagnostic.goto_next()", "[D]iagnostics: [n]ext" }, p = { ":lua vim.diagnostic.goto_prev()", "[D]iagnostics: [p]rev" }, + --- + x = { function() require("trouble").open() end, "Open Trouble" }, + w = { function() require("trouble").open("workspace_diagnostics") end, "Workspace diagnostics" }, + d = { function() require("trouble").open("document_diagnostics") end, "Document diagnostics" }, + q = { function() require("trouble").open("quickfix") end, "Quickfix" }, + l = { function() require("trouble").open("loclist") end, "Loclist" }, + r = { function() require("trouble").open("lsp_references") end, "LSP References" }, }, e = { function() vim.cmd("Neotree focus source=filesystem position=left") end, - "Toggle the sidebar tree of the root folder.", + "Toggle the sidebar tree", }, f = { - name = "[f]ind", + name = "+find", -- Find recursively files across the root folder subfiles. f = { ':lua require("telescope.builtin").find_files()', "[f]ind [f]iles" }, -- Find recursively a text across the root folder subfiles. g = { ':lua require("telescope.builtin").live_grep()', "[f]ind text with [g]rep" }, }, - G = { - -- defined in plugins/gitsigns.lua - name = "Git", - b = { - name = "blame", - }, - }, h = { - name = "[h]arpoon", + name = "+harpoon", a = { "lua require('harpoon.mark').add_file()", "[h]arpoon: [A]dd file" }, r = { "lua require('harpoon.mark').rm_file()", "[h]arpoon: [r]emove file" }, m = { "lua require('harpoon.ui').toggle_quick_menu()", "[h]arpoon: harpoon [m]enu" }, @@ -99,44 +87,54 @@ wk.register({ }, --- Remap debugging to "H" from LV default of "h" H = { - name = "[H]elp/Conceal/Treesitter", + name = "+help/Conceal/Treesitter", c = { - name = "[c]onceal", + name = "+conceal", h = { ":set conceallevel=1", "hide/conceal" }, s = { ":set conceallevel=0", "show/unconceal" }, }, t = { - name = "Treesitter", + name = "+treesitter", t = { vim.treesitter.inspect_tree, "show tree" }, c = { ":=vim.treesitter.get_captures_at_cursor()", "show capture" }, n = { ":=vim.treesitter.get_node():type()", "show node" }, }, }, + o = { + g = { + -- defined in plugins/gitsigns.lua + name = "+git", + b = { + name = "+blame", + }, + }, + }, p = { - name = "[p]lugins", - i = { function() require("lazy").install() end, "[p]lugins [i]nstall" }, - s = { function() require("lazy").home() end, "[p]lugins [s]tatus" }, - S = { function() require("lazy").sync() end, "[p]lugins [S]ync" }, - u = { function() require("lazy").check() end, "[p]lugins Check [u]pdates" }, - U = { function() require("lazy").update() end, "[p]lugins [U]pdate" }, + name = "+plugins", + i = { function() require("lazy").install() end, "plugins [i]nstall" }, + s = { function() require("lazy").home() end, "plugins [s]tatus" }, + S = { function() require("lazy").sync() end, "plugins [S]ync" }, + u = { function() require("lazy").check() end, "plugins Check [u]pdates" }, + U = { function() require("lazy").update() end, "plugins [U]pdate" }, }, q = { - name = "[q]uit", - q = { ":qa", "[q]uit: [q]uit all" }, - f = { ":qa!", "[q]uit: all with [f]orce" }, + name = "+quit", + q = { ":qa", "quit: [q]uit all" }, + f = { ":qa!", "quit: all with [f]orce" }, }, r = { -- defined in plugins/refactoring-nvim.lua - name = "[r]efactor", + name = "+refactor", }, t = { - name = "[t]elescope", + name = "+telescope", -- Find recursively TODOs, NOTEs, FIXITs, ... across the root folder subfiles. t = { ":TodoTelescope", "[t]elescope: [t]odo" }, }, - x = { ":Bdelete", "[x]: Close current buffer" }, + x = { ":Bdelete", "Close current buffer" }, }, { prefix = "" }) +-- -- ╭──────────────────────────────────────────────────────────╮ -- │ Normal mode, prefix │ -- ╰──────────────────────────────────────────────────────────╯ @@ -144,6 +142,7 @@ wk.register({ b = { name = "Buffer" }, }, { mode = "n", prefix = "" }) +-- -- ╭──────────────────────────────────────────────────────────╮ -- │ Insert mode, prefix │ -- ╰──────────────────────────────────────────────────────────╯ @@ -151,6 +150,7 @@ wk.register({ b = { name = "Buffer" }, }, { mode = "i", prefix = "" }) +-- -- ╭──────────────────────────────────────────────────────────╮ -- │ Insert mode, no prefix │ -- ╰──────────────────────────────────────────────────────────╯ @@ -159,6 +159,7 @@ wk.register({ [""] = { "", "Do just Home on CTRL + Home" }, }, { mode = "i", prefix = "" }) +-- -- ╭──────────────────────────────────────────────────────────╮ -- │ All modes, no prefix │ -- ╰──────────────────────────────────────────────────────────╯ @@ -167,6 +168,11 @@ wk.register({ [""] = { "", "Do just End on CTRL + End" }, }, { prefix = "" }) +-- +-- ╭──────────────────────────────────────────────────────────╮ +-- │ Other keymappings, still to move │ +-- ╰──────────────────────────────────────────────────────────╯ + local key = vim.api.nvim_set_keymap local remap = { noremap = true, silent = true } @@ -182,19 +188,6 @@ key("i", "", [[v:count ? 'k' : 'gk']], { expr = true, noremap = true, s key("n", "", [[v:count ? 'j' : 'gj']], { expr = true, noremap = true, silent = true }) key("n", "", [[v:count ? 'k' : 'gk']], { expr = true, noremap = true, silent = true }) --- Set 'CTRL + v' as 'paster' -key("v", "", "p", remap) - --- Set 'CTRL + x' as 'cut' -key("v", "", "mad`ai", { silent = true }) - --- Set 'CTRL + c' as 'copier' -key("v", "", "may`ai", remap) -key("i", "", ":Registers", remap) - --- Create mark. -key("n", "'", "`", remap) - -- Move normaly bottom and up with C+Up and C+Down. key("i", "", "gk", remap) key("i", "", "gj", remap) @@ -221,14 +214,6 @@ key("i", "", "v", remap) key("i", "", "v", remap) key("i", "", "v", remap) --- Set 'SHIFT + special-keys' as 'select' like a modern text editor. -key("i", "", "v", remap) -key("i", "", "v", remap) -key("n", "", "v", remap) -key("n", "", "v", remap) -key("n", "", "", remap) -key("n", "", ":call Visual_Scroll_Down()i", remap) - -- Indent the current visual selection. key("v", "<", "", ">gv", remap) diff --git a/config/nvim/lua/lsp.lua b/config/nvim/lua/lsp.lua index 62ff37e..c382347 100644 --- a/config/nvim/lua/lsp.lua +++ b/config/nvim/lua/lsp.lua @@ -4,8 +4,6 @@ local vim = vim CAPABILITIES = vim.lsp.protocol.make_client_capabilities() CAPABILITIES.textDocument.completion.completionItem.snippetSupport = true ---CAPABILITIES.offsetEncoding = 'utf-8' - -- [[ Configure LSP ]] -- This function gets run when an LSP connects to a particular buffer. local on_attach = function(_, bufnr) diff --git a/config/nvim/lua/lsp_signature.lua b/config/nvim/lua/lsp_signature.lua index 0316662..fe7b003 100644 --- a/config/nvim/lua/lsp_signature.lua +++ b/config/nvim/lua/lsp_signature.lua @@ -15,7 +15,7 @@ return { floating_window = true, -- show hint in a floating window, set to false for virtual text only mode - floating_window_above_cur_line = false, -- try to place the floating above the current line when possible Note: + floating_window_above_cur_line = true, -- try to place the floating above the current line when possible Note: -- will set to true when fully tested, set to false will use whichever side has more space -- this setting will be helpful if you do not want the PUM and floating win overlap close_timeout = 4000, -- close floating window after ms when laster parameter is entered diff --git a/config/nvim/lua/options.lua b/config/nvim/lua/options.lua index 1cf31a8..49752dd 100644 --- a/config/nvim/lua/options.lua +++ b/config/nvim/lua/options.lua @@ -1,57 +1,29 @@ -- luacheck: globals vim --- Fix moving through lines 'gk' and 'gj' -vim.wo.linebreak = true - --- Enable break indent -vim.o.breakindent = true - -- Use the new FileType system of Neovim. -- let g:do_filetype_lua = 1 --- Save undo history -vim.o.undofile = true - --- Show lines number (hybrid) -vim.wo.number = true -vim.wo.relativenumber = true - --- Keep signcolumn on by default -vim.wo.signcolumn = "yes" +vim.wo.linebreak = true -- Fix moving through lines 'gk' and 'gj' +vim.o.breakindent = true -- Enable break indent +vim.o.undofile = true -- Save undo history +vim.wo.number = true -- Show lines number (hybrid) +vim.wo.relativenumber = true -- Show lines number (hybrid) +vim.wo.signcolumn = "yes" -- Keep signcolumn on by default -- Case-insensitive searching UNLESS \C or capital in search vim.o.ignorecase = true vim.o.smartcase = true --- To have a extra line :) -vim.o.cmdheight = 0 - --- Set wrap for words -vim.wo.wrap = true - --- Always show tabs -vim.o.showtabline = 2 - --- Show xtra spaces -vim.opt.list = true - --- Set wildmenu for later use -vim.o.wildmenu = true - --- Highlighting search -vim.o.hlsearch = true - --- Set ruler for better look -vim.o.ruler = true - --- No nice message -vim.o.hidden = true - --- Partial commands only in the screen -vim.o.showcmd = true - --- Match braces when inserting new ones :) -vim.o.showmatch = true +vim.o.cmdheight = 0 -- To have a extra line :) +vim.wo.wrap = true -- Set wrap for words +vim.o.showtabline = 2 -- Always show tabs +vim.opt.list = true -- Show xtra spaces +vim.o.wildmenu = true -- Set wildmenu for later use +vim.o.hlsearch = true -- Highlighting search +vim.o.ruler = true -- Set ruler for better look +vim.o.hidden = true -- No nice message +vim.o.showcmd = true -- Partial commands only in the screen +vim.o.showmatch = true -- Match braces when inserting new ones -- Cursor line ---- Cursor column @@ -60,39 +32,19 @@ vim.wo.cursorline = true vim.o.cursorcolumn = true vim.wo.cursorcolumn = true --- Off scroll when moving through the buffer -vim.o.scrolloff = 40 +vim.o.scrolloff = 40 -- Off scroll when moving through the buffer +vim.go.termguicolors = true -- For terminal RGB colours +vim.go.t_Co = "256" -- Colours, I believe +vim.go.t_ut = "" -- Colours, I believe +vim.o.laststatus = 3 -- Space for tabs +vim.o.softtabstop = 2 -- Space for tabs +vim.o.expandtab = true -- Expand tab to use spaces instead +vim.o.tabstop = 2 -- Space for tabs +vim.bo.shiftwidth = 2 -- Space for tabs +vim.o.shiftwidth = 2 -- Space for tabs --- For terminal RGB colours -vim.go.termguicolors = true - --- Colours, I believe -vim.go.t_Co = "256" -vim.go.t_ut = "" - --- Space for tabs -vim.o.laststatus = 3 - --- Space for tabs -vim.o.softtabstop = 2 - --- Expand tab to use spaces instead -vim.o.expandtab = true - --- Space for tabs -vim.o.tabstop = 2 - --- Space for tabs -vim.bo.shiftwidth = 2 - --- Space for tabs -vim.o.shiftwidth = 2 - --- Format options to not create new lines with comments -vim.o.formatoptions = "tqj" - --- Mouse working with neovim -vim.o.mouse = "a" +vim.o.formatoptions = "tqj" -- Format options to not create new lines with comments +vim.o.mouse = "a" -- Mouse working with neovim -- viminfo file -- vim.o.viminfo = vim.o.viminfo .. '~/.config/nvim/viminfo' @@ -101,17 +53,13 @@ vim.o.mouse = "a" vim.o.spelllang = "en_gb" vim.bo.spelllang = "en_gb" --- Global statusline. -vim.opt.laststatus = 2 +vim.opt.laststatus = 2 -- Global statusline. -- When "on" the commands listed below move the cursor to the first non-blank -- of the line. When off the cursor is kept in the same column (if possible). -- https://neovim.io/doc/user/options.html#'startofline' vim.opt.startofline = true --- Columns line "limit" --- vim.o.cc = '85' - -- Set path for better searching across the system -- vim.o.path = vim.o.path .. '**' @@ -119,8 +67,7 @@ vim.opt.startofline = true vim.o.completeopt = "menuone,longest,noselect" vim.o.shortmess = vim.o.shortmess .. "c" --- Menu Transparency. -vim.go.pumblend = 10 +vim.go.pumblend = 10 -- Menu Transparency. -- ╭──────────────────────────────────────────────────────────╮ -- │ Variables │ diff --git a/config/nvim/lua/plugin-manager.lua b/config/nvim/lua/plugin-manager.lua index e275620..0922148 100644 --- a/config/nvim/lua/plugin-manager.lua +++ b/config/nvim/lua/plugin-manager.lua @@ -27,14 +27,11 @@ local options = { }, rtp = { disabled_plugins = { - "gzip", "matchit", "matchparen", "netrwPlugin", - "tarPlugin", "tohtml", "tutor", - "zipPlugin", }, }, }, diff --git a/config/nvim/lua/plugins/gitsigns.lua b/config/nvim/lua/plugins/gitsigns.lua index b5b8d0a..41596de 100644 --- a/config/nvim/lua/plugins/gitsigns.lua +++ b/config/nvim/lua/plugins/gitsigns.lua @@ -13,8 +13,8 @@ return { changedelete = { hl = "GitSignsChange", text = "~", numhl = "GitSignsChangeNr", linehl = "GitSignsChangeLn" }, }, signcolumn = true, -- Toggle with `:Gitsigns toggle_signs` - numhl = false, -- Toggle with `:Gitsigns toggle_numhl` - linehl = false, -- Toggle with `:Gitsigns toggle_linehl` + numhl = false, -- Toggle with `:Gitsigns toggle_numhl` + linehl = false, -- Toggle with `:Gitsigns toggle_linehl` word_diff = false, -- Toggle with `:Gitsigns toggle_word_diff` on_attach = function(bufnr) local gs = package.loaded.gitsigns @@ -39,19 +39,19 @@ return { end, { expr = true }) -- Actions - map("n", "Ghs", gs.stage_hunk, { desc = "Stage Hunk" }) - map("n", "Ghr", gs.reset_hunk, { desc = "Reset Hunk" }) - map("v", "Ghs", function() gs.stage_hunk({ vim.fn.line("."), vim.fn.line("v") }) end) - map("v", "Ghr", function() gs.reset_hunk({ vim.fn.line("."), vim.fn.line("v") }) end) - map("n", "GhS", gs.stage_buffer, { desc = "Stage Buffer" }) - map("n", "Ghu", gs.undo_stage_hunk, { desc = "Undo Stage Hunk" }) - map("n", "GhR", gs.reset_buffer, { desc = "Reset Buffer" }) - map("n", "Ghp", gs.preview_hunk, { desc = "Preview Hunk" }) - map("n", "Gbl", function() gs.blame_line({ full = true }) end, { desc = "Blame Line" }) - map("n", "Gbt", gs.toggle_current_line_blame, { desc = "Toggle Current Line Blame" }) - map("n", "Ghd", gs.diffthis, { desc = "Diff This" }) - map("n", "GhD", function() gs.diffthis("~") end) - map("n", "Gtd", gs.toggle_deleted, { desc = "Toggle Deleted" }) + map("n", "oghs", gs.stage_hunk, { desc = "Stage Hunk" }) + map("n", "oghr", gs.reset_hunk, { desc = "Reset Hunk" }) + map("v", "oghs", function() gs.stage_hunk({ vim.fn.line("."), vim.fn.line("v") }) end) + map("v", "oghr", function() gs.reset_hunk({ vim.fn.line("."), vim.fn.line("v") }) end) + map("n", "oghS", gs.stage_buffer, { desc = "Stage Buffer" }) + map("n", "oghu", gs.undo_stage_hunk, { desc = "Undo Stage Hunk" }) + map("n", "oghR", gs.reset_buffer, { desc = "Reset Buffer" }) + map("n", "oghp", gs.preview_hunk, { desc = "Preview Hunk" }) + map("n", "ogbl", function() gs.blame_line({ full = true }) end, { desc = "Blame Line" }) + map("n", "ogbt", gs.toggle_current_line_blame, { desc = "Toggle Current Line Blame" }) + map("n", "oghd", gs.diffthis, { desc = "Diff This" }) + map("n", "oghD", function() gs.diffthis("~") end) + map("n", "ogtd", gs.toggle_deleted, { desc = "Toggle Deleted" }) -- Text object map({ "o", "x" }, "ih", ":Gitsigns select_hunk") diff --git a/config/nvim/lua/plugins/lazy.lua b/config/nvim/lua/plugins/lazy.lua index d2ac186..43b7f0a 100644 --- a/config/nvim/lua/plugins/lazy.lua +++ b/config/nvim/lua/plugins/lazy.lua @@ -162,7 +162,19 @@ return { "m4xshen/smartcolumn.nvim", opts = { colorcolumn = { "80", "100", "120" }, - disabled_filetypes = { "help", "text", "markdown", "json", "lazy", "starter", "neo-tree" }, + disabled_filetypes = { + "dashboard", + "help", + "json", + "lazy", + "lazyterm", + "mason", + "neo-tree", + "notify", + "starter", + "toggleterm", + "Trouble", + }, }, }, @@ -216,7 +228,10 @@ return { build = vim.loop.os_uname().sysname == "Windows_NT" and "pwsh.exe -file .\\dl_binaries.ps1" or "./dl_binaries.sh", cmd = { "TabnineStatus", "TabnineDisable", "TabnineEnable", "TabnineToggle" }, event = "User", - opts = { accept_keymap = "" }, + opts = { + accept_keymap = "", + dismiss_keymap = "", + }, }, -- Vim plugin for automatic time tracking and metrics generated from your programming activity. diff --git a/config/nvim/lua/plugins/mini.lua b/config/nvim/lua/plugins/mini.lua index 7091ec0..8160a69 100644 --- a/config/nvim/lua/plugins/mini.lua +++ b/config/nvim/lua/plugins/mini.lua @@ -62,11 +62,11 @@ return { -- Autocompletion and signature help plugin -- https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-completion.md - require("mini.completion").setup() + -- require("mini.completion").setup() -- Automatic highlighting of word under cursor -- https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-cursorword.md - require("mini.cursorword").setup() + -- require("mini.cursorword").setup() -- Highlight patterns in text -- https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-hipatterns.md @@ -86,7 +86,12 @@ return { -- Visualize and work with indent scope -- https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-indentscope.md - require("mini.indentscope").setup() + require("mini.indentscope").setup({ + draw = { + delay = 0, + -- animation = require("mini.indentscope").gen_animation("none"), + }, + }) -- Jump to next/previous single character -- https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-jump.md diff --git a/config/nvim/lua/plugins/trouble.lua b/config/nvim/lua/plugins/trouble.lua index 7296c88..a028b6b 100644 --- a/config/nvim/lua/plugins/trouble.lua +++ b/config/nvim/lua/plugins/trouble.lua @@ -9,7 +9,7 @@ return { -- position of the list can be: bottom, top, left, right position = "bottom", -- height of the trouble list when position is top or bottom - height = 10, + height = 6, -- width of the list when position is left or right width = 50, -- use devicons for filenames @@ -68,7 +68,7 @@ return { -- add an indent guide below the fold icons indent_lines = true, -- automatically open the list when you have diagnostics - auto_open = true, + auto_open = false, -- automatically close the list when you have no diagnostics auto_close = true, -- automatically preview the location of the diagnostic.