Show type decorators
This commit is contained in:
@@ -3,6 +3,7 @@ import * as lc from 'vscode-languageclient';
|
||||
|
||||
import * as commands from './commands';
|
||||
import { CargoWatchProvider } from './commands/cargo_watch';
|
||||
import { HintsUpdater } from './commands/inlay_hints';
|
||||
import {
|
||||
interactivelyStartCargoWatch,
|
||||
startCargoWatch
|
||||
@@ -147,6 +148,16 @@ export function activate(context: vscode.ExtensionContext) {
|
||||
|
||||
// Start the language server, finally!
|
||||
startServer();
|
||||
|
||||
if (Server.config.displayInlayHints) {
|
||||
const hintsUpdater = new HintsUpdater();
|
||||
hintsUpdater.loadHints(vscode.window.activeTextEditor).then(() => {
|
||||
vscode.window.onDidChangeActiveTextEditor(editor => hintsUpdater.loadHints(editor));
|
||||
vscode.workspace.onDidChangeTextDocument(e => hintsUpdater.updateHints(e));
|
||||
vscode.workspace.onDidCloseTextDocument(document => hintsUpdater.dropHints(document));
|
||||
vscode.workspace.onDidChangeConfiguration(_ => hintsUpdater.toggleHintsDisplay(Server.config.displayInlayHints));
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
export function deactivate(): Thenable<void> {
|
||||
|
||||
Reference in New Issue
Block a user