nvim/lua/plugins/tooling.lua

30 lines
733 B
Lua
Raw Normal View History

2024-08-21 17:56:21 +02:00
return {
{
2024-08-21 23:40:39 +02:00
-- Package installer (for LSPs)
2024-08-21 17:56:21 +02:00
"williamboman/mason.nvim",
opts = {}
},
2024-08-21 23:40:39 +02:00
{
-- 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(
2024-08-26 19:46:52 +02:00
{ "BufNew", "BufRead" },
2024-08-21 23:40:39 +02:00
{
callback = function()
local colorizer = require("colorizer")
2024-08-26 19:46:52 +02:00
local options = nil
if colorizer.is_buffer_attached(0) then
options = colorizer.get_buffer_options(0)
end
colorizer.attach_to_buffer(0, options)
2024-08-21 23:40:39 +02:00
end
})
end,
}
2024-08-21 17:56:21 +02:00
}