mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 05:15:04 +00:00
Privatize highlighting
This commit is contained in:
parent
cdd7118cbf
commit
233f1dd2a8
8 changed files with 54 additions and 48 deletions
|
@ -4,7 +4,6 @@ import * as lc from 'vscode-languageclient';
|
|||
import * as commands from './commands';
|
||||
import { activateInlayHints } from './inlay_hints';
|
||||
import { StatusDisplay } from './status_display';
|
||||
import * as notifications from './notifications';
|
||||
import { Server } from './server';
|
||||
import { Ctx } from './ctx';
|
||||
import { activateHighlighting } from './highlighting';
|
||||
|
@ -35,14 +34,8 @@ export async function activate(context: vscode.ExtensionContext) {
|
|||
const watchStatus = new StatusDisplay(ctx.config.cargoWatchOptions.command);
|
||||
ctx.pushCleanup(watchStatus);
|
||||
|
||||
activateHighlighting(ctx);
|
||||
|
||||
// Notifications are events triggered by the language server
|
||||
const allNotifications: [string, lc.GenericNotificationHandler][] = [
|
||||
[
|
||||
'rust-analyzer/publishDecorations',
|
||||
notifications.publishDecorations.handle,
|
||||
],
|
||||
[
|
||||
'$/progress',
|
||||
params => watchStatus.handleProgressNotification(params),
|
||||
|
@ -61,6 +54,8 @@ export async function activate(context: vscode.ExtensionContext) {
|
|||
vscode.window.showErrorMessage(e.message);
|
||||
}
|
||||
|
||||
activateHighlighting(ctx);
|
||||
|
||||
if (ctx.config.displayInlayHints) {
|
||||
activateInlayHints(ctx);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue