You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Settings › Language Servers picks the server for each language #456
Third slice of #63. After this merges, the user can pick a language server for Go, Rust, TypeScript, Python or any other highlighted language (or change C#'s) from Settings, without editing a file, and Go to definition and Find usages then work in those files too. See the pitch for the pane and dialog mockups.
Blocked by #454 (Go to definition), which brings the language server client. It doesn't depend on the Find usages task.
Acceptance criteria
Settings has a Language Servers pane listing every language TuiCode highlights, with its server (— for none, (default) for C#'s csharp-ls) and ✓/✗ for whether that server is on PATH.
Enter on a row opens a dialog titled <Language> language server with radio buttons: None, each known server for that language, and Custom.
Choosing a known server fills Command and Arguments (text fields); choosing Custom lets the user type them.
As the command is typed, the dialog shows whether it's on PATH; for a known server that isn't, it shows its install command (e.g. go install golang.org/x/tools/gopls@latest).
A server that isn't installed can still be saved, and its row shows ✗.
Ctrl+Enter saves and Esc cancels; Delete on a row resets it to its default.
After saving, that language's running server stops and the chosen one starts with the next file of that language. The status bar shows its state as it does for C#.
With gopls or rust-analyzer chosen and installed, Ctrl+G D (and Ctrl+G U, if merged) work in Go or Rust files.
A file whose grammar was changed with cg uses the server of the language the status bar shows.
The choice survives a restart.
Known servers: C# csharp-ls, roslyn-language-server; Go gopls; Rust rust-analyzer; TypeScript/JavaScript typescript-language-server; Python pyright, pylsp, each with its arguments and install command.
Tests
Reading and writing the setting, including a missing or partly invalid file.
The pane's rows: languages, server names, installed state.
The dialog's choice → command/arguments, the PATH check, reset to default.
A saved change restarts only that language's server.
Out of scope
Installing or updating servers for the user.
Per-folder server settings.
Server-specific options (initialization options, workspace settings) beyond command and arguments.
When chosing the ls for a grammar, it's usually radio buttons. Pressing the arrow keys currently focuses a new radio but doesn't automatically select it (I have to press space to select it). Selection should happen automatically.
Done in #496 (6d1820b): the arrow keys now select the server they move to, with no Space needed. The dialog also opens focused on the current server, so the first arrow moves on from that one rather than from None.
This one is rust-analyzer, not TuiCode. test.rs sits at the root of rust-test, outside src/, and nothing mods it in, so it isn't part of the crate. rust-analyzer doesn't analyse files outside the crate. I asked it directly, with no TuiCode involved, for the definition of get_env_var in that file and it returned nothing, even 30s after indexing finished. It also returns nothing for a copy of the file in a folder with no Cargo.toml.
In the same folder, with PR #496's build, Go to definition on App in src/main.rs jumps to pub struct App in src/app.rs. To try it on test.rs, move it to src/ and add mod test; to main.rs, or make it src/bin/test.rs.
rust-analyzer can be told about a loose file: its linkedProjects setting takes a .rs file as well as a Cargo.toml. If you’d like TuiCode to use that for files outside the crate, or to say "not part of a Cargo project" rather than "No definition found", I can open that as a follow-up. I've left this PR as it is.
Activity
a-team-app commentedon Oct 7, 2026
Blocked by #454: Choosing servers per language needs the language server client that #454 brings.
a-team-app commentedon Oct 9, 2026
Draft PR #496 is up.
Pin the Language Servers host test to 80x25 like the other host tests
Dispose the Language Servers host tests' WorkbenchHost
Merge origin/main into feat/language-servers
jamescrosswell commentedon Oct 10, 2026
When chosing the ls for a grammar, it's usually radio buttons. Pressing the arrow keys currently focuses a new radio but doesn't automatically select it (I have to press space to select it). Selection should happen automatically.
jamescrosswell commentedon Oct 10, 2026
I enabled rust-analyzer for Rust but the Goto Definition and Goto Usages commands don't seem to work properly for Rust:
The LS is showing as loaded. This was on
~/code/rust-test/test.rs.Select a language server as the arrow keys move to it
a-team-app commentedon Oct 10, 2026
Done in #496 (6d1820b): the arrow keys now select the server they move to, with no Space needed. The dialog also opens focused on the current server, so the first arrow moves on from that one rather than from None.
a-team-app commentedon Oct 10, 2026
This one is rust-analyzer, not TuiCode.
test.rssits at the root ofrust-test, outsidesrc/, and nothingmods it in, so it isn't part of the crate. rust-analyzer doesn't analyse files outside the crate. I asked it directly, with no TuiCode involved, for the definition ofget_env_varin that file and it returned nothing, even 30s after indexing finished. It also returns nothing for a copy of the file in a folder with noCargo.toml.In the same folder, with PR #496's build, Go to definition on
Appinsrc/main.rsjumps topub struct Appinsrc/app.rs. To try it ontest.rs, move it tosrc/and addmod test;tomain.rs, or make itsrc/bin/test.rs.rust-analyzer can be told about a loose file: its
linkedProjectssetting takes a.rsfile as well as aCargo.toml. If you’d like TuiCode to use that for files outside the crate, or to say "not part of a Cargo project" rather than "No definition found", I can open that as a follow-up. I've left this PR as it is.Settings › Language Servers picks the server for each language (#496)