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

LSP textDocument/didOpen Message Missing Language ID #11399

Closed
1 task done
ejjonny opened this issue May 4, 2024 · 4 comments · Fixed by #11412
Closed
1 task done

LSP textDocument/didOpen Message Missing Language ID #11399

ejjonny opened this issue May 4, 2024 · 4 comments · Fixed by #11412
Labels
defect [core label] language server An umbrella label for all language servers language An umbrella label for all programming languages syntax behaviors

Comments

@ejjonny
Copy link
Contributor

ejjonny commented May 4, 2024

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

LSP client message textDocument/didOpen passes an empty string for textDocument.languageId.

This field is apparently necessary for language servers that support multiple languages such as sourcekit.

LSP object for reference

I believe it is crates/project/src/project.rs line ~2383 or line ~3682 defaulting on a None value.

Environment

Zed: v0.133.7 (Zed)
OS: macOS 14.2.1
Memory: 16 GiB
Architecture: aarch64

If applicable, add mockups / screenshots to help explain present your vision of the feature

No response

If applicable, attach your ~/Library/Logs/Zed/Zed.log file to this issue.

No response

@ejjonny ejjonny added admin read Pending admin review defect [core label] triage Maintainer needs to classify the issue labels May 4, 2024
@Moshyfawn Moshyfawn added language An umbrella label for all programming languages syntax behaviors language server An umbrella label for all language servers and removed triage Maintainer needs to classify the issue labels May 5, 2024
@SomeoneToIgnore
Copy link
Contributor

Nice catch, thank you.
#11412 is supposed to fix that, using a lowercased language name as a fallback now, will be released with Zed 0.135

@ejjonny
Copy link
Contributor Author

ejjonny commented May 5, 2024

Awesome! Thank you!

@furby-tm
Copy link

furby-tm commented May 6, 2024

@ejjonny hmm I pulled these changes in and I attempted to use your Swift extension just now but it's still doing the same thing that the broken extension has always done with no sourcekit-lsp support, was this change supposed to allow things to begin working?

@ejjonny
Copy link
Contributor Author

ejjonny commented May 6, 2024

@furby-tm Yeah, the published swift plugin has no language server, just syntax highlighting with tree sitter.

As far as my repo - it needed to point to a tree sitter branch with some generated files to install properly. If you pull down the latest commit you (should?) be able to get up and running.

It might help to run export RUST_LOG=info in the terminal session you launch Zed with so you can better see what is happening during installation.

If you don't see this (after a couple minutes) in your extensions window in Zed, the plugin didn't install successfully.
image

The standard LSP things should work - however the diagnostics message seems to be broken for me. If you do manage to get up and running you should let me know if you see the same deserialization warning I'm seeing.

@JosephTLyons JosephTLyons removed the admin read Pending admin review label May 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
defect [core label] language server An umbrella label for all language servers language An umbrella label for all programming languages syntax behaviors
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants