mickeynp / combobulate

Structured Editing and Navigation in Emacs with Tree-Sitter
GNU General Public License v3.0
945 stars 54 forks source link

Wrap TSX / JSX Elements #5

Closed stevemolitor closed 1 year ago

stevemolitor commented 2 years ago

Great stuff. As a big fan of things like lispy, this is a step in the right direction. Very in-line with how Emacs works I think. I'm using combobulate already for TSX files. Works great. Thanks!

The README mentions :

....a prefix map of mode-specific transformations. Currently only used in Javascript and Typescript modes to vanish/wrap JSX elements

I couldn't find a generic "wrap element" command, ie to wrap in an arbitrary tag like <h1>, <div> etc. Did I miss it? If not I'd be happy to add.

mickeynp commented 2 years ago

Hi Steve. Sorry yeah the README's a bit ambiguous. There's combobulate-javascript-jsx--wrap which is used to comment or turn things into JSX expressions.

Feel free to PR some improvements to that area.

mickeynp commented 1 year ago

This is now fixed in master.