Skip to content

Proposal: .language-servers.toml file #2127

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

Open
nik-rev opened this issue Apr 7, 2025 · 0 comments
Open

Proposal: .language-servers.toml file #2127

nik-rev opened this issue Apr 7, 2025 · 0 comments
Labels
feature-request Request for new features or functionality
Milestone

Comments

@nik-rev
Copy link

nik-rev commented Apr 7, 2025

There should be an editor-agnostic way of configuring language servers. We can do this using a custom file, .language-servers.toml, the format of which will be explained below

Example use-case

Today, I wanted to use nightly rustfmt with stable rust, and have my editor (Helix) automatically format Rust files using nightly rustfmt. To do this, I have to add +nightly to rustfmt argument in the rust-analyzer language server as follows:

[language-server.rust-analyzer.config]
rustfmt.extraArgs = "+nightly"

Contributors to my project will need to have a custom config file created for them (e.g. .vscode/*, .zed/*) to configure rust-analyzer in a similar fashion to how it is done in Helix

In the end we will need to have a separate config file for every editor to properly work. This is pretty cumbersome, so it would be nice to have a single file that any editor can read.

.language-servers.toml file

Example format:

[rust-analyzer.config]
extraArgs = "+nightly"

The editor will then pass the config to the appropriate language server.

All configuration options are listed under the [${language-server}.config] field

@dbaeumer dbaeumer added the feature-request Request for new features or functionality label Apr 8, 2025
@dbaeumer dbaeumer added this to the Backlog milestone Apr 8, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

No branches or pull requests

2 participants