Skip to content

Commit

Permalink
fix: support floating_modifier none; revert broken highlighting
Browse files Browse the repository at this point in the history
 - 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

Co-authored-by: JosefLitos <litosjos@fit.cvut.cz>
  • Loading branch information
jamespeapen and JosefLitos committed May 23, 2024
1 parent 5090f83 commit c6e0dde
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion runtime/syntax/i3config.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions runtime/syntax/swayconfig.vim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c6e0dde

Please sign in to comment.