File tree Expand file tree Collapse file tree 4 files changed +30
-5
lines changed Expand file tree Collapse file tree 4 files changed +30
-5
lines changed Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ const defaultLSConfig: LSConfig = {
3838 enable : true ,
3939 compilerWarnings : { } ,
4040 diagnostics : { enable : true } ,
41+ rename : { enable : true } ,
4142 format : { enable : true } ,
4243 completions : { enable : true } ,
4344 hover : { enable : true } ,
@@ -84,7 +85,7 @@ export interface LSTypescriptConfig {
8485 enable : boolean ;
8586 } ;
8687 selectionRange : {
87- enable : boolean
88+ enable : boolean ;
8889 } ;
8990}
9091
@@ -110,7 +111,7 @@ export interface LSCSSConfig {
110111 enable : boolean ;
111112 } ;
112113 selectionRange : {
113- enable : boolean
114+ enable : boolean ;
114115 } ;
115116}
116117
@@ -141,6 +142,9 @@ export interface LSSvelteConfig {
141142 format : {
142143 enable : boolean ;
143144 } ;
145+ rename : {
146+ enable : boolean ;
147+ } ;
144148 completions : {
145149 enable : boolean ;
146150 } ;
@@ -151,7 +155,7 @@ export interface LSSvelteConfig {
151155 enable : boolean ;
152156 } ;
153157 selectionRange : {
154- enable : boolean
158+ enable : boolean ;
155159 } ;
156160}
157161
Original file line number Diff line number Diff line change @@ -317,7 +317,12 @@ export class TypeScriptPlugin
317317 }
318318
319319 async updateImports ( fileRename : FileRename ) : Promise < WorkspaceEdit | null > {
320- if ( ! this . featureEnabled ( 'rename' ) ) {
320+ if (
321+ ! (
322+ this . configManager . enabled ( 'svelte.enable' ) &&
323+ this . configManager . enabled ( 'svelte.rename.enable' )
324+ )
325+ ) {
321326 return null ;
322327 }
323328
Original file line number Diff line number Diff line change @@ -102,6 +102,10 @@ Enable code actions for TypeScript. _Default_: `true`
102102
103103Enable selection range for TypeScript. _ Default_ : ` true `
104104
105+ ##### ` svelte.plugin.typescript.rename.enable `
106+
107+ Enable rename functionality for JS/TS variables inside Svelte files. _ Default_ : ` true `
108+
105109##### ` svelte.plugin.css.enable `
106110
107111Enable the CSS plugin. _ Default_ : ` true `
@@ -184,7 +188,7 @@ Enable autocompletion for Svelte (for tags like #if/#each). _Default_: `true`
184188
185189##### ` svelte.plugin.svelte.rename.enable `
186190
187- Enable rename functionality (rename svelte files or variables inside svelte files) . _ Default_ : ` true `
191+ Enable rename/move Svelte files functionality . _ Default_ : ` true `
188192
189193##### ` svelte.plugin.svelte.codeActions.enable `
190194
Original file line number Diff line number Diff line change 116116 "title" : " TypeScript: SelectionRange" ,
117117 "description" : " Enable selection range for TypeScript"
118118 },
119+ "svelte.plugin.typescript.rename.enable" : {
120+ "type" : " boolean" ,
121+ "default" : true ,
122+ "title" : " TypeScript: Rename" ,
123+ "description" : " Enable rename functionality for JS/TS variables inside Svelte files"
124+ },
119125 "svelte.plugin.css.enable" : {
120126 "type" : " boolean" ,
121127 "default" : true ,
254260 "default" : true ,
255261 "title" : " Svelte: Selection Range" ,
256262 "description" : " Enable selection range for Svelte"
263+ },
264+ "svelte.plugin.svelte.rename.enable" : {
265+ "type" : " boolean" ,
266+ "default" : true ,
267+ "title" : " Svelte: Rename" ,
268+ "description" : " Enable rename/move Svelte files functionality"
257269 }
258270 }
259271 },
You can’t perform that action at this time.
0 commit comments