matchBrackets not highlighting

#1

Code

Imports

image

Usage

image


Problem

Putting the cursor on brackets does not highlight them, however matchTags works fine (although it only highlights the matched tag and not the one under cursor).

I am using React and CM5. Relatively new to this so let me know what else to say, thank you!

0 Likes

#2

It’s hard to say what’s going wrong. The addon, in a simple page, seems to work. You’ll have to figure out what’s different in your setup. Your theme, dracula, appears to set an underline for matching brackets. Maybe some CSS conflict is preventing this from showing up?

0 Likes

#3

I couldn’t end up figure it out and omitted it since it’s not a huge deal.

Unrelated, but is there a way to omit a specific shortcut from a keymap? I’m using the sublime keymap but I’ve also made my own ‘Cmd-Enter’ shortcut and they both execute on that shortcut now.

Thanks!

0 Likes

#4

You can copy the keymap object and delete the binding from it.

In principle, as soon as one key handler executes (without returning CodeMirror.Pass), no others should be called for that same keypress.

0 Likes