File tree 1 file changed +17
-1
lines changed
packages/cursorless-vscode/src
1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -141,14 +141,30 @@ function parseVariables(
141
141
wrapperPhrases : phrase ? [ phrase ] : undefined ,
142
142
wrapperScope : variable . wrapperScopeType ,
143
143
insertionFormatters : variable . formatter
144
- ? [ variable . formatter ]
144
+ ? getFormatter ( variable . formatter )
145
145
: undefined ,
146
146
// SKIP: variable.description
147
147
} ;
148
148
} ,
149
149
) ;
150
150
}
151
151
152
+ // Convert Cursorless formatters to Talon community formatters
153
+ function getFormatter ( formatter : string ) : string [ ] {
154
+ switch ( formatter ) {
155
+ case "camelCase" :
156
+ return [ "PRIVATE_CAMEL_CASE" ] ;
157
+ case "pascalCase" :
158
+ return [ "PUBLIC_CAMEL_CASE" ] ;
159
+ case "snakeCase" :
160
+ return [ "SNAKE_CASE" ] ;
161
+ case "upperSnakeCase" :
162
+ return [ "ALL_CAPS" , "SNAKE_CASE" ] ;
163
+ default :
164
+ return [ formatter ] ;
165
+ }
166
+ }
167
+
152
168
async function openResultDocument (
153
169
result : Result ,
154
170
sourceDirectory : string ,
You can’t perform that action at this time.
0 commit comments