LSP: Add godot to known language ids
(cherry picked from commit 9c72dafbe6443b61c5dda39b63edd261e9034989)
This commit is contained in:
committed by
Thaddeus Crews
parent
cbdc2a2d85
commit
0762732d4d
@@ -695,10 +695,12 @@ struct TextDocumentItem {
|
||||
version = p_dict["version"];
|
||||
text = p_dict["text"];
|
||||
|
||||
// Clients should use "gdscript" as language id, but we can't enforce it. The Rider integration
|
||||
// in particular uses "gd" at the time of writing. We normalize the id to make it easier to work with.
|
||||
// Clients should use "gdscript" as language id, but we can't enforce it.
|
||||
// We normalize some known ids to make them easier to work with:
|
||||
// Rider < 2026.1: "gd"
|
||||
// Kate: "godot"
|
||||
String rawLanguageId = p_dict["languageId"];
|
||||
if (rawLanguageId == "gdscript" || rawLanguageId == "gd") {
|
||||
if (rawLanguageId == "gdscript" || rawLanguageId == "gd" || rawLanguageId == "godot") {
|
||||
languageId = LanguageId::GDSCRIPT;
|
||||
} else {
|
||||
languageId = LanguageId::OTHER;
|
||||
|
||||
Reference in New Issue
Block a user