Files
dotfiles/.config/nvim/lua/plugins/tailwindcss.lua
Stefan Imhoff a41290c297 feat(nix): nix and back again
I tried Nix, but it had too many downsides so I removed it.

1. Didn't like that all files are immutable and simple config changes
need a complete rebuild.
2. Setting up a new Mac didn't work as smoothly as promised. Not worth
the effort.
3. It sucked a lot to always have to type in the password twice on each
darwin-rebuild
4. It solves problems I never had.
2024-08-07 17:49:02 +02:00

49 lines
1.2 KiB
Lua

-- Tailwind CSS
return {
{
"neovim/nvim-lspconfig",
opts = {
servers = {
tailwindcss = {},
},
},
},
{
"NvChad/nvim-colorizer.lua",
opts = {
user_default_options = {
tailwind = true,
},
},
{
"hrsh7th/nvim-cmp",
dependencies = {
{ "roobert/tailwindcss-colorizer-cmp.nvim", config = true },
},
opts = function(_, opts)
-- original LazyVim kind icon formatter
local format_kinds = opts.formatting.format
opts.formatting.format = function(entry, item)
format_kinds(entry, item) -- add icons
return require("tailwindcss-colorizer-cmp").formatter(entry, item)
end
end,
},
"laytan/tailwind-sorter.nvim",
dependencies = {
"nvim-treesitter/nvim-treesitter",
"nvim-lua/plenary.nvim",
},
build = "cd formatter && npm i && npm run build",
config = {
on_save_enabled = true,
on_save_pattern = { "*.html", "*.jsx", "*.tsx", "*.astro", "*.svelte" },
},
},
{
"luckasRanarison/tailwind-tools.nvim",
dependencies = { "nvim-treesitter/nvim-treesitter" },
opts = {},
},
}