summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJames Eapen <james.eapen@vai.org>2024-05-23 20:47:49 +0200
committerChristian Brabandt <cb@256bit.org>2024-05-23 20:48:54 +0200
commit22ac941208fcb2c63ad172c6cf0b39b077b5b682 (patch)
tree7e2af0883d76af9261d1ef0f2c7d4ec06e8d0946
parent742062f31faca14ae479f4688a5ad8add5d5c120 (diff)
runtime(i3config/swayconfig): support floating_modifier none; revert broken highlighting
- fix floating_modifier $mod normal|inverse was being hightlighted as error reverting the floating_modifier change from dd83b63 - will currently allow invalid syntax after floating_modifier fixes: #14826 closes: #14827 Co-authored-by: JosefLitos <litosjos@fit.cvut.cz> Signed-off-by: James Eapen <james.eapen@vai.org> Signed-off-by: Christian Brabandt <cb@256bit.org>
-rw-r--r--runtime/syntax/i3config.vim6
-rw-r--r--runtime/syntax/swayconfig.vim8
2 files changed, 7 insertions, 7 deletions
diff --git a/runtime/syntax/i3config.vim b/runtime/syntax/i3config.vim
index 7d01693c79..f4d789e418 100644
--- a/runtime/syntax/i3config.vim
+++ b/runtime/syntax/i3config.vim
@@ -2,8 +2,8 @@
" Language: i3 config file
" Original Author: Josef Litos (JosefLitos/i3config.vim)
" Maintainer: Quentin Hibon (github user hiqua)
-" Version: 1.2.2
-" Last Change: 2024-04-14
+" Version: 1.2.3
+" Last Change: 2024-05-23
" References:
" http://i3wm.org/docs/userguide.html#configuring
@@ -67,7 +67,7 @@ syn keyword i3ConfigBindKeyword bindsym bindcode contained skipwhite nextgroup=i
syn region i3ConfigModeBlock matchgroup=i3ConfigKeyword start=/mode\ze\( --pango_markup\)\? \([^'" {]\+\|'[^']\+'\|".\+"\)\s\+{$/ end=/^}\zs$/ contained contains=i3ConfigShParam,@i3ConfigStrVar,i3ConfigBindKeyword,i3ConfigComment,i3ConfigParen fold keepend extend
" 4.7 Floating modifier
-syn keyword i3ConfigKeyword floating_modifier contained skipwhite nextgroup=i3ConfigVariable,i3ConfigBindModkey
+syn match i3ConfigKeyword /^floating_modifier [$0-9A-Za-z]*$/ contains=i3ConfigVariable,i3ConfigBindModkey
" 4.8 Floating window size
syn keyword i3ConfigSizeSpecial x contained
diff --git a/runtime/syntax/swayconfig.vim b/runtime/syntax/swayconfig.vim
index f1eba30a92..401412adfd 100644
--- a/runtime/syntax/swayconfig.vim
+++ b/runtime/syntax/swayconfig.vim
@@ -2,8 +2,8 @@
" Language: sway config file
" Original Author: Josef Litos (JosefLitos/i3config.vim)
" Maintainer: James Eapen <james.eapen@vai.org>
-" Version: 1.2.2
-" Last Change: 2024-05-12
+" Version: 1.2.3
+" Last Change: 2024-05-23
" References:
" http://i3wm.org/docs/userguide.html#configuring
@@ -38,8 +38,8 @@ syn region swayConfigBlockOrphan start=/^\s\+\(--[a-z-]\+ \)*\([A-Z$][$a-zA-Z0-9
syn region i3ConfigExec start=/ {$/ end=/^\s*}$/ contained contains=i3ConfigExecAction,@i3ConfigSh,i3ConfigComment fold keepend extend
-syn keyword swayConfigFloatingModifierOpts normal inverse contained
-syn match i3ConfigKeyword /floating_modifier [$a-zA-Z0-9+]\+ \(normal\|inverse\)$/ contained contains=i3ConfigVariable,i3ConfigBindModkey,swayConfigFloatingModifierOpts
+syn keyword swayConfigFloatingModifierOpts normal inverse none contained
+syn match i3ConfigKeyword /floating_modifier \(none\|[$a-zA-Z0-9+]\+ \(normal\|inverse\)\)$/ contained contains=i3ConfigVariable,i3ConfigBindModkey,swayConfigFloatingModifierOpts
syn match swayConfigI3Param /--i3/ contains=i3ConfigShParam skipwhite nextgroup=i3ConfigEdgeOpts
syn keyword i3ConfigKeyword hide_edge_borders contained skipwhite nextgroup=swayConfigI3Param,i3ConfigEdgeOpts