mirror of
https://github.com/kogakure/dotfiles.git
synced 2026-02-03 20:25:30 +00:00
chore(nvim): move all Tailwind CSS related plugins into one file
This commit is contained in:
@@ -11,6 +11,7 @@ return {
|
||||
{ name = "copilot" },
|
||||
{ name = "npm", keyword_length = 4 },
|
||||
}))
|
||||
|
||||
opts.formatting = {
|
||||
fields = { "kind", "abbr", "menu" },
|
||||
format = function(_, item)
|
||||
@@ -37,12 +38,5 @@ return {
|
||||
vim.cmd([[highlight! CmpItemKindKeyword guibg=NONE guifg=#D4D4D4]])
|
||||
vim.cmd([[highlight! link CmpItemKindProperty CmpItemKindKeyword]])
|
||||
vim.cmd([[highlight! link CmpItemKindUnit CmpItemKindKeyword]])
|
||||
|
||||
-- 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,
|
||||
}
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
-- The fastest Neovim colorizer
|
||||
-- https://github.com/norcalli/nvim-colorizer.lua
|
||||
-- https://github.com/NvChad/nvim-colorizer.lua
|
||||
return {
|
||||
"norcalli/nvim-colorizer.lua",
|
||||
"NvChad/nvim-colorizer.lua",
|
||||
config = function()
|
||||
require("colorizer").setup({
|
||||
"css",
|
||||
@@ -23,7 +23,6 @@ return {
|
||||
css = true,
|
||||
css_fn = true,
|
||||
mode = "background",
|
||||
tailwind = true,
|
||||
})
|
||||
end,
|
||||
}
|
||||
|
||||
@@ -1,8 +0,0 @@
|
||||
return {
|
||||
"laytan/tailwind-sorter.nvim",
|
||||
dependencies = { "nvim-treesitter/nvim-treesitter", "nvim-lua/plenary.nvim" },
|
||||
build = "cd formatter && npm i && npm run build",
|
||||
config = {
|
||||
on_save_pattern = { "*.html", "*.jsx", "*.tsx", "*.astro", "*.svelte" },
|
||||
},
|
||||
}
|
||||
42
nvim/lua/plugins/tailwindcss.lua
Normal file
42
nvim/lua/plugins/tailwindcss.lua
Normal file
@@ -0,0 +1,42 @@
|
||||
-- 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_pattern = { "*.html", "*.jsx", "*.tsx", "*.astro", "*.svelte" },
|
||||
},
|
||||
},
|
||||
}
|
||||
Reference in New Issue
Block a user