Option to disable auto-close parenthesis?

I want to disable auto-closing parenthesis feature.

image

I have looked for the code which does this, but I couldn’t. Anyone knows?

I agree - I often find myself going back to add markup somewhere in the middle of text, and end up having to erase the auto-paired bits. I would turn this off if I had the option. (Or maybe even better: auto-pair only if it’s at the end of a line of text, not the middle?)

4 Likes

Agreed. Logseq’s current autopairing is not very intuitive yet, it would be nice if we could just disable this feature outright. Disabling autopair should also disable the feature where backspacing once on ** deletes both the asterisks.

3 Likes

+1 to this, I also find it impedes my writing flow more than it assists.

Ideally we could have separate options to control autopairing of quotes and brackets so that we can tailor to our needs. I find the quote matching more troublesome than the bracket matching since most bracket matching involves page or block refs and is therefore usually finalised via the autocomplete dialog. Quote matching trips me up every time.

1 Like

Can confirm that this is very frustrating. “How do I disable auto closing of syntax markup” was like the second thing I looked up upon starting to use Logseq “for real” and I’m very disappointed to find out that it’s not possible :frowning:

+1 from me. In addition, it should be selective. E.g., I typically want to auto-close wikilinks but not normal brackets.

Make it an option to disable is fine, but make it work correctly seems to be the way forward. I do like the auto-close parenthesis but it should only autoclose when text is selected. before and after the selected text.

If you want to make it even nicer, when you type a ( immediatly before a word (so without a space) it should add the typed ( where you typed it and also add a ) at the end of that word, without explicitly selecting it.

1 Like

I like the auto-close parens. But you’re right it is not perfect yet. For one thing, backticks don’t auto-close the same way parens do: I mean if you type exactly this: (foo) including the close-paren, your cursor ends up after the close paren – it correctly doesn’t duplicate the close. Same with [[foo]]; as you type the close brackets it skips over them. But if you type backquote f o o backquote (I can’t get backquotes into this forum) it duplicates the trailing backquote (twice!) instead of skipping over it. The inconsistency drives me crazy.

I believe this functionality is called autopair, and it can be found here:

I think this is the usual place it is triggered, based on commit history:

It does not currently look conditional. I am not familiar with Clojure or any LISP-style language so I can’t quite see how to change that at present.

I am also in favour of being able to disable this functionality, even if just by manually adding a line to my config file. Like @pospi I find that it impedes me more than it helps, but maybe I type weird.

I hope my code links are helpful, sorry it’s not a pull request.

1 Like

Really Helpful! Thanks!

I tried removing all “autopair” function calling and seems working as expected at first, but I noticed auto-completing for “[[ ]]” and “(( ))” is still remains…

Movie

I guess these behavior are implemented in another function, but I couldn’t find also…:sob:

The current status of my change

1 Like

+1, I turn it off in every application that has it and was surprised to learn that that’s not possible in Logseq.

Same request, auto-close parenthesis may break sth. I think it’s reasonable to add this option and leave this choice to user.