Skip to content

Commit 7afcf8b

Browse files
committed
Makes main parts of the extension async
Not sure if that has any real impact on performance. Fixes Convert extension to async #285
1 parent 6877c6a commit 7afcf8b

File tree

4 files changed

+5
-3
lines changed

4 files changed

+5
-3
lines changed

CHANGELOG.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,8 @@ and this project adheres to [Semantic Versioning](http://semver.org/).
1818

1919
- Changes the interface of the extension to accommodate for the newest features
2020
([#292](https://github.com/krvajal/vscode-fortran-support/issues/292))
21+
- Changes main parts of the extension to being asynchronous
22+
([#285](https://github.com/krvajal/vscode-fortran-support/issues/285))
2123

2224
### Added
2325

src/extension.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ import { EXTENSION_ID, FortranDocumentSelector, promptForMissingTool } from './l
1717
// Make it global to catch errors when activation fails
1818
const loggingService = new LoggingService();
1919

20-
export function activate(context: vscode.ExtensionContext) {
20+
export async function activate(context: vscode.ExtensionContext) {
2121
const config = vscode.workspace.getConfiguration(EXTENSION_ID);
2222
const linterType = config.get<string>('linter.compiler');
2323
const formatterType = config.get<string>('formatting.formatter');

src/features/fortls-interface.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ export class FortranLanguageServer {
1616
private clients: Map<string, LanguageClient> = new Map();
1717
private _fortlsVersion: string | undefined;
1818

19-
public activate(disposables: Disposable[]) {
19+
public async activate(disposables: Disposable[]) {
2020
workspace.onDidOpenTextDocument(this.didOpenTextDocument, this, disposables);
2121
workspace.textDocuments.forEach(this.didOpenTextDocument, this);
2222
return;

src/features/linter-provider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ export class FortranLintingProvider {
2727
return;
2828
}
2929

30-
public activate(subscriptions: vscode.Disposable[]) {
30+
public async activate(subscriptions: vscode.Disposable[]) {
3131
this.diagnosticCollection = vscode.languages.createDiagnosticCollection('Fortran');
3232

3333
vscode.workspace.onDidOpenTextDocument(this.doModernFortranLint, this, subscriptions);

0 commit comments

Comments
 (0)