File tree Expand file tree Collapse file tree 5 files changed +5
-29
lines changed Expand file tree Collapse file tree 5 files changed +5
-29
lines changed Original file line number Diff line number Diff line change @@ -202,7 +202,7 @@ connection.onInitialize(params => {
202202 language ,
203203 server . languageServicePlugins ,
204204 createLanguageServiceEnvironment ( server , [ ...server . workspaceFolders . all ] ) ,
205- { vue : { compilerOptions : commonLine . vueOptions } } ,
205+ { } ,
206206 ) ;
207207 }
208208} ) ;
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ export * from '@volar/language-service';
44// for @vue /language-server usage
55export * from '@volar/language-service/lib/utils/featureWorkers' ;
66
7- import type { VueCompilerOptions } from '@vue/language-core' ;
87import type * as ts from 'typescript' ;
98
109import { create as createEmmetPlugin } from 'volar-service-emmet' ;
@@ -32,14 +31,6 @@ import { create as createVueTemplatePlugin } from './lib/plugins/vue-template';
3231import { create as createVueTemplateRefLinksPlugin } from './lib/plugins/vue-template-ref-links' ;
3332import { create as createVueTwoslashQueriesPlugin } from './lib/plugins/vue-twoslash-queries' ;
3433
35- declare module '@volar/language-service' {
36- export interface ProjectContext {
37- vue ?: {
38- compilerOptions : VueCompilerOptions ;
39- } ;
40- }
41- }
42-
4334export function createVueLanguageServicePlugins (
4435 ts : typeof import ( 'typescript' ) ,
4536 tsPluginClient :
Original file line number Diff line number Diff line change @@ -24,14 +24,8 @@ export function create(
2424 documentDropEditsProvider : true ,
2525 } ,
2626 create ( context ) {
27- if ( ! context . project . vue ) {
28- return { } ;
29- }
30-
31- let casing = TagNameCasing . Pascal as TagNameCasing ; // TODO
32-
3327 const tsPluginClient = getTsPluginClient ?.( context ) ;
34- const vueCompilerOptions = context . project . vue . compilerOptions ;
28+ let casing = TagNameCasing . Pascal as TagNameCasing ; // TODO
3529
3630 return {
3731 async provideDocumentDropEdits ( document , _position , dataTransfer ) {
@@ -57,7 +51,7 @@ export function create(
5751 importUri = item . value as string ;
5852 }
5953 }
60- if ( ! importUri || ! vueCompilerOptions . extensions . some ( ext => importUri . endsWith ( ext ) ) ) {
54+ if ( ! importUri || ! root . vueCompilerOptions . extensions . some ( ext => importUri . endsWith ( ext ) ) ) {
6155 return ;
6256 }
6357
@@ -76,8 +70,7 @@ export function create(
7670 code . id === ( sfc . scriptSetup ? 'scriptsetup_raw' : 'script_raw' )
7771 ) ! ;
7872 const lastImportNode = getLastImportNode ( ts , script . ast ) ;
79- const incomingFileName = context . project . typescript ?. uriConverter . asFileName ( URI . parse ( importUri ) )
80- ?? URI . parse ( importUri ) . fsPath . replace ( / \\ / g, '/' ) ;
73+ const incomingFileName = URI . parse ( importUri ) . fsPath . replace ( / \\ / g, '/' ) ;
8174
8275 let importPath : string | undefined ;
8376
Original file line number Diff line number Diff line change @@ -30,10 +30,6 @@ export function create(
3030 return ;
3131 }
3232
33- if ( ! context . project . vue ) {
34- return ;
35- }
36-
3733 const enabled = await context . env . getConfiguration < boolean > ?. ( 'vue.inlayHints.missingProps' ) ?? false ;
3834 if ( ! enabled ) {
3935 return ;
@@ -126,7 +122,7 @@ export function create(
126122 attrText = attrText . slice ( 'v-model:' . length ) ;
127123 }
128124 else if ( attrText === 'v-model' ) {
129- attrText = context . project . vue . compilerOptions . target >= 3 ? 'modelValue' : 'value' ; // TODO: support for experimentalModelPropName?
125+ attrText = root . vueCompilerOptions . target >= 3 ? 'modelValue' : 'value' ; // TODO: support for experimentalModelPropName?
130126 }
131127 else if ( attrText . startsWith ( 'v-on:' ) ) {
132128 attrText = 'on-' + hyphenateAttr ( attrText . slice ( 'v-on:' . length ) ) ;
Original file line number Diff line number Diff line change @@ -162,10 +162,6 @@ export function create(
162162 return ;
163163 }
164164
165- if ( ! context . project . vue ) {
166- return ;
167- }
168-
169165 const uri = URI . parse ( document . uri ) ;
170166 const decoded = context . decodeEmbeddedDocumentUri ( uri ) ;
171167 const sourceScript = decoded && context . language . scripts . get ( decoded [ 0 ] ) ;
You can’t perform that action at this time.
0 commit comments