diff --git a/server/src/lfortran-accessors.ts b/server/src/lfortran-accessors.ts index 99c3fb5..e499256 100644 --- a/server/src/lfortran-accessors.ts +++ b/server/src/lfortran-accessors.ts @@ -508,6 +508,9 @@ export class LFortranCLIAccessor implements LFortranAccessor { for (let i = 0; i < k; i++) { const diagnostic: Diagnostic = results.diagnostics[i]; diagnostic.source = "lfortran-lsp"; + if (!uri.includes(".ts")) { + diagnostic.range.start.line--; + } diagnostic.range.start.character--; diagnostics.push(diagnostic); }