Square bracket in yaml files
Describe the bug
Not coloring closing square bracket in YAML files. The bracket is recognized if there is a space between the word and bracket.
To Reproduce
Scenerio 1
repos:
- repo: local
hooks:
- id: myid
types: [python]
- repo: local
hooks:
- id: secondid
types: [file, python]
See the color of [ and ] around texts python and file.
Scenerio 2
Opposed to the above, if there is a space as in here:
repos:
- repo: local
hooks:
- id: myid
types: [python ]
- repo: local
hooks:
- id: secondid
types: [file, python ]
it works as expected.
Expected behavior
Same color for both opening and closing square brackets, in both scenarios.
Screenshots
Scenario 1

Scenario 2

Yes, I can reproduce this issue.
I find that it is because this syntax rule of yaml:
execute 'syn match yamlPlainScalar /'.s:ns_plain_out.'/'
execute 'syn match yamlPlainScalar contained /'.s:ns_plain_in.'/'
And find it in :syntax:
yamlPlainScalar xxx match /\%([^\-?:,[\]{}#&*!|>'"%@`\n\r\uFEFF \t]\|[?:\-]\%([^\n\r\uFEFF \t]\)\@=\)\%([
^\n\r\uFEFF \t]#\|:[^\n\r\uFEFF \t]\|[^\n\r\uFEFF \t:#]\)*/
match /\%([^\-?:,[\]{}#&*!|>'"%@`\n\r\uFEFF \t]\|[?:\-]\%([^,[\]{}\n\r\uFEFF \t]\)\@=\
)\%([^\n\r\uFEFF \t]#\|:[^,[\]{}\n\r\uFEFF \t]\|[^,[\]{}\n\r\uFEFF \t:#]\)*/ contained
So, the possible solution might be:
option1: add syn clear yamlPlainScalar in the "after" configuration field.
option2: disable rainbow for yaml seperately.
Do I understand correctly that the issue is yamlPlainScalar includes the closing square bracket as part of the scalar? Removing yamlPlainScalar isn't great as it loses the highlighting for the scalar itself...