mirror of
https://github.com/zyedidia/micro.git
synced 2026-03-30 06:37:14 +09:00
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:
@@ -28,3 +28,4 @@ color-link color-column "#2D2F31"
|
||||
#No extended types (bool in C, etc.)
|
||||
#color-link type.extended "default"
|
||||
#Plain brackets
|
||||
color-link match-brace "#1D1F21,#62B1FE"
|
||||
|
||||
@@ -26,3 +26,4 @@ color-link color-column "254"
|
||||
#No extended types (bool in C, &c.) and plain brackets
|
||||
color-link type.extended "241,231"
|
||||
color-link symbol.brackets "241,231"
|
||||
color-link match-brace "231,28"
|
||||
|
||||
@@ -42,3 +42,4 @@ color-link gutter-warning "red"
|
||||
color-link color-column "cyan"
|
||||
color-link underlined.url "underline blue, white"
|
||||
color-link divider "blue"
|
||||
color-link match-brace "black,cyan"
|
||||
|
||||
@@ -38,3 +38,4 @@ color-link color-column "#f26522"
|
||||
color-link constant.bool "bold #55ffff"
|
||||
color-link constant.bool.true "bold #85ff85"
|
||||
color-link constant.bool.false "bold #ff8585"
|
||||
color-link match-brace "#1e2124,#55ffff"
|
||||
|
||||
@@ -29,3 +29,4 @@ color-link color-column "#2C2C2C"
|
||||
color-link type.extended "default"
|
||||
#color-link symbol.brackets "default"
|
||||
color-link symbol.tag "#AE81FF,#242424"
|
||||
color-link match-brace "#242424,#7A9EC2"
|
||||
|
||||
@@ -29,3 +29,4 @@ color-link color-column "#323232"
|
||||
color-link type.extended "default"
|
||||
#color-link symbol.brackets "default"
|
||||
color-link symbol.tag "#AE81FF,#282828"
|
||||
color-link match-brace "#282828,#AE81FF"
|
||||
|
||||
@@ -43,3 +43,4 @@ color-link cursor-line "#44475A,#F8F8F2"
|
||||
color-link color-column "#44475A"
|
||||
color-link type.extended "default"
|
||||
|
||||
color-link match-brace "#282A36,#FF79C6"
|
||||
|
||||
@@ -33,3 +33,4 @@ color-link type "bold #3cc83c,#001e28"
|
||||
color-link type.keyword "bold #5aaae6,#001e28"
|
||||
color-link type.extended "#ffffff,#001e28"
|
||||
color-link underlined "#608b4e,#001e28"
|
||||
color-link match-brace "#001e28,#5aaae6"
|
||||
|
||||
@@ -33,3 +33,4 @@ color-link type "bold #004080,#f0f0f0"
|
||||
color-link type.keyword "bold #780050,#f0f0f0"
|
||||
color-link type.extended "#000000,#f0f0f0"
|
||||
color-link underlined "#3f7f5f,#f0f0f0"
|
||||
color-link match-brace "#f0f0f0,#780050"
|
||||
|
||||
@@ -33,3 +33,4 @@ color-link type "bold #3cc83c,#2d0023"
|
||||
color-link type.keyword "bold #5aaae6,#2d0023"
|
||||
color-link type.extended "#ffffff,#2d0023"
|
||||
color-link underlined "#886484,#2d0023"
|
||||
color-link match-brace "#2d0023,#5aaae6"
|
||||
|
||||
@@ -24,3 +24,4 @@ color-link diff-modified "yellow"
|
||||
color-link diff-deleted "red"
|
||||
color-link gutter-error ",red"
|
||||
color-link gutter-warning "red"
|
||||
color-link match-brace "black,cyan"
|
||||
|
||||
@@ -24,3 +24,4 @@ color-link gutter-warning "#EDB443,#11151C"
|
||||
color-link cursor-line "#091F2E"
|
||||
color-link color-column "#11151C"
|
||||
color-link symbol "#99D1CE,#0C1014"
|
||||
color-link match-brace "#0C1014,#D26937"
|
||||
|
||||
@@ -24,3 +24,4 @@ color-link cursor-line "#3c3836"
|
||||
color-link color-column "#79740e"
|
||||
color-link statusline "#ebdbb2,#665c54"
|
||||
color-link tabbar "#ebdbb2,#665c54"
|
||||
color-link match-brace "#282828,#d3869b"
|
||||
|
||||
@@ -21,3 +21,4 @@ color-link cursor-line "237"
|
||||
color-link color-column "237"
|
||||
color-link statusline "223,237"
|
||||
color-link tabbar "223,237"
|
||||
color-link match-brace "235,72"
|
||||
|
||||
@@ -30,3 +30,4 @@ color-link tabbar "#80DEEA,#3b4d56"
|
||||
color-link todo "bold #C792EA,#263238"
|
||||
color-link type "#FFCB6B,#263238"
|
||||
color-link underlined "underline #EEFFFF,#263238"
|
||||
color-link match-brace "#263238,#C792EA"
|
||||
|
||||
@@ -23,3 +23,4 @@ color-link gutter-error "#CB4B16"
|
||||
color-link gutter-warning "#E6DB74"
|
||||
color-link cursor-line "#323232"
|
||||
color-link color-column "#323232"
|
||||
color-link match-brace "#1D0000,#AE81FF"
|
||||
|
||||
@@ -29,3 +29,4 @@ color-link color-column "#323232"
|
||||
color-link type.extended "default"
|
||||
#color-link symbol.brackets "default"
|
||||
color-link symbol.tag "#AE81FF,#282828"
|
||||
color-link match-brace "#282828,#AE81FF"
|
||||
|
||||
@@ -34,3 +34,4 @@ color-link todo "#8B98AB"
|
||||
color-link type "#66D9EF"
|
||||
color-link type.keyword "#C678DD"
|
||||
color-link underlined "#8996A8"
|
||||
color-link match-brace "#21252C,#C678DD"
|
||||
|
||||
@@ -31,3 +31,5 @@ color-link space "underline #e6e1dc,#2b2b2b"
|
||||
|
||||
#the Python syntax definition are wrong. This is not how you should do decorators!
|
||||
color-link brightgreen "#edb753,#2b2b2b"
|
||||
|
||||
color-link match-brace "#2b2b2b,#a5c261"
|
||||
|
||||
@@ -27,3 +27,4 @@ color-link type.extended "default"
|
||||
color-link symbol.brackets "default"
|
||||
#Color shebangs the comment color
|
||||
color-link preproc.shebang "comment"
|
||||
color-link match-brace ",magenta"
|
||||
|
||||
@@ -26,3 +26,4 @@ color-link cursor-line "#003541"
|
||||
color-link color-column "#003541"
|
||||
color-link type.extended "#839496,#002833"
|
||||
color-link symbol.brackets "#839496,#002833"
|
||||
color-link match-brace "#002833,#268BD2"
|
||||
|
||||
@@ -25,3 +25,4 @@ color-link cursor-line "black"
|
||||
color-link color-column "black"
|
||||
color-link type.extended "default"
|
||||
color-link symbol.brackets "default"
|
||||
color-link match-brace ",blue"
|
||||
|
||||
@@ -24,3 +24,4 @@ color-link gutter-warning "88"
|
||||
color-link cursor-line "229"
|
||||
#color-link color-column "196"
|
||||
color-link current-line-number "246"
|
||||
color-line match-brace "230,22"
|
||||
|
||||
@@ -35,3 +35,4 @@ color-link todo "#8B98AB"
|
||||
color-link type "#F9EE98"
|
||||
color-link type.keyword "#CDA869"
|
||||
color-link underlined "#8996A8"
|
||||
color-link match-brace "#141414,#E0C589"
|
||||
|
||||
@@ -25,3 +25,4 @@ color-link gutter-warning "174,237"
|
||||
color-link cursor-line "238"
|
||||
color-link color-column "238"
|
||||
color-link current-line-number "188,237"
|
||||
color-link match-brace "237,223"
|
||||
|
||||
@@ -194,6 +194,7 @@ Here is a list of the colorscheme groups that you can use:
|
||||
* divider (Color of the divider between vertical splits)
|
||||
* message (Color of messages in the bottom line of the screen)
|
||||
* error-message (Color of error messages in the bottom line of the screen)
|
||||
* match-brace (Color of matching brackets when `matchbracestyle` is set to `highlight`)
|
||||
|
||||
Colorschemes must be placed in the `~/.config/micro/colorschemes` directory to
|
||||
be used.
|
||||
|
||||
@@ -210,11 +210,19 @@ Here are the available options:
|
||||
|
||||
default value: `false`
|
||||
|
||||
* `matchbrace`: underline matching braces for '()', '{}', '[]' when the cursor
|
||||
is on a brace character.
|
||||
* `matchbrace`: show matching braces for '()', '{}', '[]' when the cursor
|
||||
is on a brace character or next to it.
|
||||
|
||||
default value: `true`
|
||||
|
||||
* `matchbracestyle`: whether to underline or highlight matching braces when
|
||||
`matchbrace` is enabled. The color of highlight is determined by the `match-brace`
|
||||
field in the current theme. Possible values:
|
||||
* `underline`: underline matching braces.
|
||||
* `highlight`: use `match-brace` style from the current theme.
|
||||
|
||||
default value: `underline`
|
||||
|
||||
* `mkparents`: if a file is opened on a path that does not exist, the file
|
||||
cannot be saved because the parent directories don't exist. This option lets
|
||||
micro automatically create the parent directories in such a situation.
|
||||
@@ -495,6 +503,7 @@ so that you can see what the formatting should look like.
|
||||
"linter": true,
|
||||
"literate": true,
|
||||
"matchbrace": true,
|
||||
"matchbracestyle": "underline",
|
||||
"mkparents": false,
|
||||
"mouse": true,
|
||||
"parsecursor": false,
|
||||
|
||||
Reference in New Issue
Block a user