https://bugs.kde.org/show_bug.cgi?id=521543

--- Comment #4 from [email protected] ---
It has been some time since I last looked through the LSP spec document [1]. 
By my reading, the absence of a '?' after "languageId" does indicate a required
field of TextDocumentItem.  That "... it is recommended that clients use those
ids." language sounds optional, but with no statement about an "else" case. 
Ah, ambiguity.

I made a quick check to get another opinion.  Qt Creator will also send
languageId with an empty string when made to pass a file with a "weird"
extension to a language server.  So the current Kate behavior is at least
consistent with another editor, and the wording in documentation seems no less
vague than the LSP spec.  Maybe there is no Kate bug here?

It might be helpful to provide a way to override languageId to appease a overly
picky server?  eg. allow "documentLanguageId" to have a string value, which
would be passed through verbatim.  However, I don't know if this level of
strictness is common enough to justify the effort.

[1]
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.18/specification/#textDocumentItem

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to