lsp-language-id-empty
LSP language IDs cannot be empty
Error
Rule Details
This rule checks the values in the extensionToLanguage mapping of each LSP server entry in lsp.json and reports an error when a language ID is an empty string or contains only whitespace. Language IDs are used to identify the programming language for syntax highlighting, diagnostics, and other language server features. An empty language ID prevents proper language detection.
Incorrect
Empty language ID value
json
{
"my-server": {
"command": "/usr/bin/my-server",
"extensionToLanguage": {
".ts": "",
".js": " "
}
}
}Correct
Non-empty language IDs
json
{
"my-server": {
"command": "/usr/bin/my-server",
"extensionToLanguage": {
".ts": "typescript",
".js": "javascript"
}
}
}How To Fix
Provide a valid language ID string for each extension in the extensionToLanguage mapping. Common language IDs include typescript, javascript, python, rust, go, and java.
Options
This rule does not have any configuration options.
Related Rules
Resources
Version
Available since: v0.2.0