CKolkey / ts-node-action

Neovim Plugin for running functions on nodes.
359 stars 20 forks source link

Reimplement cycle_case to allow user specified formats/ordering #16

Closed CKolkey closed 1 year ago

CKolkey commented 1 year ago

This doesn't change the default behaviour of cycle_case, but allows a user to specify a new order for case-cycling, or new formats entirely. To use a built-in order, simply pass the string value for that format (one of { "snake_case", "pascal_case", "screaming_snake_case", "camel_case" }).

To provide a custom value, instead of passing a string, pass a table that conforms to: { pattern = string, apply = function, standardize = function }

Closes #15