[vim/vim] YAML syntax issue: everything before the last colon in a line seems to be treated as a key (Issue #15196)

8 views
Skip to first unread message

moronizzz

unread,
Jul 9, 2024, 11:10:07 AM (13 days ago) Jul 9
to vim/vim, Subscribed

Steps to reproduce

To open a yaml file with the example content, the value: seems to be highlighted:

some_key: value:value
some_list:
- value:value

24070901.png (view on web)

Expected behaviour

To not highlight values containing colons.

Version of Vim

9.1

Environment

OS: Manjaro Linux
Terminal: Konsole 24.05.1
Shell: bash 5.2.26

Logs and stack traces

No response


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15196@github.com>

Christian Brabandt

unread,
Jul 10, 2024, 8:58:25 AM (12 days ago) Jul 10
to vim/vim, Subscribed

Unfortunately, the Yaml syntax file is currently unmaintained and uses hardly to ready black magic regexes, so I cannot guess how to fix this.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15196/2220446082@github.com>

moronizzz

unread,
Jul 10, 2024, 9:08:48 AM (12 days ago) Jul 10
to vim/vim, Subscribed

As I understand it was recently updated, not sure if the bug is introduced with this commit: cc7597c

I just took previous version of the syntax file as a workaround for now. I agree it is pretty hard to understand how it works.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15196/2220468158@github.com>

Christian Brabandt

unread,
Jul 10, 2024, 9:18:28 AM (12 days ago) Jul 10
to vim/vim, Subscribed

ah, so it comes from #14354 ping @itchyny perhaps he has an idea


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15196/2220489435@github.com>

itchyny

unread,
Jul 10, 2024, 4:57:56 PM (12 days ago) Jul 10
to vim/vim, Subscribed

I'll take a look this weekend.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15196/2221448581@github.com>

moronizzz

unread,
Jul 11, 2024, 3:45:13 AM (11 days ago) Jul 11
to vim/vim, Subscribed

Just one more note, as I presume we can miss it while fixing this issue. As I understand the keys also can contain colons, so it might be worth to check this case against possible changes in the syntax file as well e.g.

aws:cdk:path: some/path


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/15196/2222256932@github.com>

Christian Brabandt

unread,
Jul 21, 2024, 3:22:48 AM (yesterday) Jul 21
to vim/vim, Subscribed

Closed #15196 as completed via aa49512.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/15196/issue_event/13591631972@github.com>

Reply all
Reply to author
Forward
0 new messages