Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to get tailwindcss-language-server to work #460

Closed
airblade opened this issue Mar 7, 2023 · 1 comment
Closed

Unable to get tailwindcss-language-server to work #460

airblade opened this issue Mar 7, 2023 · 1 comment

Comments

@airblade
Copy link

airblade commented Mar 7, 2023

I haven't used any kind of LSP before so I'm sorry if this is a silly question.

I have just installed vim-lsc (39ec723) on Vim 9.0.472. My sole config is this:

let g:lsc_server_commands = {'html': 'tailwindcss-language-server --stdio'}

I have already installed the server with npm install -g @tailwindcss/language-server as per its readme.

When I open an HTML file in a Tailwind project, I get this error message:

[lsc:Error] No workspace folders found, not initializing.

This appears to come from here:

https://github.com/tailwindlabs/tailwindcss-intellisense/blob/3aafffefdab2deafdfe6c3b4acbbe9cd1ebf6d04/packages/tailwindcss-language-server/src/server.ts#L1610-L1613

I set up the debugging pipeline and in.log shows:

Content-Length: 706

{"method":"initialize","jsonrpc":"2.0","id":1,"params":{"rootUri":"file:///path/to/my/project","capabilities":{"workspace":{"configuration":true,"applyEdit":true},"textDocument":{"completion":{"completionItem":{"snippetSupport":false,"tagSupport":{"valueSet":[1]},"deprecatedSupport":true}},"synchronization":{"willSaveWaitUntil":false,"willSave":false,"didSave":false},"codeAction":{"codeActionLiteralSupport":{"codeActionKind":{"valueSet":["quickfix","refactor","source"]}}},"signatureHelp":{"dynamicRegistration":false},"hover":{"contentFormat":["plaintext","markdown"]},"definition":{"dynamicRegistration":false}}},"clientInfo":{"name":"vim-lsc"},"processId":62896,"trace":"off"}}Content-Length: 52

{"method":"initialized","jsonrpc":"2.0","params":{}}Content-Length: 20281

{"method":"textDocument/didOpen","jsonrpc":"2.0","params":{"textDocument":{"uri":"file:///path/to/my/project/index.html","version":1,"languageId":"html","text":"..."}}}Content-Length: 44

{"method":"shutdown","jsonrpc":"2.0","id":2}Content-Length: 33

{"method":"exit","jsonrpc":"2.0"}

out.log shows:

Content-Length: 124

{"jsonrpc":"2.0","method":"window/logMessage","params":{"type":1,"message":"No workspace folders found, not initializing."}}Content-Length: 276

{"jsonrpc":"2.0","id":1,"result":{"capabilities":{"textDocumentSync":1,"hoverProvider":true,"colorProvider":true,"codeActionProvider":true,"documentLinkProvider":{},"completionProvider":{"resolveProvider":true,"triggerCharacters":["\"","'","`"," ",".","(","[","!","/",":"]}}}}Content-Length: 38

{"jsonrpc":"2.0","id":2,"result":null}

I would be most grateful for any suggestions. Thank you!

@airblade
Copy link
Author

This has been fixed in the language server: tailwindlabs/tailwindcss-intellisense#725.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant