Skip to content

Commit

Permalink
fix: formatting not working for extra vue file extensions
Browse files Browse the repository at this point in the history
close #2263
  • Loading branch information
johnsoncodehk committed Dec 30, 2022
1 parent 8990ddc commit 95f960e
Showing 1 changed file with 3 additions and 3 deletions.
Expand Up @@ -107,11 +107,11 @@ const plugin: LanguageServerPlugin<VueServerInitializationOptions, vue.LanguageS
},
syntacticService: {
getLanguageModules(ts, env) {
const vueLanguagePlugins = vue2.getDefaultVueLanguagePlugins(ts, shared.getPathOfUri(env.rootUri.toString()), {}, {}, []);
const vueExts = getVueExts(['.vue']);
const vueOptions: vue.VueCompilerOptions = { extensions: getVueExts(['.vue']) };
const vueLanguagePlugins = vue2.getDefaultVueLanguagePlugins(ts, shared.getPathOfUri(env.rootUri.toString()), {}, vueOptions, []);
const vueLanguageModule: embedded.LanguageModule = {
createFile(fileName, snapshot) {
if (vueExts.some(ext => fileName.endsWith(ext))) {
if (vueOptions.extensions?.some(ext => fileName.endsWith(ext))) {
return new vue2.VueFile(fileName, snapshot, ts, vueLanguagePlugins);
}
},
Expand Down

0 comments on commit 95f960e

Please sign in to comment.