-
-
Notifications
You must be signed in to change notification settings - Fork 594
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
Explore TS Plugin support in Vetur by integrating znck/developer-experience's refactor support #2016
Labels
Comments
Linking to microsoft/TypeScript#38736 which I think is request for a tsc only version of the pattern |
This looks like a very promising project. @octref what's the word? 🙂 |
No update yet, this will take a lot of time and effort. If you want to see more development, you can consider sponsoring my work: https://github.com/sponsors/octref |
This was referenced Oct 12, 2020
Closed
4 tasks
3 tasks
This was referenced Jun 14, 2021
6 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Chatted with @znck, here's a summary:
znck/vue-developer-experience is a TS Plugin that uses a virtual file system to support Vue files. Currently it only supports Vue 3 but not Vue 2, because it creates virtual files without modifying AST (so you cannot wrap
export default {}
toexport default Vue.extend({})
. It adds most TS language features to Vue files.Vetur currently has limitations that can only be solved by a TS Plugin. For example, rename/refactor in JS/TS files should generate changes across a project's JS/TS/Vue files, but with Vetur's current approach it won't support Vue files, so renaming might create compiler errors.
A lot of Vetur's static analysis code can live either in language server or in a TS Plugin, but both have their limitations:
Me and @znck will try a MVP to validate if it's possible to integrate our work:
Add a TS Plugin to Vetur, drop Vetur's refactor support (but keep others such as auto-completion), and delegate that to the TS Plugin
This work should make rename and other refactor work across JS/TS/Vue files.
This will exist as a separate branch/build, as it only supports Vue 3. Once we validate the idea we can try integrating the work into Vetur.
Todo:
Once we are done with above, we can try if it's possible to do AST transform in a TS Plugin, so we could support Vue 2. Considering that we have done that in Vetur, it shouldn't be hard.
/cc @znck @ktsn
Might be of your interest as well @orta @DanielRosenwasser
The text was updated successfully, but these errors were encountered: