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
use vetur for files with extention other than .vue
#2753
Comments
https://code.visualstudio.com/docs/languages/identifiers Follow the files.associations example here |
@jasonlyu123 Thanks. But I have that already I think? Updated the screenshot. As you can see, Vetur is working but complaining my legit vue content. |
Oh sorry jumped to the conclusion too fast. There's some code using the
The code here is used to tell typescript how to process the code. Maybe we can add a user config for other extensions. On another note, maybe you can jump into it and try to implement it yourself. I am not a core maintainer but I think maybe this way it would have more chances to happens. |
@jasonlyu123 Do you mean adding a new config entry in
|
A rough PR for it https://github.com/vuejs/vetur/pull/2759/files Haven't updated doc yet. |
#1616 (comment) We have refused to do this before |
I frankly don't think it's a good idea to limit Vetur to I was using Vetur for |
Ping. |
I will ask @octref about this question. |
@yoyo930021 sorry to bother. Any updates? Thanks. |
Also need support for |
@lzl124631x @mashirozx The purpose of this project is Vue SFC support. If not, I would suggest you fork the project for their own support. |
@yoyo930021 Uni-app is a Vue based app development framework, just like React Native. Sorry I can't find their English docs, but it's really popular in China. There can be .vue and .nvue files in a uni-app project. The .vue file goes into a webview based Vue compiler, and the .nvue file goes into native based weex compiler. The .nvue file does follow the Vue SFC. |
Vue syntax is not necessarily used for only web development. Take WeChat App for example, there are several frameworks using Vue syntax but they are not targeting web browser, nor use
They are using Vue SFC syntax.
Absolutely understandable. They are just vue variants. If Vetur doesn't support some of their special requirements, I absolutely agree that we don't need to support that -- we should only focus on Vue SFC itself. But just allowing Vetur to do syntax highlighting can benefit lots of those devs using those Vue variants. The investment for us would be minimal, just allowing them to configure the supported file extentions. And the return is way greater -- all those devs will appreciate it. |
@mashirozx @lzl124631x Uni-app is based on Vue and explicitly conforms to Vue SFC spec in their document.
In their document, it is only a framework and like Vue syntax. Ref:
If you only want syntax highlighting, you can copy vue syntax highlighting and open a new project. Or set |
@yoyo930021 Thank you! |
@yoyo930021 Thanks for the recommendations.
I've set this one so the Vetur is "working" on my |
|
FYI I recently did this in a (albeit highly customized) fork of Vetur here and here: Going from hard-coded |
I want to use vetur for files with extension
.wpy
instead of.vue
. How to achieve this?The text was updated successfully, but these errors were encountered: