Skip to content

Commit 1932c1c

Browse files
liangmiQwQKazariEX
andauthored
fix(language-service): use default html data provider for document symbols (#5968)
Co-authored-by: KazariEX <zinkawaii@qq.com>
1 parent 2908ca8 commit 1932c1c

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

packages/language-service/lib/plugins/vue-template.ts

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -596,6 +596,22 @@ export function create(
596596
}
597597
}
598598
},
599+
600+
provideDocumentSymbols(document, token) {
601+
if (document.languageId !== languageId) {
602+
return;
603+
}
604+
const info = resolveEmbeddedCode(context, document.uri);
605+
if (info?.code.id !== 'template') {
606+
return;
607+
}
608+
609+
updateExtraCustomData([
610+
html.getDefaultHTMLDataProvider(),
611+
]);
612+
613+
return baseServiceInstance.provideDocumentSymbols?.(document, token);
614+
},
599615
};
600616

601617
async function runWithVueDataProvider<T>(

0 commit comments

Comments
 (0)