Closed dustinlyons closed 1 year ago
Hello @merrickluo and @dustinlyons, I have same problem too.
I'm running GNU Emacs 28.1 on macOS from Homebrew.
I'm installed lsp-tailwindcss
and (setq lsp-tailwindcss-add-on-mode t)
, the LSP server will run, but it will never finish loading indefinitely.
Please check.
Hi, can you please check your language server version with M-x lsp-tailwindcss-installed-server-version
? the output from lsp-workspace-show-log
would also be helpful.
@merrickluo Thanks for your reply.
Hi, can you please check your language server version with
M-x lsp-tailwindcss-installed-server-version
? the output fromlsp-workspace-show-log
would also be helpful.
OK, I tried.
M-x lsp-tailwindcss-installed-server-version
Sorry, that command doesn't show up in the minibuffer...
M-x lsp-workspace-show-log
It worked. But all I got was the following message in the minibuffer:
IO logging is disabled
Is there anything else I can do...?
lsp-tailwindcss
: 20220816.1602
lsp-mode
: 20220907.1628
lsp-ui
: 20220823.1626
i see, ~you need the package to be loaded before running lsp-tailwindcss-installed-server-version
, this can be done by opening a file with lsp-tailwindcss enabled~. I probably should autoload it. just realized I didn't make this function interactive, please update and try again.
And about show log, I forgot to mention that you need to toggle it on first with lsp-toggle-trace-io
.
if you get an error with lsp-tailwindcss-installed-server-version
, you should reinstall the server with C-u lsp-install-server
and then select tailwindcss.
@merrickluo
I probably should autoload it. just realized I didn't make this function interactive, please update and try again.
Thanks!
I installed the latest version (20220910.347
) and tried it.
M-x lsp-tailwindcss-installed-server-version
Return 0.8.5
.
M-x lsp-workspace-show-log
(after M-x lsp-toggle-trace-io
)I chose Workspace: tailwindcss:97266/starting
(Timestamp: UTC+9):
[Trace - 02:06:12 PM] Sending notification 'textDocument/didClose'.
Params: {
"textDocument": {
"uri": "file:///Users/takueof/test.tsx"
}
}
This is the only output. I hope this information helps you.
Thanks, @takueof, the server version seems good. For the log, can you try another time with the following steps?
lsp-toggle-trace-io
lsp-workspace-restart
to restart it.Since the problem is likely on server startup, this is the only way to see the startup logs. It will be great if you can get a minimal example that I can reproduce it, thanks :pray:
@merrickluo Oh, I see. I've attached the log where I tried the following steps:
lsp-toggle-trace-io
lsp-workspace-restart
lsp-workspace-show-log
M-x lsp-workspace-show-log
[Trace - 09:23:20 AM] Sending request 'initialize - (61)'.
Params: {
"processId": null,
"rootPath": "/Users/takueof",
"clientInfo": {
"name": "emacs",
"version": "GNU Emacs 28.1 (build 1, x86_64-apple-darwin21.4.0, Carbon Version 165 AppKit 2113.4)\n of 2022-04-10"
},
"rootUri": "file:///Users/takueof",
"capabilities": {
"workspace": {
"workspaceEdit": {
"documentChanges": true,
"resourceOperations": [
"create",
"rename",
"delete"
]
},
"applyEdit": true,
"symbol": {
"symbolKind": {
"valueSet": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
]
}
},
"executeCommand": {
"dynamicRegistration": false
},
"workspaceFolders": true,
"configuration": true,
"codeLens": {
"refreshSupport": true
},
"fileOperations": {
"didCreate": false,
"willCreate": false,
"didRename": true,
"willRename": true,
"didDelete": false,
"willDelete": false
}
},
"textDocument": {
"declaration": {
"dynamicRegistration": true,
"linkSupport": true
},
"definition": {
"dynamicRegistration": true,
"linkSupport": true
},
"implementation": {
"dynamicRegistration": true,
"linkSupport": true
},
"typeDefinition": {
"dynamicRegistration": true,
"linkSupport": true
},
"synchronization": {
"willSave": true,
"didSave": true,
"willSaveWaitUntil": true
},
"documentSymbol": {
"symbolKind": {
"valueSet": [
1,
2,
3,
4,
5,
6,
7,
8,
9,
10,
11,
12,
13,
14,
15,
16,
17,
18,
19,
20,
21,
22,
23,
24,
25,
26
]
},
"hierarchicalDocumentSymbolSupport": true
},
"formatting": {
"dynamicRegistration": true
},
"rangeFormatting": {
"dynamicRegistration": true
},
"onTypeFormatting": {
"dynamicRegistration": true
},
"rename": {
"dynamicRegistration": true,
"prepareSupport": true
},
"codeAction": {
"dynamicRegistration": true,
"isPreferredSupport": true,
"codeActionLiteralSupport": {
"codeActionKind": {
"valueSet": [
"",
"quickfix",
"refactor",
"refactor.extract",
"refactor.inline",
"refactor.rewrite",
"source",
"source.organizeImports"
]
}
},
"resolveSupport": {
"properties": [
"edit",
"command"
]
},
"dataSupport": true
},
"completion": {
"completionItem": {
"snippetSupport": true,
"documentationFormat": [
"markdown",
"plaintext"
],
"resolveAdditionalTextEditsSupport": true,
"insertReplaceSupport": true,
"deprecatedSupport": true,
"resolveSupport": {
"properties": [
"documentation",
"detail",
"additionalTextEdits",
"command"
]
},
"insertTextModeSupport": {
"valueSet": [
1,
2
]
}
},
"contextSupport": true,
"dynamicRegistration": true
},
"signatureHelp": {
"signatureInformation": {
"parameterInformation": {
"labelOffsetSupport": true
}
},
"dynamicRegistration": true
},
"documentLink": {
"dynamicRegistration": true,
"tooltipSupport": true
},
"hover": {
"contentFormat": [
"markdown",
"plaintext"
],
"dynamicRegistration": true
},
"foldingRange": {
"dynamicRegistration": true
},
"selectionRange": {
"dynamicRegistration": true
},
"callHierarchy": {
"dynamicRegistration": false
},
"typeHierarchy": {
"dynamicRegistration": true
},
"publishDiagnostics": {
"relatedInformation": true,
"tagSupport": {
"valueSet": [
1,
2
]
},
"versionSupport": true
},
"linkedEditingRange": {
"dynamicRegistration": true
}
},
"window": {
"workDoneProgress": true,
"showDocument": {
"support": true
}
}
},
"initializationOptions": {
"configuration": {
"tailwindCSS": {
"emmetCompletions": false,
"showPixelEquivalents": true,
"rootFontSize": 16,
"validate": true,
"hovers": true,
"suggestions": true,
"codeActions": true,
"lint": {
"invalidScreen": "error",
"invalidVariant": "error",
"invalidTailwindDirective": "error",
"invalidApply": "error",
"invalidConfigPath": "error",
"cssConflict": "warning",
"recommendedVariantOrder": "warning"
},
"experimental": {
"classRegex": ""
},
"classAttributes": [
"class",
"className",
"ngClass"
]
}
}
},
"workDoneToken": "1"
}
[Trace - 09:23:20 AM] Received response 'initialize - (61)' in 190ms.
Result: {
"code": -32603,
"message": "Request initialize failed with message: Cannot read properties of undefined (reading 'dynamicRegistration')"
}
Thank you @takueof. I see, the new version of lsp-mode
removed a lot of options related to dynamicRegistration which cause tailwindcss server failed to start, I might need sometime to find out how to workaround this, meanwhile you can pin lsp-mode
to an old version if you are able to, I can confirm that "3fa645c0397b8f438f2db2dd288b899ba330d410" works.
@merrickluo Thanks for confirming.
the new version of lsp-mode removed a lot of options related to dynamicRegistration which cause tailwindcss server failed to start, I might need sometime to find out how to workaround this
Oh...π I see. I hope you can work around this issue π
meanwhile you can pin lsp-mode to an old version if you are able to, I can confirm that "3fa645c0397b8f438f2db2dd288b899ba330d410" works.
OK, I'll try to stick with this hash version of lsp-mode
.
Best regards.
Correction: I misread the diff output, turns out it's lsp-mode is supporting dynamicRegistration now, but it triggered a bug in the language server that didn't check for nil before reading some of the capabilities. I'll send a PR there. https://github.com/tailwindlabs/tailwindcss-intellisense/pull/602
@merrickluo
Thank you for creating PR, and congrats on the merge π
The latest version of Tailwind CSS IntelliSense was just released and the latest version is 0.8.7
.
I tried (setq lsp-tailwindcss-server-version "0.8.7")
, M-x lsp-update-server
(choose tailwindcss
) and restart GNU Emacs.
I have confirmed that it works fine! π
As for the remaining work, do you just set defcustom
's lsp-tailwindcss-server-version
to "0.8.7"
?
Best regards.
Yes, I did test locally too, and hten updated the custom variable, I think we can close this one now, cheers :beer:
Hello,
I'm seeing the following error after verifying
tailwindcss
server is installed. Thelsp
server is unable to start. I'm running Emacs 29.0.50 in Daemon Mode on NixOS.Results of
lsp-describe-session
:Here is my
emacs
configuration. I've tried a few things with same results.:straight
.lsp-tailwindcss-add-on-mode
turned off.