]> git.rmz.io Git - dotfiles.git/blobdiff - nvim/lua/plugins/editor.lua
nvim: add mini.hipatterns to highlight hex colours and any strings
[dotfiles.git] / nvim / lua / plugins / editor.lua
index cb18528f7f5e97106c4f9ce2a74486eb4dc79b3c..1e94ab0bc0a7b6e0362f71a349e54fc82e045d7c 100644 (file)
@@ -83,6 +83,17 @@ return {
     },
     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