Skip to content
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

Add Matchit support for Vue.js files #441

Merged
merged 1 commit into from
Jan 14, 2022
Merged

Add Matchit support for Vue.js files #441

merged 1 commit into from
Jan 14, 2022

Conversation

DanEEStar
Copy link
Contributor

Rebased the changes from #421 to master.

This feature adds support for single file Vue components which have its own .vue-extension and are a "mixture" of a HTML-Template, JavaScript- and CSS-code. (A bit similar to JSX-files...)
With this added "Vue.js" fileType they work now as expected.

@AlexPl292
Copy link
Member

Hi, thank you for your contribution!
Do you mean that IJ returns a special vue.js value in virtualFile?.fileType?.name for vue.js file? And not JavaScript?

@DanEEStar
Copy link
Contributor Author

Do you mean that IJ returns a special vue.js value in virtualFile?.fileType?.name for vue.js file? And not JavaScript?

Yes, exactly that! virtualFile?.fileType?.name will have the value "Vue.js" for *.vue vue-component files.
I checked that with some added logging in a custom build of the IdeaVim plugin.

Vue Single File Components do also contain HTML-code. With this added "Vue.js" value in htmlLikeFileTypes matchit also works in them! (At least in my custom build, not in the current IdeaVim version... 😄)

@AlexPl292
Copy link
Member

Oh, I see now. Okay, great, let's merge it :)

@AlexPl292 AlexPl292 merged commit 4d9c606 into JetBrains:master Jan 14, 2022
@DanEEStar
Copy link
Contributor Author

👍 Thanks for your great work with IdeaVim!

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.

2 participants