configured colorizer
This commit is contained in:
parent
7642c94829
commit
07e6061b84
3
init.lua
3
init.lua
|
|
@ -1,4 +1,7 @@
|
|||
require("config.looks")
|
||||
|
||||
require("config.lazy")
|
||||
|
||||
require("config.behaviour")
|
||||
require("config.keymap")
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1 @@
|
|||
vim.o.termguicolors = true
|
||||
|
|
@ -1,6 +1,25 @@
|
|||
return {
|
||||
{
|
||||
-- Package installer (for LSPs)
|
||||
"williamboman/mason.nvim",
|
||||
opts = {}
|
||||
},
|
||||
{
|
||||
-- Highlight color codes (like #A3F041)
|
||||
"norcalli/nvim-colorizer.lua",
|
||||
-- event = { "BufNew" }, -- will not call autocmd when opening a file the first time
|
||||
config = function()
|
||||
require("colorizer").setup({'*'}, { RRGGBBAA = true })
|
||||
|
||||
-- trigger highlighting when opening a new buffer
|
||||
vim.api.nvim_create_autocmd(
|
||||
{ "BufNew", "BufRead" },
|
||||
{
|
||||
callback = function()
|
||||
local colorizer = require("colorizer")
|
||||
colorizer.attach_to_buffer(0, colorizer.get_buffer_options(0))
|
||||
end
|
||||
})
|
||||
end,
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue