diff options
| author | coast <coasteen@proton.me> | 2026-10-15 07:23:19 +0330 |
|---|---|---|
| committer | coast <coasteen@proton.me> | 2026-10-15 07:23:19 +0330 |
| commit | 0daf9e57d1cfca6462db25f27eb70b530d417baf (patch) | |
| tree | a4a9d95470200e24ef859aabb09304e981098509 /home-configuration/config/nvim/lua/plugins/lazyExtras/init.lua | |
| parent | 4c20a256c370a65ecd34100a540ad9760e67f51d (diff) | |
| download | nix-master.tar.gz nix-master.tar.bz2 nix-master.tar.xz nix-master.tar.zst | |
Diffstat (limited to 'home-configuration/config/nvim/lua/plugins/lazyExtras/init.lua')
| -rw-r--r-- | home-configuration/config/nvim/lua/plugins/lazyExtras/init.lua | 44 |
1 files changed, 44 insertions, 0 deletions
diff --git a/home-configuration/config/nvim/lua/plugins/lazyExtras/init.lua b/home-configuration/config/nvim/lua/plugins/lazyExtras/init.lua new file mode 100644 index 0000000..3b98c5d --- /dev/null +++ b/home-configuration/config/nvim/lua/plugins/lazyExtras/init.lua @@ -0,0 +1,44 @@ +opts = function() + local hi = require("mini.hipatterns") + return { + -- custom LazyVim option to enable the tailwind integration + tailwind = { + enabled = true, + ft = { + "astro", + "css", + "heex", + "html", + "html-eex", + "javascript", + "javascriptreact", + "rust", + "svelte", + "typescript", + "typescriptreact", + "vue", + }, + -- full: the whole css class will be highlighted + -- compact: only the color will be highlighted + style = "full", + }, + highlighters = { + hex_color = hi.gen_highlighter.hex_color({ priority = 2000 }), + shorthand = { + pattern = "()#%x%x%x()%f[^%x%w]", + group = function(_, _, data) + ---@type string + local match = data.full_match + if match == "#add" then + return + end + local r, g, b = match:sub(2, 2), match:sub(3, 3), match:sub(4, 4) + local hex_color = "#" .. r .. r .. g .. g .. b .. b + + return MiniHipatterns.compute_hex_color_group(hex_color, "bg") + end, + extmark_opts = { priority = 2000 }, + }, + }, + } +end |
