You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since version 1.0, in order to use volar with the "pug" language, we have to install the @volar/vue-language-plugin-pug dev dependency and configure TypeScript to use the additional vueCompilerOptions.
This has been done in order to separate the support for a feature that not everybody uses, which is a legitimate concern and works out well when following the upgrade instructions.
I have a minor concern, though, regarding the method of installing the support for pug support/capability, as it requires adding configuration related to the IDE I'm using to the repository, which I would prefer not to do. For example, If I chose to use Sublime Text, Jetbrains products, or VsCode; I would usually not have to commit configuration files for those editors to my repo. That way, people contributing to the repo can choose whatever IDE works best for them as long as they follow the lining/prettier/TS rules. But by adding some configuration explicitly referencing Volar, I would now imply that the expected editor for the repo is VsCode+Volar.
Thus, while I understand this would most likely be seen as a low-priority matter, I would like to ask If there would be an alternative way to use Volar + its pug plugin that would rely for example on installing the plugin globally, or if there are some changes planned in the future that would allow not to change the dependency/TS configuration in order to use it? Or maybe this was already considered and there was no acceptable solution found to do this so far?
The text was updated successfully, but these errors were encountered:
Hi @CamilleDrapier, @volar/vue-language-plugin-pug and vueCompilerOptions is not related to IDE, it's about how @volar/vue-language-core resolve SFC file, and it will affect to @volar/vue-language-server, vue-tsc, coc-volar... and all downstream modules. (Just for clearer, if you don't have @volar/vue-language-plugin-pug, vue-tsc can't type check for pug template)
So don't worry you have not pushing VSCode specific stuff to the repo. :) (And I did take this into consideration when designing the architecture.)
I guess you see the problem is @volar/vue-language-plugin-pug current depend with some modules that related to LSP (@volar/pug-language-service...), this a implement problem of @volar/vue-language-plugin-pug, we will abstract pug parsing logic from @volar/pug-language-service to a basic module to avoid this problem.
@johnsoncodehk Thanks for your prompt reply and detailed explanations!
Sorry, I was not using vue-tsc so far, so I incorrectly thought the @volar/vue-language-plugin-pug and vueCompilerOptions was only meant to be used by the volar extension, but indeed after installing vue-tsc I can check the errors in CI and such by running vue-tsc --noEmit. This is incredibly useful as I was looking for a way to better validate templates automatically (having it in the editor is nice, but having it checked by CI is even better!)
As for the second problem you rose, I wasn't really aware of it, but if you want to use this issue to track it, then please do.
Thank you for providing this very nice plugin!
Since version 1.0, in order to use volar with the "pug" language, we have to install the
@volar/vue-language-plugin-pug
dev dependency and configure TypeScript to use the additionalvueCompilerOptions
.This has been done in order to separate the support for a feature that not everybody uses, which is a legitimate concern and works out well when following the upgrade instructions.
I have a minor concern, though, regarding the method of installing the support for pug support/capability, as it requires adding configuration related to the IDE I'm using to the repository, which I would prefer not to do. For example, If I chose to use Sublime Text, Jetbrains products, or VsCode; I would usually not have to commit configuration files for those editors to my repo. That way, people contributing to the repo can choose whatever IDE works best for them as long as they follow the lining/prettier/TS rules. But by adding some configuration explicitly referencing Volar, I would now imply that the expected editor for the repo is VsCode+Volar.
Thus, while I understand this would most likely be seen as a low-priority matter, I would like to ask If there would be an alternative way to use Volar + its pug plugin that would rely for example on installing the plugin globally, or if there are some changes planned in the future that would allow not to change the dependency/TS configuration in order to use it? Or maybe this was already considered and there was no acceptable solution found to do this so far?
The text was updated successfully, but these errors were encountered: