microsoft / microsoft/language-server-protocol

languageId handling ambigious

Open
#2,282 5 comments 0 reactions 1 assignee View on GitHub

@dbaeumer is already working on this.

Since Jun 25, 2026.

Dominant language
TypeScript
Stars
13k
Forks
1k
Avg merge
6d 1h
Merged PRs (30d)
10

Description

As I read it, languageId is a required field of TextDocumentItem. However, the wording seems to me to be ambiguous about what a client should send if a language can't be detected, or is not among the table entries. Also, what should a server do when given an unknown languageId?

I have tested two editors (Kate and Qt Creator) which send an empty string. Kate will send the server executable name by default, and can be configured to send an empty string instead. I also find one server which uses systemverilog and verilog, and treats unknown values as parsing errors.

https://github.com/microsoft/language-server-protocol/blob/ce9abfe771b34f233f35397a3c2dd396d82ecd12/_specifications/lsp/3.18/types/textDocumentItem.md?plain=1#L30

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.