refactor: share language IDs with indentation configuration
This commit is contained in:
+3
-3
@@ -11,9 +11,9 @@ pub fn resolve(value: Value) -> Result<Vec<ServerConfig>, String> {
|
||||
return Err("LSP language keys must not be empty or contain control characters".into());
|
||||
}
|
||||
let preset: Option<(&[&[&str]], &str)> = match language_id.as_str() {
|
||||
"rust" => Some((&[&["rust-analyzer"]], "rs")),
|
||||
"python" => Some((&[&["ty", "server"], &["ruff", "server"]], "py")),
|
||||
"ruby" => Some((&[&["solargraph", "stdio"]], "rb")),
|
||||
crate::syntax::RUST_ID => Some((&[&["rust-analyzer"]], "rs")),
|
||||
crate::syntax::PYTHON_ID => Some((&[&["ty", "server"], &["ruff", "server"]], "py")),
|
||||
crate::syntax::RUBY_ID => Some((&[&["solargraph", "stdio"]], "rb")),
|
||||
_ => None,
|
||||
};
|
||||
let mut options = match value {
|
||||
|
||||
Reference in New Issue
Block a user