File tree Expand file tree Collapse file tree 1 file changed +17
-1
lines changed
packages/cursorless-vscode/src Expand file tree Collapse file tree 1 file changed +17
-1
lines changed Original file line number Diff line number Diff line change @@ -141,14 +141,30 @@ function parseVariables(
141141 wrapperPhrases : phrase ? [ phrase ] : undefined ,
142142 wrapperScope : variable . wrapperScopeType ,
143143 insertionFormatters : variable . formatter
144- ? [ variable . formatter ]
144+ ? getFormatter ( variable . formatter )
145145 : undefined ,
146146 // SKIP: variable.description
147147 } ;
148148 } ,
149149 ) ;
150150}
151151
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+
152168async function openResultDocument (
153169 result : Result ,
154170 sourceDirectory : string ,
You can’t perform that action at this time.
0 commit comments