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

Some system language servers only work when both binary path and arguments are set #22775

Closed
1 task done
jansol opened this issue Jan 7, 2025 · 3 comments
Closed
1 task done
Labels
bug [core label] language server failure Language server doesn't work as expected language An umbrella label for all programming languages syntax behaviors toml TOML data format support

Comments

@jansol
Copy link
Contributor

jansol commented Jan 7, 2025

Check for existing issues

  • Completed

Describe the bug / provide steps to reproduce it

Looks like Zed fails to find taplo from PATH for whatever reason (other language servers are found there) and even manually specifying the binary path doesn't work. It only started working after I set the path manually and also added the ["lsp", "stdio"] arguments. The auto-downloaded binary seems to get those arguments correctly, which is weird. "ignore_system_version" does not work regardless of whether arguments are given manually or not.

Texlab (via the LaTeX extension) appears to have the same problem. One thing that both have in common is that they require some kind of command line argument in order to actually start the LSP process.

Zed Version and System Specs

Zed: v0.169.0 (Zed Dev 78d342d)
OS: Linux Wayland ubuntu 24.04
Memory: 31.3 GiB
Architecture: x86_64
GPU: Radeon Vega Frontier Edition (RADV VEGA10) || radv || Mesa 24.0.9-0ubuntu0.3

If applicable, add screenshots or screencasts of the incorrect state / behavior

No response

If applicable, attach your Zed.log file to this issue.

No response

@jansol jansol added bug [core label] language server failure Language server doesn't work as expected admin read toml TOML data format support labels Jan 7, 2025
@jansol jansol changed the title System taplo only works when both path and arguments are set Some system language servers only work when both binary path and arguments are set Jan 7, 2025
@JosephTLyons JosephTLyons added language An umbrella label for all programming languages syntax behaviors and removed admin read labels Jan 8, 2025
@lnay
Copy link
Contributor

lnay commented Jan 26, 2025

Just saw this. I believe the behaviour about reading the "lsp.x.binary" settings was completely up to extensions (at least as of September last year).

If this hasn't changed, then the TOML extension doesn't seem to care about those settings:

fn language_server_command(

The LaTeX extension only reads those settings when "path" is set:
https://github.com/rzukic/zed-latex/blob/d13761f254e7392bf550b758b8af440dd7878291/src/latex.rs#L52
It also does not try to expand relative paths or files in PATH, but that could be added.

It could also make sense to still use "arguments" even when "path" is not set in order to easily start file logging without having to dig out the path of the automatically downloaded executable.

@maxdeviant
Copy link
Member

@jansol This is something that needs to be fixed at the extension level.

It looks like the TOML extension did not check for taplo on the PATH and also did not respect the language server binary settings.

Here's a fix for the TOML extension: #25276

maxdeviant added a commit that referenced this issue Feb 20, 2025
This PR updates the TOML extension to respect the `binary` settings for
the language server.

Related to #22775.

Release Notes:

- N/A
@maxdeviant
Copy link
Member

I'm going to close this, as it is something that needs to be addressed on an extension-by-extension basis.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug [core label] language server failure Language server doesn't work as expected language An umbrella label for all programming languages syntax behaviors toml TOML data format support
Projects
None yet
Development

No branches or pull requests

4 participants