feat: add Tailwind CSS LSP
This commit is contained in:
parent
2fc217a01d
commit
60a8a057a5
2 changed files with 35 additions and 0 deletions
34
lsp/tailwind.lua
Normal file
34
lsp/tailwind.lua
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
---@type vim.lsp.Config
|
||||
return {
|
||||
cmd = { "tailwindcss-language-server", "--stdio" },
|
||||
root_markers = { "tailwind.config.js" },
|
||||
filetypes = { "javascript", "htmldjango", "css" },
|
||||
settings = {
|
||||
tailwindCSS = {
|
||||
validate = true,
|
||||
lint = {
|
||||
cssConflict = "warning",
|
||||
invalidApply = "error",
|
||||
invalidScreen = "error",
|
||||
invalidVariant = "error",
|
||||
invalidConfigPath = "error",
|
||||
invalidTailwindDirective = "error",
|
||||
recommendedVariantOrder = "warning",
|
||||
},
|
||||
classAttributes = {
|
||||
"class",
|
||||
"className",
|
||||
"class:list",
|
||||
"classList",
|
||||
"ngClass",
|
||||
},
|
||||
includeLanguages = {
|
||||
eelixir = "html-eex",
|
||||
eruby = "erb",
|
||||
templ = "html",
|
||||
htmlangular = "html",
|
||||
htmldjango = "html",
|
||||
},
|
||||
},
|
||||
},
|
||||
}
|
||||
|
|
@ -6,6 +6,7 @@ vim.lsp.enable({
|
|||
"yaml",
|
||||
"ansible",
|
||||
"marksman",
|
||||
"tailwind",
|
||||
})
|
||||
|
||||
-- Set highlight on search
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue