egberts / vim-syntax-bind-named

Vim/NeoVIM syntax for ISC Bind named.conf configuration file.
MIT License
22 stars 5 forks source link

"dnstap-output" distorts rendering of subsequent options #5

Closed kempniu closed 4 years ago

kempniu commented 4 years ago

I am observing a rather funky highlighting effect with dnstap-output:

dnstap-output-dnstap-all

Without dnstap { all; };:

dnstap-output

And here is dnstap { all; }; without dnstap-output (looks as expected):

dnstap-all

Here is the sample configuration file for easy copy-paste:

options {
    dnstap-output file "dnstap.out";
    dnstap { all; };
    send-cookie no;
    require-server-cookie no;
    minimal-responses no;
    dnssec-validation yes;
    qname-minimization disabled;
};

I would be happy to help with debugging this and/or test any potential fixes.

egberts commented 4 years ago

FOREWORD: any dark-cyan highlighting is that error spot. (It's supposed to be red, but that my next task).

Progress: 'dnstap' keyword is found in both 'view' and 'options'. The namedOV_Dnstap is that starting (or ending) point. It has the necessary highlighting and everything but this rule didn't fire within Vim 8.1.

So the next step is to look at the previous statement: dnstap-output .... Taking that out will make the dnstap { all; }; and the rest of the options work and properly highlighted again.

So, the cultprit is the dnstap-output rule. And as a detector, the ending semicolon symbol to the dnsstap-output rule was highlighted as dark-cyan (it should have been soft green).

On a separate slightly related note: this same 'dnstap { all; };' doesn't work inside a 'view' clause. :-/

egberts commented 4 years ago

Fixed it in 9394ac15f346236e612944f332c747f81401d449

egberts commented 4 years ago

Thank you for the issue report, @kempniu