X-Git-Url: https://git.rmz.io/dotfiles.git/blobdiff_plain/4eda6b5272f7fe9b5fabb8e5c13ef4567004b865..8989ff1e17ac528e13a64614b669be3fb03b2435:/nvim/lua/plugins/editor.lua diff --git a/nvim/lua/plugins/editor.lua b/nvim/lua/plugins/editor.lua index 5dcdccf..249ac6d 100644 --- a/nvim/lua/plugins/editor.lua +++ b/nvim/lua/plugins/editor.lua @@ -73,7 +73,7 @@ return { -- Finds and lists all of the TODO, HACK, BUG, etc comment -- in your project and loads them into a browsable list. cmd = { "TodoTrouble"}, - event = "LazyFile", + event = { "BufReadPost", "BufNewFile", "BufWritePre" }, -- stylua: ignore keys = { { "]t", function() require("todo-comments").jump_next() end, desc = "Next Todo Comment" }, @@ -83,6 +83,20 @@ return { }, opts = {} }, + { "nvim-mini/mini.hipatterns", -- highlight hex colours and other matched words + event = { "BufReadPost", "BufNewFile", "BufWritePre" }, + opts = function() + local hi = require("mini.hipatterns") + return { + highlighters = { + hex_color = hi.gen_highlighter.hex_color({ priority = 2000 }), + }, + } + end, + }, + { "nvim-mini/mini.operators", -- text edit operators + opts = {}, + }, { "folke/flash.nvim", -- Flash enhances the built-in search functionality by showing labels -- at the end of each match, letting you quickly jump to a specific @@ -104,7 +118,7 @@ return { -- git signs highlights text that has changed since the list -- git commit, and also lets you interactively stage & unstage -- hunks in a commit. - event = "LazyFile", + event = { "BufReadPost", "BufNewFile", "BufWritePre" }, opts = { signs = { add = { text = "▎" }, @@ -168,6 +182,23 @@ return { end, }, }, + { "chrisgrieser/nvim-origami", -- fold with elegance + event = "VeryLazy", + opts = { + foldKeymaps = { setup = false }, + foldtext = { + padding = 1, + lineCount = { + template = "… %d lines" + } + } + }, + init = function() + -- disable vim's folding + vim.opt.foldlevel = 99 + vim.opt.foldlevelstart = 99 + end + }, -- TODO: currently unused plugins, check and enable/remove { "MagicDuck/grug-far.nvim", enabled = false,