4
4
" Maintainer: James Eapen <[email protected] >
5
5
" Version: 1.2.4
6
6
" Last Change: 2024 Oct 17
7
+ " 2025 Sep 23 by Vim Project update swayconfig syntax #18293
7
8
8
9
" References:
9
10
" http://i3wm.org/docs/userguide.html#configuring
@@ -60,6 +61,14 @@ syn keyword i3ConfigKeyword xwayland contained skipwhite nextgroup=swayConfigXOp
60
61
syn keyword swayConfigInhibitOpts focus fullscreen open none visible contained
61
62
syn keyword i3ConfigActionKeyword inhibit_idle contained skipwhite nextgroup =swayConfigInhibitOpts
62
63
64
+ " Primary selection
65
+ " Allow tearing
66
+ syn keyword i3ConfigKeyword primary_selection allow_tearing contained skipwhite nextgroup =i3ConfigBoolean
67
+
68
+ " Swaybg command
69
+ " Swaynag command
70
+ syn keyword i3ConfigKeyword swaybg_command swaynag_command contained nextgroup =i3ConfigExec
71
+
63
72
" Bindswitch
64
73
syn match swayConfigBindswitchArgument / --\( locked\| no-warn\| reload\) / contained nextgroup =swayConfigBindswitchArgument,swayConfigBindswitchType
65
74
syn keyword swayConfigBindswitchType lid tablet contained nextgroup =swayConfigBindswitchCombo
@@ -88,14 +97,16 @@ syn match i3ConfigKeyword /titlebar_padding \(\d\+\|\$\S\+\)\( \d\+\)\?$/ contai
88
97
syn match swayConfigDeviceOper / [*:;!]/ contained
89
98
90
99
" Input devices
91
- syn keyword swayConfigInputOpts xkb_variant xkb_rules xkb_switch_layout xkb_numlock xkb_file xkb_capslock xkb_model repeat_delay repeat_rate map_to_output map_to_region map_from_region tool_mode accel_profile dwt dwtp drag_lock drag click_method middle_emulation tap events calibration_matrix natural_scroll left_handed pointer_accel scroll_button scroll_factor scroll_method tap_button_map contained skipwhite nextgroup =swayConfigInputOptVals,@i3ConfigValue
100
+ syn keyword swayConfigInputOpts xkb_variant xkb_rules xkb_switch_layout xkb_numlock xkb_file xkb_capslock xkb_model repeat_delay repeat_rate map_to_output map_to_region map_from_region tool_mode accel_profile dwt dwtp drag_lock drag click_method clickfinger_button_map middle_emulation tap events calibration_matrix natural_scroll left_handed pointer_accel scroll_button scroll_button_lock scroll_factor scroll_method tap_button_map contained skipwhite nextgroup =swayConfigInputOptVals,@i3ConfigValue
92
101
syn keyword swayConfigInputOptVals absolute relative adaptive flat none button_areas clickfinger toggle two_finger edge on_button_down lrm lmr next prev pen eraser brush pencil airbrush disabled_on_external_mouse disable enable contained skipwhite nextgroup =swayConfigInputOpts,@i3ConfigValue,swayConfigDeviceOper
93
102
syn match swayConfigDeviceOper / ,/ contained nextgroup =swayConfigXkbOptsPair,swayConfigXkbLayout
94
103
syn match swayConfigXkbLayout / [a-z]\+ / contained nextgroup =swayConfigDeviceOper
95
104
syn keyword swayConfigInputOpts xkb_layout contained skipwhite nextgroup =swayConfigXkbLayout
96
105
syn match swayConfigXkbOptsPairVal / [0-9a-z_-]\+ / contained contains =i3ConfigNumber skipwhite nextgroup =swayConfigDeviceOper,swayConfigInputOpts
97
106
syn match swayConfigXkbOptsPair / [a-z]\+ :/ contained contains =i3ConfigColonOperator nextgroup =swayConfigXkbOptsPairVal
98
107
syn keyword swayConfigInputOpts xkb_options contained skipwhite nextgroup =swayConfigXkbOptsPair
108
+ syn match swayConfigInputAngle / \( 3[0-5][0-9]\| [1-2]\? [0-9]\{ 1,2\}\)\(\. [0-9]\+\)\? / skipwhite nextgroup =swayConfigInputOpts
109
+ syn keyword swayConfigInputOpts rotation_angle contained skipwhite nextgroup =swayConfigInputAngle
99
110
100
111
syn region swayConfigInput start =/ \s / skip =/ \\ $/ end =/ \z e[,;]\| $/ contained contains =swayConfigInputOpts,@i3ConfigValue keepend
101
112
syn region swayConfigInput matchgroup =i3ConfigParen start =/ {$/ end =/ ^\s *}$/ contained contains =swayConfigInputOpts,@i3ConfigValue,i3ConfigComment keepend extend
@@ -118,8 +129,8 @@ syn match swayConfigSeatIdent /[^ ]\+/ contained contains=i3ConfigOutputIdent sk
118
129
syn keyword i3ConfigKeyword seat contained skipwhite nextgroup =swayConfigSeatIdent
119
130
120
131
" Output monitors
121
- syn keyword swayConfigOutputOpts mode resolution res modeline position pos scale scale_filter subpixel transform disable enable power dpms max_render_time adaptive_sync render_bit_depth contained skipwhite nextgroup =swayConfigOutputOptVals,@i3ConfigValue,swayConfigOutputMode
122
- syn keyword swayConfigOutputOptVals linear nearest smart rgb bgr vrgb vbgr none clockwise anticlockwise toggle contained skipwhite nextgroup =swayConfigOutputOptVals,@i3ConfigValue
132
+ syn keyword swayConfigOutputOpts mode resolution res modeline position pos scale scale_filter subpixel transform disable enable power dpms max_render_time adaptive_sync render_bit_depth color_profile allow_tearing contained skipwhite nextgroup =swayConfigOutputOptVals,@i3ConfigValue,swayConfigOutputMode
133
+ syn keyword swayConfigOutputOptVals linear nearest smart rgb bgr vrgb vbgr none clockwise anticlockwise toggle srgb icc contained skipwhite nextgroup =swayConfigOutputOptVals,@i3ConfigValue,i3ConfigShOper
123
134
syn keyword swayConfigOutputBgVals solid_color fill stretch fit center tile contained skipwhite nextgroup =@i3ConfigColVar
124
135
syn match swayConfigOutputBg / [#$]\S\+ solid_color/ contained contains =@i3ConfigColVar,swayConfigOutputBgVals
125
136
syn match swayConfigOutputBg / [^b# '"]\S */ contained contains =i3ConfigShOper skipwhite nextgroup =swayConfigOutputBgVals
@@ -148,6 +159,7 @@ hi def link swayConfigInputType i3ConfigMoveType
148
159
hi def link swayConfigInputIdent i3ConfigMoveDir
149
160
hi def link swayConfigInputOptVals i3ConfigShParam
150
161
hi def link swayConfigInputOpts i3ConfigOption
162
+ hi def link swayConfigInputAngle i3ConfigNumber
151
163
hi def link swayConfigXkbOptsPairVal i3ConfigParamLine
152
164
hi def link swayConfigXkbOptsPair i3ConfigShParam
153
165
hi def link swayConfigXkbLayout i3ConfigParamLine
0 commit comments