From 78f0a9cd30bb48c36ab889dd49bd6aa5a0d68ef1 Mon Sep 17 00:00:00 2001 From: Sertonix <83883937+Sertonix@users.noreply.github.com> Date: Mon, 6 Feb 2023 10:20:22 +0000 Subject: [PATCH 1/2] doc: syntax: remove `syntax_checker.go` from README.md The patch is taken from: https://github.com/zyedidia/micro/pull/2738 The mentioned file was already removed with the following commit: https://github.com/zyedidia/micro/commit/fe3186ba9dba176fd3f8a5513c16a1895d62bc2b The `micro` binary itself takes now care of validating the syntax definitions and informs about possible issues. --- runtime/syntax/README.md | 5 ----- 1 file changed, 5 deletions(-) diff --git a/runtime/syntax/README.md b/runtime/syntax/README.md index 3e2c5631..a31acc02 100644 --- a/runtime/syntax/README.md +++ b/runtime/syntax/README.md @@ -6,11 +6,6 @@ Each yaml file specifies how to detect the filetype based on file extension or h In addition, a signature can be provided to help resolving ambiguities when multiple matching filetypes are detected. Then there are patterns and regions linked to highlight groups which tell micro how to highlight that filetype. -Making your own syntax files is very simple. I recommend you check the file after you are finished with the -[`syntax_checker.go`](./syntax_checker.go) program (located in this directory). Just place your yaml syntax -file in the current directory and run `go run syntax_checker.go` and it will check every file. If there are no -errors it will print `No issues!`. - You can read more about how to write syntax files (and colorschemes) in the [colors](../help/colors.md) documentation. # Legacy '.micro' filetype From 02e69dddbe23bbbe97f71d7f5c0784b2dfd3e42e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6ran=20Karl?= <3951388+JoeKar@users.noreply.github.com> Date: Sat, 15 Mar 2025 15:17:05 +0100 Subject: [PATCH 2/2] doc: syntax: Add hint about incompatibilities to previous versions --- runtime/syntax/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/runtime/syntax/README.md b/runtime/syntax/README.md index a31acc02..959b33a9 100644 --- a/runtime/syntax/README.md +++ b/runtime/syntax/README.md @@ -33,6 +33,19 @@ Micro syntax files are almost identical to Nano's, except for some key differenc * Micro does not use `icolor`. Instead, for a case insensitive match, use the case insensitive flag (`i`) in the regular expression * For example, `icolor green ".*"` would become `color green "(?i).*"` +# Incompatibilities with older versions of micro + +With PR [#3458](https://github.com/zyedidia/micro/pull/3458) resp. commit +[a9b513a](https://github.com/zyedidia/micro/commit/a9b513a28adaaa7782505dc1e284e1a0132cb66f) +empty `rules: []` definitions are removed from all syntax files, since +`rules` are no longer mandatory. +Unfortunately they are mandatory for `micro` versions up to and including `v2.0.14`. + +To use newer syntax definitions from this repository with older `micro` versions +you have to add these `rules: []` to all regions not including `rules` already. +Otherwise you need to use syntax definitions before the above mentioned PR +for example from version [v2.0.14](https://github.com/zyedidia/micro/tree/v2.0.14). + # Using with colorschemes 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.