File tree Expand file tree Collapse file tree
language-server/src/patches
vscode/src/project/routers Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ ---
2+ " @arkts/language-server " : patch
3+ " vscode-naily-ets " : patch
4+ ---
5+
6+ feat: 屏蔽 json/json5 文件中 TS 服务提供的无用跳转和补全 (#206 )
Original file line number Diff line number Diff line change @@ -202,6 +202,8 @@ export function patchSemantic(typescriptServices: LanguageServicePlugin[]): void
202202 } ,
203203
204204 async provideHover ( document , position , token ) {
205+ // 补丁:关闭 json 文件的悬浮提示功能
206+ if ( document . languageId === 'json' || document . languageId === 'jsonc' ) return null
205207 // Hover补丁:提供注解装饰器的悬浮提示 (Decorator For Annotation)
206208 const annotationDecoratorHover = provideAnnotationDecoratorHover ( document , document . offsetAt ( position ) )
207209 if ( annotationDecoratorHover ) return annotationDecoratorHover
@@ -216,6 +218,12 @@ export function patchSemantic(typescriptServices: LanguageServicePlugin[]): void
216218 if ( callExpressionHover ) return callExpressionHover
217219 return instance . provideHover ?.( document , position , token )
218220 } ,
221+
222+ async provideDefinition ( document , position , token ) {
223+ // 补丁:关闭 json 文件的跳转定义功能
224+ if ( document . languageId === 'json' || document . languageId === 'jsonc' ) return null
225+ return instance . provideDefinition ?.( document , position , token )
226+ } ,
219227 }
220228 }
221229}
Original file line number Diff line number Diff line change @@ -57,19 +57,19 @@ declare module 'vue-router/auto-routes' {
5757 * @internal
5858 */
5959 export interface _RouteFileInfoMap {
60- 'packages/vscode/ src/project/pages/index.vue' : {
60+ 'src/project/pages/index.vue' : {
6161 routes :
6262 | '/'
6363 views :
6464 | never
6565 }
66- 'packages/vscode/ src/project/pages/template-detail.vue' : {
66+ 'src/project/pages/template-detail.vue' : {
6767 routes :
6868 | '/template-detail'
6969 views :
7070 | never
7171 }
72- 'packages/vscode/ src/project/pages/template-market.vue' : {
72+ 'src/project/pages/template-market.vue' : {
7373 routes :
7474 | '/template-market'
7575 views :
You can’t perform that action at this time.
0 commit comments