pub enum LanguageId {
Show 26 variants
Rust,
Python,
JavaScript,
JavaScriptReact,
TypeScript,
TypeScriptReact,
Go,
Java,
C,
Cpp,
CSharp,
Ruby,
Php,
Swift,
Kotlin,
Scala,
Html,
Css,
Json,
Yaml,
Toml,
Markdown,
Xml,
Sql,
ShellScript,
PlainText,
}Expand description
Identifies a programming language for LSP server selection.
LanguageId maps languages to their LSP server configuration, file extensions, and protocol identifiers. The daemon uses this to determine which language server to spawn and which files to associate with it.
§Detection
from_extension– Detect from a file extension (e.g."rs"→Rust).from_path– Detect from a file path. Falls back toPlainTextfor unknown extensions.from_lsp_id– Parse an LSP language ID string (e.g."typescriptreact"→TypeScriptReact).as_str– Get the LSP language ID string for this variant.
§Supported language servers
| Server | Languages | Env override |
|---|---|---|
rust-analyzer | Rust | AETHER_LSPD_SERVER_COMMAND_RUST_ANALYZER |
typescript-language-server | JavaScript, JSX, TypeScript, TSX | AETHER_LSPD_SERVER_COMMAND_TYPESCRIPT_LANGUAGE_SERVER |
pyright-langserver | Python | AETHER_LSPD_SERVER_COMMAND_PYRIGHT |
gopls | Go | AETHER_LSPD_SERVER_COMMAND_GOPLS |
clangd | C, C++ | AETHER_LSPD_SERVER_COMMAND_CLANGD |
Languages without a configured server (Java, Ruby, etc.) can still be identified but won’t have LSP support.
§Server pooling
Languages that share a server implementation also share a daemon socket. For example, TypeScript and TSX both use typescript-language-server, so socket_path returns the same path for both. This avoids spawning duplicate server processes.
§Metadata
LANGUAGE_METADATA provides a static list of all language entries with their extensions, aliases, and primary extension. Use metadata_for to look up a single language, or extensions_for_alias to find all file extensions matching a language name.
Variants§
Rust
Python
JavaScript
JavaScriptReact
TypeScript
TypeScriptReact
Go
Java
C
Cpp
CSharp
Ruby
Php
Swift
Kotlin
Scala
Html
Css
Json
Yaml
Toml
Markdown
Xml
Sql
ShellScript
PlainText
Implementations§
Source§impl LanguageId
impl LanguageId
Trait Implementations§
Source§impl Clone for LanguageId
impl Clone for LanguageId
Source§fn clone(&self) -> LanguageId
fn clone(&self) -> LanguageId
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more