Skip to content

Commit 219fb12

Browse files
authored
Merge pull request micro-editor#3697 from JoeKar/doc/syntax
doc: syntax: Add hint about incompatibilities to previous versions
2 parents 0b75031 + 02e69dd commit 219fb12

1 file changed

Lines changed: 13 additions & 5 deletions

File tree

runtime/syntax/README.md

Lines changed: 13 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,6 @@ Each yaml file specifies how to detect the filetype based on file extension or h
66
In addition, a signature can be provided to help resolving ambiguities when multiple matching filetypes are detected.
77
Then there are patterns and regions linked to highlight groups which tell micro how to highlight that filetype.
88

9-
Making your own syntax files is very simple. I recommend you check the file after you are finished with the
10-
[`syntax_checker.go`](./syntax_checker.go) program (located in this directory). Just place your yaml syntax
11-
file in the current directory and run `go run syntax_checker.go` and it will check every file. If there are no
12-
errors it will print `No issues!`.
13-
149
You can read more about how to write syntax files (and colorschemes) in the [colors](../help/colors.md) documentation.
1510

1611
# Legacy '.micro' filetype
@@ -38,6 +33,19 @@ Micro syntax files are almost identical to Nano's, except for some key differenc
3833
* Micro does not use `icolor`. Instead, for a case insensitive match, use the case insensitive flag (`i`) in the regular expression
3934
* For example, `icolor green ".*"` would become `color green "(?i).*"`
4035

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+
4149
# Using with colorschemes
4250

4351
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.

0 commit comments

Comments
 (0)