Skip to content

lsp-server-name-too-short ​

LSP server names should be descriptive

Warning Configurable

Rule Details ​

This rule checks the top-level keys in lsp.json, which serve as server names, and warns when any name is shorter than the configured minimum length. Descriptive names like typescript-server or python-lsp make configurations easier to maintain and debug.

Incorrect ​

Server name that is too short

json
{
  "t": {
    "command": "/usr/bin/tsserver"
  }
}

Correct ​

Descriptive server name

json
{
  "typescript-server": {
    "command": "/usr/bin/tsserver"
  }
}

How To Fix ​

Rename the server key to a more descriptive name that identifies the language or purpose, such as typescript-server, python-lsp, or rust-analyzer.

Options ​

Default options:

json
{
  "minLength": 2
}

Require server names of at least 3 characters:

json
{
  "minLength": 3
}

When Not To Use It ​

Disable this rule if you have an established convention using short abbreviations for server names that are well-understood by your team.

Resources ​

Version ​

Available since: v0.2.0