From: Samir Benmendil Date: Tue, 25 Feb 2025 23:48:42 +0000 (+0000) Subject: nvim: add mini.hipatterns to highlight hex colours and any strings X-Git-Url: https://git.rmz.io/dotfiles.git/commitdiff_plain/e77cfb2b74d5463209fe912e34ac1557ec6bf9b3 nvim: add mini.hipatterns to highlight hex colours and any strings --- diff --git a/nvim/lua/plugins/editor.lua b/nvim/lua/plugins/editor.lua index cb18528..1e94ab0 100644 --- a/nvim/lua/plugins/editor.lua +++ b/nvim/lua/plugins/editor.lua @@ -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