closebrackets addon: configure the end of statement characters
See original GitHub issueAs you can observe in the demo by typing (
right before ;
on any line, it won’t add the closing )
, which is quite inconvenient in cases where you switch from a function reference to a function invocation, for example. That is, from foo = bar;
to foo = bar(whatever);
Currently the only way to circumvent this is to add ;;
to the pairs
option i.e. pass ()[]{}''"";;
- quite a hack I’d say, especially if you want to allow all punctuation characters for some language. Edit: the hack is unusable as it introduces its own problems.
What are your thoughts on solving this? Let us use the above hack? A separate endOfStatement string option? A custom callback function? Checking whether we’re typing at the end of a token? I don’t mind trying to submit a PR if needed.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:4
- Comments:6 (4 by maintainers)
Top GitHub Comments
I wasn’t able to find out why it behaved like that, but I agree that isn’t very good behavior. Attached patch removes it.
#5812 brings back a behavior similar to this in a more robust and configurable way