Thanks to visit codestin.com
Credit goes to github.com

Skip to content

fix(vscode): make sure tsserver loads @vue/typescript-plugin last #5483

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
Jul 6, 2025

Conversation

johnsoncodehk
Copy link
Member

@johnsoncodehk johnsoncodehk commented Jul 6, 2025

@johnsoncodehk johnsoncodehk requested a review from Copilot July 6, 2025 20:18
Copy link

pkg-pr-new bot commented Jul 6, 2025

Open in StackBlitz

vue-component-meta

npm i https://pkg.pr.new/vuejs/language-tools/vue-component-meta@5483

vue-component-type-helpers

npm i https://pkg.pr.new/vuejs/language-tools/vue-component-type-helpers@5483

@vue/language-core

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-core@5483

@vue/language-plugin-pug

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-plugin-pug@5483

@vue/language-server

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-server@5483

@vue/language-service

npm i https://pkg.pr.new/vuejs/language-tools/@vue/language-service@5483

vue-tsc

npm i https://pkg.pr.new/vuejs/language-tools/vue-tsc@5483

@vue/typescript-plugin

npm i https://pkg.pr.new/vuejs/language-tools/@vue/typescript-plugin@5483

commit: 9df050e

Copy link

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR ensures that the Vue TypeScript plugin is always placed last in the tsserver plugin load order for VSCode.

  • Adds a .sort() call to the patched readFileSync output so that "vue-typescript-plugin-pack" is ordered at the end.
  • Updates the VSCode extension’s index.ts to inject the sorting logic whenever --globalPlugins is loaded.
Comments suppressed due to low confidence (2)

extensions/vscode/index.ts:202

  • There’s no existing test to verify that the Vue plugin is moved to the end. Consider adding a unit test for the patched output to ensure the sort behavior works as intended.
			// sort plugins for johnsoncodehk.tsslint, zardoy.ts-essential-plugins

extensions/vscode/index.ts:206

  • The hardcoded plugin identifier here ("vue-typescript-plugin-pack") may not match the actual package name (e.g. @vue/typescript-plugin). Verify the correct plugin.name value or reference it dynamically to ensure the sort actually applies.
					s + '.sort((a,b)=>(b.name==="vue-typescript-plugin-pack"?-1:0)-(a.name==="vue-typescript-plugin-pack"?-1:0))',

Ilanaya added a commit to zardoy/typescript-vscode-plugins that referenced this pull request Jul 6, 2025
Vue Official made patching plugin order on their side. See issue - vuejs/language-tools#5483, discord thread - https://discord.com/channels/325477692906536972/1391386265986793564
@johnsoncodehk johnsoncodehk merged commit 34b5dd2 into master Jul 6, 2025
10 checks passed
@johnsoncodehk johnsoncodehk deleted the sort-plugins branch July 6, 2025 23:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant