mirror of
https://github.com/LunarVim/LunarVim.git
synced 2025-07-12 18:34:41 +02:00
Setup tailwindcss-ls (#729)
This commit is contained in:
parent
3417a343e2
commit
35e37f06da
3 changed files with 6 additions and 0 deletions
3
init.lua
3
init.lua
|
@ -11,6 +11,9 @@ require "lsp"
|
||||||
if O.lang.emmet.active then
|
if O.lang.emmet.active then
|
||||||
require "lsp.emmet-ls"
|
require "lsp.emmet-ls"
|
||||||
end
|
end
|
||||||
|
if O.lang.tailwindcss.active then
|
||||||
|
require "lsp.tailwindcss-ls"
|
||||||
|
end
|
||||||
|
|
||||||
-- autoformat
|
-- autoformat
|
||||||
if O.format_on_save then
|
if O.format_on_save then
|
||||||
|
|
|
@ -146,6 +146,7 @@ O = {
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
tailwindcss = {
|
tailwindcss = {
|
||||||
|
active = false,
|
||||||
filetypes = {
|
filetypes = {
|
||||||
"html",
|
"html",
|
||||||
"css",
|
"css",
|
||||||
|
|
|
@ -6,5 +6,7 @@ lspconfig.tailwindcss.setup {
|
||||||
"node", DATA_PATH .. "/lspinstall/tailwindcss/tailwindcss-intellisense/extension/dist/server/tailwindServer.js",
|
"node", DATA_PATH .. "/lspinstall/tailwindcss/tailwindcss-intellisense/extension/dist/server/tailwindServer.js",
|
||||||
"--stdio"
|
"--stdio"
|
||||||
},
|
},
|
||||||
|
filetypes = O.lang.tailwindcss.filetypes,
|
||||||
|
root_dir = require("lspconfig/util").root_pattern("tailwind.config.js", "postcss.config.ts", ".postcssrc"),
|
||||||
on_attach = require'lsp'.common_on_attach
|
on_attach = require'lsp'.common_on_attach
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue