We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dd083d3 commit 8e437f0Copy full SHA for 8e437f0
src/monaco/ls.ts
@@ -520,6 +520,18 @@ export async function setupLs(modelsMap: Ref<Map<string, monaco.editor.ITextMode
520
}
521
},
522
}),
523
+ // same with DefinitionProvider
524
+ monaco.languages.registerDeclarationProvider(lang, {
525
+ provideDeclaration: async (model, position) => {
526
+ const codeResult = await ls.findDefinition(
527
+ model.uri.toString(),
528
+ monaco2code.asPosition(position),
529
+ );
530
+ if (codeResult) {
531
+ return codeResult.map(code2monaco.asLocation);
532
+ }
533
+ },
534
+ }),
535
);
536
537
return ls;
0 commit comments