diff --git a/source/served/commands/calltips.d b/source/served/commands/calltips.d index d55eef2..2894023 100644 --- a/source/served/commands/calltips.d +++ b/source/served/commands/calltips.d @@ -123,9 +123,9 @@ SignatureHelp provideSignatureHelp(TextDocumentPositionParams params) { auto document = documents[params.textDocument.uri]; string file = document.uri.uriToFile; - if (document.languageId == "d") + if (document.getLanguageId == "d") return provideDSignatureHelp(params, file, document); - else if (document.languageId == "diet") + else if (document.getLanguageId == "diet") return provideDietSignatureHelp(params, file, document); else return SignatureHelp.init; diff --git a/source/served/commands/code_lens.d b/source/served/commands/code_lens.d index b2a72ce..605486c 100644 --- a/source/served/commands/code_lens.d +++ b/source/served/commands/code_lens.d @@ -22,7 +22,7 @@ CodeLens[] provideCodeLens(CodeLensParams params) { auto document = documents[params.textDocument.uri]; string file = document.uri.uriToFile; - if (document.languageId != "d") + if (document.getLanguageId != "d") return []; CodeLens[] ret; if (workspace(params.textDocument.uri).config.d.enableDMDImportTiming) diff --git a/source/served/commands/definition.d b/source/served/commands/definition.d index 4dc57de..34ea98c 100644 --- a/source/served/commands/definition.d +++ b/source/served/commands/definition.d @@ -105,7 +105,7 @@ ArrayOrSingle!Location provideDefinition(TextDocumentPositionParams params) return ArrayOrSingle!Location.init; auto document = documents[params.textDocument.uri]; - if (document.languageId != "d") + if (document.getLanguageId != "d") return ArrayOrSingle!Location.init; auto result = findDeclarationImpl(instance, document, @@ -125,7 +125,7 @@ Hover provideHover(TextDocumentPositionParams params) return Hover.init; auto document = documents[params.textDocument.uri]; - if (document.languageId != "d") + if (document.getLanguageId != "d") return Hover.init; DCDComponent dcd = instance.get!DCDComponent(); diff --git a/source/served/commands/format.d b/source/served/commands/format.d index 74a1818..8802bda 100644 --- a/source/served/commands/format.d +++ b/source/served/commands/format.d @@ -132,7 +132,7 @@ TextEdit[] provideFormatting(DocumentFormattingParams params) auto config = workspace(params.textDocument.uri).config; auto document = documents[params.textDocument.uri]; string result; - if (document.languageId == "d") + if (document.getLanguageId == "d") { if (!config.d.enableFormatting) return []; @@ -141,7 +141,7 @@ TextEdit[] provideFormatting(DocumentFormattingParams params) result = backend.get!DfmtComponent.format(document.rawText, generateDfmtArgs(config, document.eolAt(0))).getYield; } - else if (document.languageId == "sdl") + else if (document.getLanguageId == "sdl") { if (!config.sdl.enableFormatting) return []; @@ -163,7 +163,7 @@ TextEdit[] provideFormatting(DocumentFormattingParams params) } else { - trace("attemted to format code that has unsupported language: '", document.languageId, "'"); + trace("attemted to format code that has unsupported language: '", document.getLanguageId, "'"); return []; } return diff(document, result); diff --git a/source/served/commands/symbol_search.d b/source/served/commands/symbol_search.d index cb60b0c..50231fa 100644 --- a/source/served/commands/symbol_search.d +++ b/source/served/commands/symbol_search.d @@ -76,7 +76,7 @@ SymbolInformationEx[] provideDocumentSymbolsOld(DocumentSymbolParamsEx params) if (cached.symbolsVerbose.length) return params.verbose ? cached.symbolsVerbose : cached.symbols; auto document = documents.tryGet(params.textDocument.uri); - if (document.languageId != "d") + if (document.getLanguageId != "d") return null; auto result = backend.best!DscannerComponent(params.textDocument.uri.uriToFile)