question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

closebrackets addon: configure the end of statement characters

See original GitHub issue

As 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:closed
  • Created 5 years ago
  • Reactions:4
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
marijnhcommented, Jul 26, 2018

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.

2reactions
marijnhcommented, Mar 19, 2019

#5812 brings back a behavior similar to this in a more robust and configurable way

Read more comments on GitHub >

github_iconTop Results From Across the Web

autoClosingBrackets and bracket surround should be ... - GitHub
I'd like to use the bracket surround functionality, where you select a word and enter a bracket-like character ' " ( { and...
Read more >
Complete paired characters | PyCharm Documentation
This enables adding closing braces when you press Enter . Configure automatic insertion of other paired elements by selecting these checkboxes:.
Read more >
User and Workspace Settings - Visual Studio Code
json file. You can open the settings. json file with the Preferences: Open Settings (JSON) command in the Command Palette (Ctrl+Shift+P). Once the...
Read more >
Oracle - Rocket Software Documentation
The Oracle DBMS connector enables you to integrate Oracle databases with Uniface.
Read more >
920i iRite Programming Reference - Nicol Scales
line less than 80 characters. Some statements contain one or more other statements. In our example, the statement: g_ciPrinterPort : constant integer :=...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found