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

Language server reports diagnostics for source archives #1745

Closed
JulianVennen opened this issue Feb 4, 2025 · 2 comments · Fixed by #1751
Closed

Language server reports diagnostics for source archives #1745

JulianVennen opened this issue Feb 4, 2025 · 2 comments · Fixed by #1751
Labels

Comments

@JulianVennen
Copy link
Contributor

Hey, I started working on a plugin for JetBrains that uses this LSP: https://github.com/JulianVennen/spyglass-mc-jetbrains

While working on that, I noticed numerous errors in my IntelliJ log that looked something like this:

2025-02-04 18:47:42,428 [  10441]   WARN - #c.i.p.l.a.LspServerDescriptor - Unexpected URI scheme: archive://vanilla-mcdoc.tar.gz/java/server/world/entity/mob/breedable/tamable.mcdoc

After enabling debug logging which outputs all LSP messages, the following appeared:

2025-02-04 18:47:42,428 [  10441]   FINE - #c.i.p.l.i.c.Lsp4jServerConnector - <-- SpyglassLspServerDescriptor@towers: {"jsonrpc":"2.0","method":"textDocument/publishDiagnostics","params":{"diagnostics":[],"uri":"archive://vanilla-mcdoc.tar.gz/java/server/world/entity/mob/fish.mcdoc"}}

Spyglass appears to be reporting diagnostics for files inside the vanilla-mcdoc.tar.gz and mcmeta.tar.gz. Obviously, files inside these are not part of the project I have opened in my IDE, so it makes sense that IntelliJ logs an error in that case.

@MulverineX
Copy link
Member

It would be best to discuss this on Discord, are you available there?

@misode
Copy link
Member

misode commented Feb 6, 2025

Really cool that someone is working on an Intellij plugin! I'm guessing this is something specific to the intellij LSP client implementation, because I've definitely seen diagnostics for these archives reported in vscode.

That said, I guess it doesn't really make sense to have these reported in the workspace, and there have been questions from users whenever there are stray diagnostics in some of the vanilla-mcdoc files for example. So it'd probably be best to filter these out in the Spyglass language server based on the URI scheme.

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

Successfully merging a pull request may close this issue.

3 participants