有人在折腾tailwindcss server的吗?我正在尝试为lsp-bridge添加tailwind server的支持。
折腾思路:
- 研究lsp-mode下tailwind client的参数有哪些 根据我的提取,得到以下参数配置:
{
"name": "tailwindcss",
"languageId": "html",
"command": ["tailwindcss-language-server", "--stdio"],
"settings": {},
"capabilities": {},
"initializationOptions": {
"configuration": {
"tailwindCSS": {
"emmetCompletions": false,
"showPixelEquivalents": true,
"rootFontSize": 16,
"validate": true,
"lint": {
"invalidScreen": "error",
"invalidVariant": "error",
"invalidTailwindDirective": "error",
"invalidApply": "error",
"invalidConfigPath": "error",
"cssConflict": "warning",
"recommendedVariantOrder": "warning"
},
"experimental": {
"classRegex": "",
"configFile": "tailwind.config.js"
},
"classAttributes": ["class", "className", "ngClass"]
}
}
}
}
但是通过以上参数初始化服务器会得到如下结果:
--- Send (63379): initialize
{
"id": 63379,
"method": "initialize",
"params": {
"processId": 3254507,
"rootPath": "/home/evanmeek/Documents/code/project/web/domeland-ui",
"clientInfo": {
"name": "emacs",
"version": "GNU Emacs 28.1 (build 1, x86_64-pc-linux-gnu, GTK+ Version 3.24.33, cairo version 1.17.6)\n of 2022-04-28"
},
"rootUri": "file:///home/evanmeek/Documents/code/project/web/domeland-ui",
"capabilities": {},
"initializationOptions": {
"configuration": {
"tailwindCSS": {
"emmetCompletions": false,
"showPixelEquivalents": true,
"rootFontSize": 16,
"validate": true,
"lint": {
"invalidScreen": "error",
"invalidVariant": "error",
"invalidTailwindDirective": "error",
"invalidApply": "error",
"invalidConfigPath": "error",
"cssConflict": "warning",
"recommendedVariantOrder": "warning"
},
"experimental": {
"classRegex": "",
"configFile": "tailwind.config.js"
},
"classAttributes": [
"class",
"className",
"ngClass"
]
}
}
}
},
"jsonrpc": "2.0"
}
--- Recv message (error):
{
"jsonrpc": "2.0",
"id": 63379,
"error": {
"code": -32603,
"message": "Request initialize failed with message: Cannot read properties of undefined (reading 'hover')"
}
}
随后我通过阅读tailwind-server的源码进行了修改,但是目前不知道如何debug tailwindserver(如何看它的输出日志)。
有大佬知道的请@我,十分感谢!