[vim/vim] Minor syntax highlighting issue with swayconfig files (Issue #14826)

5 views
Skip to first unread message

Diego Viola

unread,
May 22, 2024, 2:33:35 PMMay 22
to vim/vim, Subscribed

Steps to reproduce

This is a continuation of #14752, and while syntax highlghiting improved a lot there is still a minor issue with the following config:

floating_modifier $mod normal

The "normal" string shows up in red.

Here's a screenshot of what it currently looks like:

20240522_15h22m56s_grim.png (view on web)

Expected behaviour

Syntax highlighting is properly applied to all commands.

Version of Vim

9.1.429

Environment

Operating system: Arch Linux
Terminal: foot
Value of $TERM: foot
Shell: /usr/bin/bash

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/14826@github.com>

Diego Viola

unread,
May 22, 2024, 2:36:11 PMMay 22
to vim/vim, Subscribed

Should have been labelled as bug, and not enhancement. Anyway, @JosefLitos @jamespeapen (ping).


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/14826/2125496341@github.com>

James Eapen

unread,
May 22, 2024, 3:51:34 PMMay 22
to vim/vim, Subscribed

I can replicate this. It looks like contained was introduced in 679f5ab to floating_modifier in swayconfig.vim which seems to conflict with the i3 floating_modifier.

-syn match i3ConfigKeyword /^floating_modifier [$a-zA-Z0-9+]\+ \(normal\|inverse\)$/ contains=i3ConfigVariable,i3ConfigBindModkey,swayConfigFloatingModifierOpts
+syn match i3ConfigKeyword /floating_modifier [$a-zA-Z0-9+]\+ \(normal\|inverse\)$/ contained contains=i3ConfigVariable,i3ConfigBindModkey,swayConfigFloatingModifierOpts

Removing this fixes this problem. However, on checking the docs, it looks like floating_modifier none is a valid option that the syntax does not currently cover so I'll send a fix with both.


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/14826/2125631645@github.com>

Diego Viola

unread,
May 22, 2024, 4:57:57 PMMay 22
to vim/vim, Subscribed

@jamespeapen Thanks a lot again for your amazing work!


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/14826/2125731065@github.com>

Christian Brabandt

unread,
May 23, 2024, 2:50:39 PMMay 23
to vim/vim, Subscribed

Closed #14826 as completed via 22ac941.


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/14826/issue_event/12913937091@github.com>

Reply all
Reply to author
Forward
0 new messages