#4252

using `limit-group` in a syntax file region breaks `include`

OpenAndriamanitraopened 1mo ago

Description

This came up in #4250 (https://github.com/micro-editor/micro/pull/4250/changes#r4134294554).

Minimal reproduction:

~/.config/micro/syntax/test.yaml:

filetype: test
detect:
    filename: "test$"
rules:
    - default:
        start: "START"
        end: "END"
        limit-group: symbol.tag
        rules:
            - include: "javascript"

test:

START
const abc = 123;
END

Resulting highlighting with default config:

Expected (screenshot taken in a build from #3127 which seems to fix this issue):

If you comment out the limit-group line in the syntax file the include starts working.

Environment

Version: 2.0.16-dev.87 Commit hash: 50a6fe59 Compiled on September 30, 2026

Activity

1
JoeKar28d ago

I tried this in my local revision of #3127 as well, and the issue is resolved there, too. Unfortunately, there are still a few bugs, and the commit history needs to be cleaned up, which is why the push hasn't been made yet.