A Neovim plugin to add vs-code-style TailwindCSS color hints to the nvim-cmp
completion menu.
use({
"roobert/tailwindcss-colorizer-cmp.nvim",
-- optionally, override the default options:
config = function()
require("tailwindcss-colorizer-cmp").setup({
color_square_width = 2,
})
end
})
{
"roobert/tailwindcss-colorizer-cmp.nvim",
-- optionally, override the default options:
config = function()
require("tailwindcss-colorizer-cmp").setup({
color_square_width = 2,
})
end
}
After installing the plugin, please ensure it's initialised with one of the following:
require("cmp").config.formatting = {
format = require("tailwindcss-colorizer-cmp").formatter
}
lvim.builtin.cmp.formatting = {
format = require("tailwindcss-colorizer-cmp").formatter
}
If you'd also like color highlighting in the buffer, please see: NvChad/nvim-colorizer.lua
A nice video on adding various tailwind support to Neovim can be found here.