lite-xl-plugins icon indicating copy to clipboard operation
lite-xl-plugins copied to clipboard

Add Case Transformer plugin

Open merlindiavova opened this issue 2 years ago • 3 comments

A simple plugin to transform strings to and from PascalCase, camelCase, snake_case, SCREAMING_SNAKE_CASE, dot.case, kebab-case, backslash\case, slash/case etc.

This is my first attempt at writing Lua, so a review is probably necessary especially around the string matching.

Hopefully this is useful to people

merlindiavova avatar Oct 28 '22 14:10 merlindiavova

Hey! Sorry for the delay on this. I'm doing a big clean up of PRs, and just got to this one. Looks great! Tried a few, works totally fine.

One thing, though; it crashes lite for me if you don't have a selection (presumably it tries to transform the entire document).

Can you add predicate for your commands that makes it only function if there's a selection? Seems to me you'd never really want to transform the entire document.

adamharrison avatar Jan 22 '23 19:01 adamharrison

Also, can you add the plugin to the manifest.json?

adamharrison avatar Jan 22 '23 19:01 adamharrison

Sure thing, sorry been super busy. Will get to this shortly

merlindiavova avatar Mar 16 '23 17:03 merlindiavova