-
Notifications
You must be signed in to change notification settings - Fork 179
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
Language server doesn't respond to initialize request properly #802
Comments
I can confirm absolutely the same behavior. I'm using vim 9. Looks like 'coc.nvim', 'VS Code' and others just 'supports dynamic registration' here and receive prompt response with caps:
all others go "long way" with await tw.init() - receiving configuration request instead...
After analysing the code I think that line
init method is called after the connection is initialised from this line -
The 'yegappan/lsp' logs show the same records as shown above for 'Helix". The 'coc.nvim' logs however show response correctly received for 'initialize':
|
This is to resolve issue tailwindlabs#802
@rozaliev You may try to use my fork for testing (will require you to build packages |
@atgote thanks, your fork seems to work with Helix, at least for the initialization part and simple HTML editing. But with custom regex, only completion works and hover doesn't. Here are the weird things I found in the logs:
I'm not sure if this is directly related to hover, because it works for HTML and shows similar errors. But it definitely seems like a bug, |
I think I figured out how to make hover work with custom regex, but I'm not sure how to proceed since I'm not really familiar with Tailwind codebase and there are no tests. I assume that somewhere around here should be code that handles
I've added this line to test things out: else {
classNames = await findClassNamesInRange(state, doc, searchRange, 'html', true)
} Notice the last argument, which sets Everything seems to work with this change. |
* Remove buggy await call This is to resolve issue #802 * Fix unhandled method errors --------- Co-authored-by: Brad Cornes <hello@bradley.dev>
This should be fixed by #803 but please open a new issue if you're still running into problems 👍 We now automatically publish |
I'm trying to make language-server work with Helix. But it looks like lsp doesn't respond to initialize request properly before sending its own requests. According to the spec:
Language server: @tailwindcss/language-server@0.0.13
tailwind-language-server --stdio
Expected:
Received:
I would assume that this line is the reason
tailwindcss-intellisense/packages/tailwindcss-language-server/src/server.ts
Line 1655 in 1438300
And this these are the lines that send requests before the initialize response.
tailwindcss-intellisense/packages/tailwindcss-language-server/src/server.ts
Line 247 in 1438300
The text was updated successfully, but these errors were encountered: