Hello!
As an ex-user of rjsx-mode a current user of js-mode on Emacs 27.x I missed the contextual behavior of the < key where it would insert an empty tag (</>) when attempting to write JSX code and inserting a plain < character when you don't. The code was originally written by Felipe (@felipeochoa on Github) and what I did was essentially a copy and paste with added test cases:
repository: https://gitlab.com/shackra/colibri
This thing still misses another function for expanding a balanced tag when the user deletes the / character of a self-closing tag, I don't think that code is trivial and maybe I wouldn't be able to extract it from rjsx-mode as with the extracted code.
I was wondering:
- doing this copy and pasting in regards to js-jsx-electric-lt is somewhat a violation of Felipe copyright?
- is this extraction missing something?
- If the author of rjsx-mode is here, would you donate parts of your code to js.el so people can have a better experience when dealing with JSX?