Skip to content

Handle brackets better #5

Description

@RedCMD

you can disable/enable bracket highlighting via a few options
standard token types string/comment/regex/other (meta.embedded)

Image

unbalancedBracketScopes in package.json
Image

or tokenTypes
Image


Image

regex` \[ \( \{ `


should support ${} brackets
like normal template strings

Image

support nested character class bracket highlighting
regex` [[a-z]&&[a-b]] `

Image

disable autoClosingPairs on escaped chars
(won't work when language is embedded tho)
this is how I did it

// symbols that are auto closed when typing
"autoClosingPairs": [
	["\\\\(", ""], // Disable auto closing when escaped
	["(", ")"],
	["\\\\{", ""],
	["{", "}"],
	["\\\\[:", ""],
	["[:", ":]"],
	["\\\\[", ""],
	["[", "]"],
	["(?'", "'"], // `()` already closes the opening bracket
	["(?(<", ">"],
	["(?('", "'"],
	["\\\\g<", ">"],
	["\\\\g'", "'"],
	["\\\\k<", ">"],
	["\\\\k'", "'"]
],

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions