Only colorize hex codes

This commit is contained in:
Dreaded_X 2024-04-13 18:11:09 +02:00
parent 2ac26b8d7a
commit 228cd34087
Signed by: Dreaded_X
GPG Key ID: FA5F485356B0D2D4

View File

@ -1,11 +1,11 @@
-- https://github.com/NvChad/nvim-colorizer.lua -- https://github.com/NvChad/nvim-colorizer.lua
return { return {
'NvChad/nvim-colorizer.lua', "NvChad/nvim-colorizer.lua",
event = "VeryLazy", event = "VeryLazy",
opts = { opts = {
filetypes = { filetypes = {
'*', -- Enable color highlighting for all files "*", -- Enable color highlighting for all files
'!neo-tree', -- Exclude neo-tree "!neo-tree", -- Exclude neo-tree
}, },
buftypes = { buftypes = {
"*", "*",
@ -13,10 +13,13 @@ return {
"!popup", "!popup",
}, },
always_update = true, always_update = true,
user_default_options = {
names = false,
},
}, },
-- Fix lazy loading: https://github.com/NvChad/nvim-colorizer.lua -- Fix lazy loading: https://github.com/NvChad/nvim-colorizer.lua
config = function(_, opts) config = function(_, opts)
local colorizer = require('colorizer'); local colorizer = require("colorizer")
colorizer.setup(opts) colorizer.setup(opts)
-- nvim-colorizer doesn't work on the initial buffer if we lazy load, so force it to attach -- nvim-colorizer doesn't work on the initial buffer if we lazy load, so force it to attach
@ -25,5 +28,5 @@ return {
if bufnr and not colorizer.is_buffer_attached(bufnr) then if bufnr and not colorizer.is_buffer_attached(bufnr) then
colorizer.attach_to_buffer(bufnr) colorizer.attach_to_buffer(bufnr)
end end
end end,
} }