Skip to content

Commit b37fa2e

Browse files
authored
Merge pull request zyedidia#3846 from JoeKar/revert/syntax-rules
syntax: Revert removal of `rules: []`
2 parents 4b2f8aa + 52f629c commit b37fa2e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

72 files changed

+144
-15
lines changed

runtime/syntax/README.md

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -33,19 +33,6 @@ Micro syntax files are almost identical to Nano's, except for some key differenc
3333
* Micro does not use `icolor`. Instead, for a case insensitive match, use the case insensitive flag (`i`) in the regular expression
3434
* For example, `icolor green ".*"` would become `color green "(?i).*"`
3535

36-
# Incompatibilities with older versions of micro
37-
38-
With PR [#3458](https://github.com/zyedidia/micro/pull/3458) resp. commit
39-
[a9b513a](https://github.com/zyedidia/micro/commit/a9b513a28adaaa7782505dc1e284e1a0132cb66f)
40-
empty `rules: []` definitions are removed from all syntax files, since
41-
`rules` are no longer mandatory.
42-
Unfortunately they are mandatory for `micro` versions up to and including `v2.0.14`.
43-
44-
To use newer syntax definitions from this repository with older `micro` versions
45-
you have to add these `rules: []` to all regions not including `rules` already.
46-
Otherwise you need to use syntax definitions before the above mentioned PR
47-
for example from version [v2.0.14](https://github.com/zyedidia/micro/tree/v2.0.14).
48-
4936
# Using with colorschemes
5037

5138
Not all of these files have been converted to use micro's colorscheme feature. Most of them just hardcode the colors, which can be problematic depending on the colorscheme you use.

runtime/syntax/caddyfile.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ rules:
1919
- comment:
2020
start: "#"
2121
end: "$"
22+
rules: []
2223

runtime/syntax/cmake.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ rules:
3030
- preproc:
3131
start: "\\$(\\{|ENV\\{)"
3232
end: "\\}"
33+
rules: []
3334

3435
- identifier.macro: "\\b(APPLE|UNIX|WIN32|CYGWIN|BORLAND|MINGW|MSVC(_IDE|60|71|80|90)?)\\b"
3536

runtime/syntax/crystal.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,12 @@ rules:
2727
- constant.string:
2828
start: "`"
2929
end: "`"
30+
rules: []
3031

3132
- constant.string:
3233
start: "%x\\{"
3334
end: "\\}"
35+
rules: []
3436

3537
- constant.string:
3638
start: "\""
@@ -66,4 +68,5 @@ rules:
6668
- constant:
6769
start: "<<-?'?EOT'?"
6870
end: "^EOT"
71+
rules: []
6972

runtime/syntax/css.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,13 @@ rules:
99
# - normal:
1010
# start: "\\{"
1111
# end: "\\}"
12+
# rules: []
1213
# css commands
1314
- type: "(align-content|align-items|alignment-baseline|align-self|all|animation|animation-delay|animation-direction|animation-duration|animation-fill-mode|animation-iteration-count|animation-name|animation-play-state|animation-timing-function|appearance|azimuth|backdrop-filter|backface-visibility|background|background-attachment|background-blend-mode|background-clip|background-color|background-image|background-origin|background-position|background-repeat|background-size|baseline-shift|bookmark-label|bookmark-level|bookmark-state|border|border-bottom|border-bottom-color|border-bottom-left-radius|border-bottom-right-radius|border-bottom-style|border-bottom-width|border-boundary|border-collapse|border-color|border-image|border-image-outset|border-image-repeat|border-image-slice|border-image-source|border-image-width|border-left|border-left-color|border-left-style|border-left-width|border-radius|border-right|border-right-color|border-right-style|border-right-width|border-spacing|border-style|border-top|border-top-color|border-top-left-radius|border-top-right-radius|border-top-style|border-top-width|border-width|bottom|box-decoration-break|box-shadow|box-sizing|box-snap|box-suppress|break-after|break-before|break-inside|caption-side|caret|caret-animation|caret-color|caret-shape|chains|clear|clip|clip-path|clip-rule|color|color-interpolation-filters|column-count|column-fill|column-gap|column-rule|column-rule-color|column-rule-style|column-rule-width|columns|column-span|column-width|content|continue|counter-increment|counter-reset|counter-set|cue|cue-after|cue-before|cursor|direction|display|dominant-baseline|elevation|empty-cells|filter|flex|flex-basis|flex-direction|flex-flow|flex-grow|flex-shrink|flex-wrap|float|float-defer|float-offset|float-reference|flood-color|flood-opacity|flow|flow-from|flow-into|font|font-family|font-feature-settings|font-kerning|font-language-override|font-size|font-size-adjust|font-stretch|font-style|font-synthesis|font-variant|font-variant-alternates|font-variant-caps|font-variant-east-asian|font-variant-ligatures|font-variant-numeric|font-variant-position|font-weight|footnote-display|footnote-policy|gap|glyph-orientation-vertical|grid|grid-area|grid-auto-columns|grid-auto-flow|grid-auto-rows|grid-column|grid-column-end|grid-column-gap|grid-column-start|grid-gap|grid-row|grid-row-end|grid-row-gap|grid-row-start|grid-template|grid-template-areas|grid-template-columns|grid-template-rows|hanging-punctuation|height|hyphenate-character|hyphenate-limit-chars|hyphenate-limit-last|hyphenate-limit-lines|hyphenate-limit-zone|hyphens|image-orientation|image-rendering|image-resolution|initial-letter|initial-letter-align|initial-letter-wrap|isolation|justify-content|justify-items|justify-self|left|letter-spacing|lighting-color|line-break|line-grid|line-height|line-snap|list-style|list-style-image|list-style-position|list-style-type|margin|margin-bottom|margin-left|margin-right|margin-top|marker|marker-end|marker-knockout-left|marker-knockout-right|marker-mid|marker-pattern|marker-segment|marker-side|marker-start|marquee-direction|marquee-loop|marquee-speed|marquee-style|mask|mask-border|mask-border-mode|mask-border-outset|mask-border-repeat|mask-border-slice|mask-border-source|mask-border-width|mask-clip|mask-composite|mask-image|mask-mode|mask-origin|mask-position|mask-repeat|mask-size|mask-type|max-height|max-lines|max-width|min-height|min-width|mix-blend-mode|motion|motion-offset|motion-path|motion-rotation|nav-down|nav-left|nav-right|nav-up|object-fit|object-position|offset-after|offset-before|offset-end|offset-start|opacity|order|orphans|outline|outline-color|outline-offset|outline-style|outline-width|overflow|overflow-style|overflow-wrap|overflow-x|overflow-y|padding|padding-bottom|padding-left|padding-right|padding-top|page|page-break-after|page-break-before|page-break-inside|pause|pause-after|pause-before|perspective|perspective-origin|pitch|pitch-range|play-during|pointer-events|polar-anchor|polar-angle|polar-distance|polar-origin|position|presentation-level|quotes|region-fragment|resize|rest|rest-after|rest-before|richness|right|rotation|rotation-point|ruby-align|ruby-merge|ruby-position|running|scrollbar-color|scroll-behavior|scroll-snap-align|scroll-snap-margin|scroll-snap-margin-block|scroll-snap-margin-block-end|scroll-snap-margin-block-start|scroll-snap-margin-bottom|scroll-snap-margin-inline|scroll-snap-margin-inline-end|scroll-snap-margin-inline-start|scroll-snap-margin-left|scroll-snap-margin-right|scroll-snap-margin-top|scroll-snap-padding|scroll-snap-padding-block|scroll-snap-padding-block-end|scroll-snap-padding-block-start|scroll-snap-padding-bottom|scroll-snap-padding-inline|scroll-snap-padding-inline-end|scroll-snap-padding-inline-start|scroll-snap-padding-left|scroll-snap-padding-right|scroll-snap-padding-top|scroll-snap-type|shape-image-threshold|shape-inside|shape-margin|shape-outside|size|speak|speak-as|speak-header|speak-numeral|speak-punctuation|speech-rate|stress|string-set|stroke|stroke-alignment|stroke-dashadjust|stroke-dasharray|stroke-dashcorner|stroke-dashoffset|stroke-linecap|stroke-linejoin|stroke-miterlimit|stroke-opacity|stroke-width|table-layout|tab-size|text-align|text-align-all|text-align-last|text-combine-upright|text-decoration|text-decoration-color|text-decoration-line|text-decoration-skip|text-decoration-style|text-emphasis|text-emphasis-color|text-emphasis-position|text-emphasis-style|text-indent|text-justify|text-orientation|text-overflow|text-shadow|text-space-collapse|text-space-trim|text-spacing|text-transform|text-underline-offset|text-underline-position|text-wrap|top|transform|transform-box|transform-origin|transform-style|transition|transition-delay|transition-duration|transition-property|transition-timing-function|unicode-bidi|user-select|vertical-align|visibility|voice-balance|voice-duration|voice-family|voice-pitch|voice-range|voice-rate|voice-stress|voice-volume|volume|white-space|widows|width|will-change|word-break|word-spacing|word-wrap|wrap-after|wrap-before|wrap-flow|wrap-inside|wrap-through|writing-mode|z-index):"
1415
# - default:
1516
# start: ":"
1617
# end: "[;^\\{]"
18+
# rules: []
1719
- special: "!important"
1820
- identifier: ":active|:focus|:hover|:link|:visited|:link|:after|:before|$"
1921
- special: "(\\{|\\}|\\(|\\)|\\;|:|\\]|~|<|>|,)"

runtime/syntax/d.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,10 +109,13 @@ rules:
109109
- comment:
110110
start: "//"
111111
end: "$"
112+
rules: []
112113
- comment:
113114
start: "/\\*"
114115
end: "\\*/"
116+
rules: []
115117
- comment:
116118
start: "/\\+"
117119
end: "\\+/"
120+
rules: []
118121

runtime/syntax/erb.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ rules:
1919
- default:
2020
start: "<%"
2121
end: "%>"
22+
rules: []
2223

2324
- preproc: "<%|%>"
2425
- red: "&[^;[[:space:]]]*;"
@@ -36,5 +37,6 @@ rules:
3637
- identifier.macro:
3738
start: "<<-?'?EOT'?"
3839
end: "^EOT"
40+
rules: []
3941

4042
- todo: "(XXX|TODO|FIXME|\\?\\?\\?)"

runtime/syntax/erlang.yaml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ rules:
2222
start: "'"
2323
end: "'"
2424
skip: "\\\\."
25+
rules: []
2526
# - constant.specialChar: "%."
2627
# - constant.specialChar: "\\\\[abfnrtv'\\\"\\\\]"
2728
# - constant.specialChar: "\\\\([0-7]{3}|x[A-Fa-f0-9]{2}|u[A-Fa-f0-9]{4}|U[A-Fa-f0-9]{8})"
@@ -41,3 +42,4 @@ rules:
4142
- comment:
4243
start: "%"
4344
end: "$"
45+
rules: []

runtime/syntax/fish.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,7 @@ rules:
3838
start: "'"
3939
end: "'"
4040
skip: "\\\\."
41+
rules: []
4142

4243
- comment:
4344
start: "#"

runtime/syntax/forth.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ rules:
1919
- constant.string:
2020
start: "\\b([Ss.]\" )"
2121
end: "\""
22+
rules: []
2223

2324
- comment:
2425
start: "\\("

0 commit comments

Comments
 (0)