From 13589bd7bb76ee5a26ea924b032e59ada53109c8 Mon Sep 17 00:00:00 2001 From: Nick Krichevsky Date: Sun, 21 Jul 2024 20:19:15 -0400 Subject: [PATCH] Document bracket configuration --- CHANGELOG.md | 7 +++++++ README.md | 22 ++++++++++++++++++++++ 2 files changed, 29 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index a829be9..0964169 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,12 @@ # Change Log +## [Unreleased] + +### Added + +- Added support for `do`/`end` and `fn`/`end` as brackets for VSCode, enabling + bracket colorization and bracket navigation features. + ## [0.0.16] ### Added diff --git a/README.md b/README.md index 86b4b7c..309e90f 100644 --- a/README.md +++ b/README.md @@ -48,6 +48,28 @@ The path should look something like Controls whether notifications are shown after automatic installs of new Lexcial versions. Defaults to `true`. +### Editor Configuration + +The extension provides a language configuration for Elixir which marks +`do`/`end` and `fn`/`end` as brackets. Among other things, this enables +colorization of `do`/`end` and `fn`/`end` with VSCode's +`editor.bracketPairColorization.enabled` setting. While this can be helpful when +searching for a `do`'s corresponding `end`, some users may prefer to use the +standard keyword coloring, while still highlighting parenthesis and other +brackets. This can be achieved by adding the following to your VSCode +configuration. + +```jsonc +"editor.bracketPairColorization.enabled": true, +"[elixir]": { + "editor.language.colorizedBracketPairs": [ + ["{", "}"], + ["[", "]"], + ["(", ")"] + ] +} +``` + ### Erlang and Elixir version compatibility #### Erlang