options: add matchbracestyle (#2876)

* Update docs to include `matchbracestyle`

* Add `matchbracestyle` to infocomplete.go

* Add validator and default settings for `matchbracestyle`

* Highlight or underline braces based on `matchbracestyle`

* Add `match-brace` to default colorschemes

* Correct `FindMatchingBrace()` counting

Make brace under the cursor have priority over brace to the left in
ambiguous cases when matching braces

Co-authored-by: Dmitry Maluka <dmitrymaluka@gmail.com>

* Fix conflicts

---------

Co-authored-by: Jöran Karl <3951388+JoeKar@users.noreply.github.com>
Co-authored-by: Dmitry Maluka <dmitrymaluka@gmail.com>
This commit is contained in:
toiletbril
2024-03-13 22:21:27 +03:00
committed by GitHub
parent 14dca7d349
commit 69eaa9191a
32 changed files with 150 additions and 70 deletions

View File

@@ -216,6 +216,13 @@ func OptionValueComplete(b *buffer.Buffer) ([]string, []string) {
if strings.HasPrefix("terminal", input) {
suggestions = append(suggestions, "terminal")
}
case "matchbracestyle":
if strings.HasPrefix("underline", input) {
suggestions = append(suggestions, "underline")
}
if strings.HasPrefix("highlight", input) {
suggestions = append(suggestions, "highlight")
}
}
}
sort.Strings(suggestions)