mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-29 13:25:09 +00:00
Add recursive expand in vscode
This commit is contained in:
parent
d2782ab1c1
commit
3ccd05fedc
8 changed files with 210 additions and 5 deletions
|
@ -3,6 +3,7 @@ import * as lc from 'vscode-languageclient';
|
|||
|
||||
import * as commands from './commands';
|
||||
import { CargoWatchProvider } from './commands/cargo_watch';
|
||||
import { ExpandMacroHoverProvider } from './commands/expand_macro'
|
||||
import { HintsUpdater } from './commands/inlay_hints';
|
||||
import {
|
||||
interactivelyStartCargoWatch,
|
||||
|
@ -91,11 +92,11 @@ export function activate(context: vscode.ExtensionContext) {
|
|||
const allNotifications: Iterable<
|
||||
[string, lc.GenericNotificationHandler]
|
||||
> = [
|
||||
[
|
||||
'rust-analyzer/publishDecorations',
|
||||
notifications.publishDecorations.handle
|
||||
]
|
||||
];
|
||||
[
|
||||
'rust-analyzer/publishDecorations',
|
||||
notifications.publishDecorations.handle
|
||||
]
|
||||
];
|
||||
const syntaxTreeContentProvider = new SyntaxTreeContentProvider();
|
||||
|
||||
// The events below are plain old javascript events, triggered and handled by vscode
|
||||
|
@ -121,6 +122,15 @@ export function activate(context: vscode.ExtensionContext) {
|
|||
context.subscriptions
|
||||
);
|
||||
|
||||
const expandMacroContentProvider = new ExpandMacroHoverProvider();
|
||||
|
||||
disposeOnDeactivation(
|
||||
vscode.languages.registerHoverProvider(
|
||||
'rust',
|
||||
expandMacroContentProvider
|
||||
)
|
||||
);
|
||||
|
||||
const startServer = () => Server.start(allNotifications);
|
||||
const reloadCommand = () => reloadServer(startServer);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue