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 = {
2525 navigation : {
2626 navigation : true ,
2727 } as VueCodeInformation ,
28- referencesCodeLens : {
29- navigation : true ,
30- __referencesCodeLens : true ,
31- } as VueCodeInformation ,
32- cssClassNavigation : {
28+ navigationWithoutRename : {
3329 navigation : {
34- resolveRenameNewName : normalizeCssRename ,
35- resolveRenameEditText : applyCssRename ,
30+ shouldRename ( ) {
31+ return false ;
32+ } ,
3633 } ,
3734 } as VueCodeInformation ,
3835} ;
@@ -149,11 +146,3 @@ export function* generateScript(options: ScriptCodegenOptions): Generator<Code>
149146 ] ;
150147 }
151148}
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';
77import type { ScriptCodegenContext } from './context' ;
88import { codeFeatures , type ScriptCodegenOptions } from './index' ;
99import { generateInternalComponent } from './internalComponent' ;
10- import { combineLastMapping } from '../common' ;
1110
1211export function * generateTemplate (
1312 options : ScriptCodegenOptions ,
@@ -176,29 +175,24 @@ function* generateCssClassProperty(
176175 '' ,
177176 'style_' + styleIndex ,
178177 offset ,
179- referencesCodeLens
180- ? codeFeatures . navigation
181- : codeFeatures . referencesCodeLens ,
178+ {
179+ ...codeFeatures . navigationWithoutRename ,
180+ __referencesCodeLens : referencesCodeLens ,
181+ } ,
182182 ] ;
183183 yield `'` ;
184- yield [
185- '' ,
186- 'style_' + styleIndex ,
187- offset ,
188- codeFeatures . cssClassNavigation ,
189- ] ;
190184 yield [
191185 classNameWithDot . substring ( 1 ) ,
192186 'style_' + styleIndex ,
193187 offset + 1 ,
194- combineLastMapping ,
188+ codeFeatures . navigation ,
195189 ] ;
196190 yield `'` ;
197191 yield [
198192 '' ,
199193 'style_' + styleIndex ,
200194 offset + classNameWithDot . length ,
201- codeFeatures . none ,
195+ codeFeatures . navigationWithoutRename ,
202196 ] ;
203197 yield `${ optional ? '?' : '' } : ${ propertyType } ` ;
204198 yield ` }` ;
You can’t perform that action at this time.
0 commit comments