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 => {
202
202
language ,
203
203
server . languageServicePlugins ,
204
204
createLanguageServiceEnvironment ( server , [ ...server . workspaceFolders . all ] ) ,
205
- { vue : { compilerOptions : commonLine . vueOptions } } ,
205
+ { } ,
206
206
) ;
207
207
}
208
208
} ) ;
Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ export * from '@volar/language-service';
4
4
// for @vue /language-server usage
5
5
export * from '@volar/language-service/lib/utils/featureWorkers' ;
6
6
7
- import type { VueCompilerOptions } from '@vue/language-core' ;
8
7
import type * as ts from 'typescript' ;
9
8
10
9
import { create as createEmmetPlugin } from 'volar-service-emmet' ;
@@ -32,14 +31,6 @@ import { create as createVueTemplatePlugin } from './lib/plugins/vue-template';
32
31
import { create as createVueTemplateRefLinksPlugin } from './lib/plugins/vue-template-ref-links' ;
33
32
import { create as createVueTwoslashQueriesPlugin } from './lib/plugins/vue-twoslash-queries' ;
34
33
35
- declare module '@volar/language-service' {
36
- export interface ProjectContext {
37
- vue ?: {
38
- compilerOptions : VueCompilerOptions ;
39
- } ;
40
- }
41
- }
42
-
43
34
export function createVueLanguageServicePlugins (
44
35
ts : typeof import ( 'typescript' ) ,
45
36
tsPluginClient :
Original file line number Diff line number Diff line change @@ -24,14 +24,8 @@ export function create(
24
24
documentDropEditsProvider : true ,
25
25
} ,
26
26
create ( context ) {
27
- if ( ! context . project . vue ) {
28
- return { } ;
29
- }
30
-
31
- let casing = TagNameCasing . Pascal as TagNameCasing ; // TODO
32
-
33
27
const tsPluginClient = getTsPluginClient ?.( context ) ;
34
- const vueCompilerOptions = context . project . vue . compilerOptions ;
28
+ let casing = TagNameCasing . Pascal as TagNameCasing ; // TODO
35
29
36
30
return {
37
31
async provideDocumentDropEdits ( document , _position , dataTransfer ) {
@@ -57,7 +51,7 @@ export function create(
57
51
importUri = item . value as string ;
58
52
}
59
53
}
60
- if ( ! importUri || ! vueCompilerOptions . extensions . some ( ext => importUri . endsWith ( ext ) ) ) {
54
+ if ( ! importUri || ! root . vueCompilerOptions . extensions . some ( ext => importUri . endsWith ( ext ) ) ) {
61
55
return ;
62
56
}
63
57
@@ -76,8 +70,7 @@ export function create(
76
70
code . id === ( sfc . scriptSetup ? 'scriptsetup_raw' : 'script_raw' )
77
71
) ! ;
78
72
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, '/' ) ;
81
74
82
75
let importPath : string | undefined ;
83
76
Original file line number Diff line number Diff line change @@ -30,10 +30,6 @@ export function create(
30
30
return ;
31
31
}
32
32
33
- if ( ! context . project . vue ) {
34
- return ;
35
- }
36
-
37
33
const enabled = await context . env . getConfiguration < boolean > ?. ( 'vue.inlayHints.missingProps' ) ?? false ;
38
34
if ( ! enabled ) {
39
35
return ;
@@ -126,7 +122,7 @@ export function create(
126
122
attrText = attrText . slice ( 'v-model:' . length ) ;
127
123
}
128
124
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?
130
126
}
131
127
else if ( attrText . startsWith ( 'v-on:' ) ) {
132
128
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(
162
162
return ;
163
163
}
164
164
165
- if ( ! context . project . vue ) {
166
- return ;
167
- }
168
-
169
165
const uri = URI . parse ( document . uri ) ;
170
166
const decoded = context . decodeEmbeddedDocumentUri ( uri ) ;
171
167
const sourceScript = decoded && context . language . scripts . get ( decoded [ 0 ] ) ;
You can’t perform that action at this time.
0 commit comments