Skip to content

Commit

Permalink
Warn users about libraries not being available inside the Dafny IDE (#…
Browse files Browse the repository at this point in the history
…454)

Warn users about libraries not being available inside the Dafny IDE

### Testing

Manually tested
  • Loading branch information
keyboardDrummer committed Dec 8, 2023
1 parent 1908ff5 commit 471a39d
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion src/extension.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { Disposable, ExtensionContext, OutputChannel, window, commands } from 'vscode';
import { Disposable, ExtensionContext, OutputChannel, window, workspace, commands, Uri, CancellationToken } from 'vscode';
import { ExtensionConstants, LanguageServerConstants } from './constants';
import { DafnyCommands } from './commands';
import { DafnyLanguageClient } from './language/dafnyLanguageClient';
Expand Down Expand Up @@ -44,6 +44,13 @@ class ExtensionRuntime {
}

public async initialize(): Promise<void> {
workspace.registerTextDocumentContentProvider('dafny', {
// eslint-disable-next-line @typescript-eslint/no-unused-vars
provideTextDocumentContent: function(uri: Uri, token: CancellationToken) {
return '// Viewing Dafny libraries in the Dafny IDE is not yet supported.';
}
});

await this.startClientAndWaitForVersion();
createAndRegisterDafnyIntegration(this.installer, this.client!, this.languageServerVersion!);
commands.registerCommand(DafnyCommands.RestartServer, restartServer);
Expand Down

0 comments on commit 471a39d

Please sign in to comment.