BigBahss / vscode-cmantic

C/C++ code generation for VS Code: Generate Definitions, Getters, Setters, and much more.
https://bigbahss.github.io/vscode-cmantic/
MIT License
83 stars 9 forks source link

Getter/setter customization #11

Closed grigorig closed 3 years ago

grigorig commented 3 years ago

It would be very useful if alternative naming styles would be supported. Currently the extension always uses getSomething and setSomething, but other styles are used as well, for instance get_something/set_something.

BigBahss commented 3 years ago

Thanks for opening an issue, I should add a setting to control that. It will detect if the variable name is snake_case already and will generate names like get_something/set_something. However, the case-style cannot be determined from a name without any underscores, so a setting is probably preferable.

BigBahss commented 3 years ago

Added on branch master, leaving this open until a release is published.

Added a setting Case Style to control whether getters and setters are generated with names in snake_case, camelCase, or PascalCase.

BigBahss commented 3 years ago

Added in v0.4.2