File tree Expand file tree Collapse file tree 2 files changed +10
-27
lines changed
packages/language-core/lib/codegen/script Expand file tree Collapse file tree 2 files changed +10
-27
lines changed Original file line number Diff line number Diff line change @@ -25,14 +25,11 @@ export const codeFeatures = {
25
25
navigation : {
26
26
navigation : true ,
27
27
} as VueCodeInformation ,
28
- referencesCodeLens : {
29
- navigation : true ,
30
- __referencesCodeLens : true ,
31
- } as VueCodeInformation ,
32
- cssClassNavigation : {
28
+ navigationWithoutRename : {
33
29
navigation : {
34
- resolveRenameNewName : normalizeCssRename ,
35
- resolveRenameEditText : applyCssRename ,
30
+ shouldRename ( ) {
31
+ return false ;
32
+ } ,
36
33
} ,
37
34
} as VueCodeInformation ,
38
35
} ;
@@ -149,11 +146,3 @@ export function* generateScript(options: ScriptCodegenOptions): Generator<Code>
149
146
] ;
150
147
}
151
148
}
152
-
153
- function normalizeCssRename ( newName : string ) {
154
- return newName . startsWith ( '.' ) ? newName . slice ( 1 ) : newName ;
155
- }
156
-
157
- function applyCssRename ( newName : string ) {
158
- return '.' + newName ;
159
- }
Original file line number Diff line number Diff line change @@ -7,7 +7,6 @@ import { forEachInterpolationSegment } from '../template/interpolation';
7
7
import type { ScriptCodegenContext } from './context' ;
8
8
import { codeFeatures , type ScriptCodegenOptions } from './index' ;
9
9
import { generateInternalComponent } from './internalComponent' ;
10
- import { combineLastMapping } from '../common' ;
11
10
12
11
export function * generateTemplate (
13
12
options : ScriptCodegenOptions ,
@@ -176,29 +175,24 @@ function* generateCssClassProperty(
176
175
'' ,
177
176
'style_' + styleIndex ,
178
177
offset ,
179
- referencesCodeLens
180
- ? codeFeatures . navigation
181
- : codeFeatures . referencesCodeLens ,
178
+ {
179
+ ...codeFeatures . navigationWithoutRename ,
180
+ __referencesCodeLens : referencesCodeLens ,
181
+ } ,
182
182
] ;
183
183
yield `'` ;
184
- yield [
185
- '' ,
186
- 'style_' + styleIndex ,
187
- offset ,
188
- codeFeatures . cssClassNavigation ,
189
- ] ;
190
184
yield [
191
185
classNameWithDot . substring ( 1 ) ,
192
186
'style_' + styleIndex ,
193
187
offset + 1 ,
194
- combineLastMapping ,
188
+ codeFeatures . navigation ,
195
189
] ;
196
190
yield `'` ;
197
191
yield [
198
192
'' ,
199
193
'style_' + styleIndex ,
200
194
offset + classNameWithDot . length ,
201
- codeFeatures . none ,
195
+ codeFeatures . navigationWithoutRename ,
202
196
] ;
203
197
yield `${ optional ? '?' : '' } : ${ propertyType } ` ;
204
198
yield ` }` ;
You can’t perform that action at this time.
0 commit comments