Skip to content

Commit d0f2b04

Browse files
lostintangentkrvajal
authored andcommitted
Restricting language services to local files (#49)
1 parent 44f1364 commit d0f2b04

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import FortranHoverProvider from "./features/hover-provider";
66
import { FortranCompletionProvider } from "./features/completion-provider";
77
import { FortranDocumentSymbolProvider } from "./features/document-symbol-provider";
88

9-
const FORTRAN_FREE_FORM_ID = "fortran_free-form";
9+
const FORTRAN_FREE_FORM_ID = { language: "fortran_free-form", scheme: "file" };
1010

1111
export function activate(context: vscode.ExtensionContext) {
1212
let hoverProvider = new FortranHoverProvider();

src/features/linter-provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ export default class FortranLintingProvider {
1515
private doModernFortranLint(textDocument: vscode.TextDocument) {
1616
const errorRegex: RegExp = /^([a-zA-Z]:\\)*([^:]*):([0-9]+):([0-9]+):\s+(.*)\s+.*?\s+(Error|Warning|Fatal Error):\s(.*)$/gm;
1717

18-
if (textDocument.languageId !== LANGUAGE_ID) {
18+
if (textDocument.languageId !== LANGUAGE_ID || textDocument.uri.scheme !== "file") {
1919
return;
2020
}
2121
let decoded = "";

0 commit comments

Comments
 (0)