]> git.rmz.io Git - dotfiles.git/blobdiff - nvim/lua/plugins/editor.lua
vim: do not set pastetoggle in nvim
[dotfiles.git] / nvim / lua / plugins / editor.lua
index deab249f45c3716114f7788d7e66a9679bd7f535..7c35330f3e5ec7f51f15424bfad7eaf842f05fbd 100644 (file)
@@ -72,19 +72,28 @@ return {
   { "folke/todo-comments.nvim",
     -- Finds and lists all of the TODO, HACK, BUG, etc comment
     -- in your project and loads them into a browsable list.
-    cmd = { "TodoTrouble", "TodoTelescope" },
-    event = "LazyFile",
+    cmd = { "TodoTrouble"},
+    event = { "BufReadPost", "BufNewFile", "BufWritePre" },
     -- stylua: ignore
     keys = {
       { "]t", function() require("todo-comments").jump_next() end, desc = "Next Todo Comment" },
       { "[t", function() require("todo-comments").jump_prev() end, desc = "Previous Todo Comment" },
       { "<leader>xt", "<cmd>Trouble todo toggle<cr>", desc = "Todo (Trouble)" },
       { "<leader>xT", "<cmd>Trouble todo toggle filter = {tag = {TODO,FIX,FIXME}}<cr>", desc = "Todo/Fix/Fixme (Trouble)" },
-      { "<leader>st", "<cmd>TodoTelescope<cr>", desc = "Todo" },
-      { "<leader>sT", "<cmd>TodoTelescope keywords=TODO,FIX,FIXME<cr>", desc = "Todo/Fix/Fixme" },
     },
     opts = {}
   },
+  { "echasnovski/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,
+  },
   { "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
@@ -106,7 +115,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 = "▎" },