vim-patch:2ecbe53f452e (#19577)

Update runtime files
2ecbe53f45
This commit is contained in:
Christian Clason 2022-07-30 15:48:32 +02:00 committed by GitHub
parent d36d9be8ff
commit 6237ac8402
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
14 changed files with 225 additions and 70 deletions

View File

@ -4907,8 +4907,8 @@ matchadd({group}, {pattern} [, {priority} [, {id} [, {dict}]]])
message will appear and the match will not be added. An ID
is specified as a positive integer (zero excluded). IDs 1, 2
and 3 are reserved for |:match|, |:2match| and |:3match|,
respectively. 3 is reserved for use by the
|matchparen| plugin.
respectively. 3 is reserved for use by the |matchparen|
plugin.
If the {id} argument is not specified or -1, |matchadd()|
automatically chooses a free ID.

View File

@ -765,6 +765,8 @@ When the {string} starts with "\=" it is evaluated as an expression, see
|sub-replace-expression|. You can use that for complex replacement or special
characters.
The substitution is limited in recursion to 4 levels. *E1290*
Otherwise these characters in {string} have a special meaning:
magic nomagic action ~

View File

@ -92,7 +92,7 @@ zuW *zuG* *zuW*
zuG Undo |zW| and |zG|, remove the word from the internal
word list. Count used as with |zg|.
*:spe* *:spellgood*
*:spe* *:spellgood* *E1280*
:[count]spe[llgood] {word}
Add {word} as a good word to 'spellfile', like with
|zg|. Without count the first name is used, with a

View File

@ -1,9 +1,9 @@
" Vim filetype plugin file (GUI menu, folding and completion)
" Language: Debian Changelog
" Maintainer: Debian Vim Maintainers
" Maintainer: Debian Vim Maintainers <team+vim@tracker.debian.org>
" Former Maintainers: Michael Piefel <piefel@informatik.hu-berlin.de>
" Stefano Zacchiroli <zack@debian.org>
" Last Change: 2018-01-28
" Last Change: 2022 Jul 25
" License: Vim License
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/ftplugin/debchangelog.vim
@ -35,6 +35,11 @@ if exists('g:did_changelog_ftplugin')
finish
endif
" Make sure the '<' and 'C' flags are not included in 'cpoptions', otherwise
" <CR> would not be recognized. See ":help 'cpoptions'".
let s:cpo_save = &cpo
set cpo&vim
" Don't load another plugin (this is global)
let g:did_changelog_ftplugin = 1
@ -101,13 +106,13 @@ endfunction
" These functions implement the menus
function NewVersion()
" The new entry is unfinalised and shall be changed
amenu disable Changelog.New\ Version
amenu enable Changelog.Add\ Entry
amenu enable Changelog.Close\ Bug
amenu enable Changelog.Set\ Distribution
amenu enable Changelog.Set\ Urgency
amenu disable Changelog.Unfinalise
amenu enable Changelog.Finalise
amenu disable &Changelog.&New\ Version
amenu enable &Changelog.&Add\ Entry
amenu enable &Changelog.&Close\ Bug
amenu enable &Changelog.Set\ &Distribution
amenu enable &Changelog.Set\ &Urgency
amenu disable &Changelog.U&nfinalise
amenu enable &Changelog.&Finalise
call append(0, substitute(getline(1), '-\([[:digit:]]\+\))', '-$$\1)', ''))
call append(1, '')
call append(2, '')
@ -117,7 +122,9 @@ function NewVersion()
normal! 1G0
call search(')')
normal! h
normal! 
" ':normal' doens't support key annotation (<c-a>) directly.
" Vim's manual recommends using ':exe' to use key annotation indirectly (backslash-escaping needed though).
exe "normal! \<c-a>"
call setline(1, substitute(getline(1), '-\$\$', '-', ''))
if exists('g:debchangelog_fold_enable')
foldopen
@ -161,13 +168,13 @@ endfunction
function <SID>UnfinaliseMenu()
" This means the entry shall be changed
amenu disable Changelog.New\ Version
amenu enable Changelog.Add\ Entry
amenu enable Changelog.Close\ Bug
amenu enable Changelog.Set\ Distribution
amenu enable Changelog.Set\ Urgency
amenu disable Changelog.Unfinalise
amenu enable Changelog.Finalise
amenu disable &Changelog.&New\ Version
amenu enable &Changelog.&Add\ Entry
amenu enable &Changelog.&Close\ Bug
amenu enable &Changelog.Set\ &Distribution
amenu enable &Changelog.Set\ &Urgency
amenu disable &Changelog.U&nfinalise
amenu enable &Changelog.&Finalise
endfunction
function Unfinalise()
@ -179,13 +186,13 @@ endfunction
function <SID>FinaliseMenu()
" This means the entry should not be changed anymore
amenu enable Changelog.New\ Version
amenu disable Changelog.Add\ Entry
amenu disable Changelog.Close\ Bug
amenu disable Changelog.Set\ Distribution
amenu disable Changelog.Set\ Urgency
amenu enable Changelog.Unfinalise
amenu disable Changelog.Finalise
amenu enable &Changelog.&New\ Version
amenu disable &Changelog.&Add\ Entry
amenu disable &Changelog.&Close\ Bug
amenu disable &Changelog.Set\ &Distribution
amenu disable &Changelog.Set\ &Urgency
amenu enable &Changelog.U&nfinalise
amenu disable &Changelog.&Finalise
endfunction
function Finalise()
@ -198,26 +205,26 @@ endfunction
function <SID>MakeMenu()
amenu &Changelog.&New\ Version :call NewVersion()<CR>
amenu Changelog.&Add\ Entry :call AddEntry()<CR>
amenu Changelog.&Close\ Bug :call CloseBug()<CR>
menu Changelog.-sep- <nul>
amenu &Changelog.&Add\ Entry :call AddEntry()<CR>
amenu &Changelog.&Close\ Bug :call CloseBug()<CR>
menu &Changelog.-sep- <nul>
amenu Changelog.Set\ &Distribution.&unstable :call Distribution("unstable")<CR>
amenu Changelog.Set\ Distribution.&frozen :call Distribution("frozen")<CR>
amenu Changelog.Set\ Distribution.&stable :call Distribution("stable")<CR>
menu Changelog.Set\ Distribution.-sep- <nul>
amenu Changelog.Set\ Distribution.frozen\ unstable :call Distribution("frozen unstable")<CR>
amenu Changelog.Set\ Distribution.stable\ unstable :call Distribution("stable unstable")<CR>
amenu Changelog.Set\ Distribution.stable\ frozen :call Distribution("stable frozen")<CR>
amenu Changelog.Set\ Distribution.stable\ frozen\ unstable :call Distribution("stable frozen unstable")<CR>
amenu &Changelog.Set\ &Distribution.&unstable :call Distribution("unstable")<CR>
amenu &Changelog.Set\ &Distribution.&frozen :call Distribution("frozen")<CR>
amenu &Changelog.Set\ &Distribution.&stable :call Distribution("stable")<CR>
menu &Changelog.Set\ &Distribution.-sep- <nul>
amenu &Changelog.Set\ &Distribution.frozen\ unstable :call Distribution("frozen unstable")<CR>
amenu &Changelog.Set\ &Distribution.stable\ unstable :call Distribution("stable unstable")<CR>
amenu &Changelog.Set\ &Distribution.stable\ frozen :call Distribution("stable frozen")<CR>
amenu &Changelog.Set\ &Distribution.stable\ frozen\ unstable :call Distribution("stable frozen unstable")<CR>
amenu Changelog.Set\ &Urgency.&low :call Urgency("low")<CR>
amenu Changelog.Set\ Urgency.&medium :call Urgency("medium")<CR>
amenu Changelog.Set\ Urgency.&high :call Urgency("high")<CR>
amenu &Changelog.Set\ &Urgency.&low :call Urgency("low")<CR>
amenu &Changelog.Set\ &Urgency.&medium :call Urgency("medium")<CR>
amenu &Changelog.Set\ &Urgency.&high :call Urgency("high")<CR>
menu Changelog.-sep- <nul>
amenu Changelog.U&nfinalise :call Unfinalise()<CR>
amenu Changelog.&Finalise :call Finalise()<CR>
menu &Changelog.-sep- <nul>
amenu &Changelog.U&nfinalise :call Unfinalise()<CR>
amenu &Changelog.&Finalise :call Finalise()<CR>
if <SID>Finalised()
call <SID>FinaliseMenu()
@ -228,7 +235,7 @@ endfunction
augroup changelogMenu
au BufEnter * if &filetype == "debchangelog" | call <SID>MakeMenu() | endif
au BufLeave * if &filetype == "debchangelog" | silent! aunmenu Changelog | endif
au BufLeave * if &filetype == "debchangelog" | silent! aunmenu &Changelog | endif
augroup END
" }}}
@ -380,4 +387,8 @@ setlocal omnifunc=DebCompleteBugs
" }}}
" Restore the previous value of 'cpoptions'.
let &cpo = s:cpo_save
unlet s:cpo_save
" vim: set foldmethod=marker:

View File

@ -0,0 +1,13 @@
" Vim filetype plugin file
" Language: XDG desktop entry
" Maintainer: Eisuke Kawashima ( e.kawaschima+vim AT gmail.com )
" Last Change: 2022-07-26
if exists('b:did_ftplugin')
finish
endif
let b:did_ftplugin = v:true
setl comments=:#
setl commentstring=#%s
let b:undo_ftplugin = 'setl com< cms<'

View File

@ -0,0 +1,16 @@
" Vim filetype plugin file
" Language: sway config file
" Original Author: James Eapen <james.eapen@vai.org>
" Maintainer: James Eapen <james.eapen@vai.org>
" Version: 0.1
" Last Change: 2022 June 07
if exists("b:did_ftplugin")
finish
endif
let b:did_ftplugin = 1
let b:undo_ftplugin = "setlocal cms<"
setlocal commentstring=#\ %s

View File

@ -600,7 +600,7 @@ func s:Alien3()
endif
if b:hi_indent.scripttype == "javascript"
" indent for further lines
return eval(b:hi_js1indent) + GetJavascriptIndent()
return GetJavascriptIndent()
else
return -1
endif

View File

@ -473,6 +473,12 @@ function GetJavascriptIndent()
elseif num
return s:Nat(num_ind + get(l:,'case_offset',s:sw()) + l:switch_offset + b_l + is_op)
endif
let nest = get(get(b:, 'hi_indent', {}), 'blocklnr')
if nest
return indent(nextnonblank(nest + 1)) + b_l + is_op
endif
return b_l + is_op
endfunction

View File

@ -2,7 +2,7 @@
" Language: AutoHotkey script file
" Maintainer: Michael Wong
" https://github.com/mmikeww/autohotkey.vim
" Latest Revision: 2017-04-03
" Latest Revision: 2022-07-25
" Previous Maintainers: SungHyun Nam <goweol@gmail.com>
" Nikolai Weibull <now@bitwi.se>
@ -31,7 +31,7 @@ syn region autohotkeyString
\ matchgroup=autohotkeyStringDelimiter
\ start=+"+
\ end=+"+
\ contains=autohotkeyEscape
\ contains=autohotkeyEscape,autohotkeyMatchClass
syn match autohotkeyVariable
\ display
@ -49,9 +49,9 @@ syn keyword autohotkeyBuiltinVariable
\ A_Sec A_MSec A_Now A_NowUTC A_TickCount
\ A_IsSuspended A_IsPaused A_IsCritical A_BatchLines A_TitleMatchMode A_TitleMatchModeSpeed
\ A_DetectHiddenWindows A_DetectHiddenText A_AutoTrim A_StringCaseSense
\ A_FileEncoding A_FormatInteger A_FormatFloat A_KeyDelay A_WinDelay A_ControlDelay
\ A_SendMode A_SendLevel A_StoreCapsLockMode A_KeyDelay A_KeyDelayDuration
\ A_KeyDelayPlay A_KeyDelayPlayDuration A_MouseDelayPlay
\ A_FileEncoding A_FormatInteger A_FormatFloat A_WinDelay A_ControlDelay
\ A_SendMode A_SendLevel A_StoreCapsLockMode A_KeyDelay A_KeyDuration
\ A_KeyDelayPlay A_KeyDurationPlay A_MouseDelayPlay
\ A_MouseDelay A_DefaultMouseSpeed A_RegView A_IconHidden A_IconTip A_IconFile
\ A_CoordModeToolTip A_CoordModePixel A_CoordModeMouse A_CoordModeCaret A_CoordModeMenu
\ A_IconNumber
@ -73,6 +73,7 @@ syn keyword autohotkeyBuiltinVariable
\ A_LoopFileShortName A_LoopFileDir A_LoopFileTimeModified A_LoopFileTimeCreated
\ A_LoopFileTimeAccessed A_LoopFileAttrib A_LoopFileSize A_LoopFileSizeKB A_LoopFileSizeMB
\ A_LoopRegType A_LoopRegKey A_LoopRegSubKey A_LoopRegTimeModified
\ A_TimeIdleKeyboard A_TimeIdleMouse A_ListLines A_ComSpec A_LoopFilePath A_Args
syn match autohotkeyBuiltinVariable
\ contained
@ -118,6 +119,7 @@ syn keyword autohotkeyCommand
\ WinMinimizeAll WinMinimizeAllUndo WinMove WinRestore WinSet
\ WinSetTitle WinShow WinWait WinWaitActive WinWaitNotActive WinWaitClose
\ SetCapsLockState SetNumLockState SetScrollLockState
\ Hotstring LoadPicture MenuGetHandle MenuGetName OnError OnClipboardChange
syn keyword autohotkeyFunction
\ InStr RegExMatch RegExReplace StrLen SubStr Asc Chr Func
@ -127,7 +129,7 @@ syn keyword autohotkeyFunction
\ IsFunc Trim LTrim RTrim IsObject Object Array FileOpen
\ ComObjActive ComObjArray ComObjConnect ComObjCreate ComObjGet
\ ComObjError ComObjFlags ComObjQuery ComObjType ComObjValue ComObject
\ Format Exception
\ Format Exception Ord InputHook
syn keyword autohotkeyStatement
\ Break Continue Exit ExitApp Gosub Goto OnExit Pause Return
@ -140,7 +142,8 @@ syn keyword autohotkeyConditional
\ IfExist IfNotExist If IfEqual IfLess IfGreater Else
\ IfWinExist IfWinNotExist IfWinActive IfWinNotActive
\ IfNotEqual IfLessOrEqual IfGreaterOrEqual
\ while until for in try catch finally
\ while until for in try catch finally not
\ switch case default
syn match autohotkeyPreProcStart
\ nextgroup=

View File

@ -3,7 +3,7 @@
" Maintainer: Debian Vim Maintainers
" Former Maintainers: Gerfried Fuchs <alfie@ist.org>
" Wichert Akkerman <wakkerma@debian.org>
" Last Change: 2022 May 01
" Last Change: 2022 Jul 25
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debchangelog.vim
" Standard syntax initialization
@ -20,22 +20,22 @@ let s:binNMU='binary-only=yes'
let s:cpo = &cpo
set cpo-=C
let s:supported = [
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
\ 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
\ 'trixie', 'sid', 'rc-buggy',
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', 'sid', 'rc-buggy',
\ 'buster', 'bullseye', 'bookworm', 'trixie',
\
\ 'trusty', 'xenial', 'bionic', 'focal', 'impish', 'jammy', 'kinetic',
\ 'trusty', 'xenial', 'bionic', 'focal', 'jammy', 'kinetic',
\ 'devel'
\ ]
let s:unsupported = [
\ 'frozen', 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
\ 'woody', 'sarge', 'etch', 'lenny', 'squeeze', 'wheezy',
\ 'jessie', 'stretch',
\
\ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
\ 'disco', 'eoan', 'hirsute', 'groovy'
\ 'disco', 'eoan', 'hirsute', 'impish', 'groovy'
\ ]
let &cpo=s:cpo

View File

@ -2,7 +2,7 @@
" Language: Debian sources.list
" Maintainer: Debian Vim Maintainers
" Former Maintainer: Matthijs Mohlmann <matthijs@cacholong.nl>
" Last Change: 2022 May 01
" Last Change: 2022 Jul 25
" URL: https://salsa.debian.org/vim-team/vim-debian/blob/master/syntax/debsources.vim
" Standard syntax initialization
@ -22,22 +22,22 @@ syn match debsourcesComment /#.*/ contains=@Spell
let s:cpo = &cpo
set cpo-=C
let s:supported = [
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental',
\ 'jessie', 'stretch', 'buster', 'bullseye', 'bookworm',
\ 'trixie', 'sid', 'rc-buggy',
\ 'oldstable', 'stable', 'testing', 'unstable', 'experimental', 'sid', 'rc-buggy',
\ 'buster', 'bullseye', 'bookworm', 'trixie',
\
\ 'trusty', 'xenial', 'bionic', 'focal', 'impish', 'jammy', 'kinetic',
\ 'trusty', 'xenial', 'bionic', 'focal', 'jammy', 'kinetic',
\ 'devel'
\ ]
let s:unsupported = [
\ 'buzz', 'rex', 'bo', 'hamm', 'slink', 'potato',
\ 'woody', 'sarge', 'etch', 'lenny', 'squeeze', 'wheezy',
\ 'jessie', 'stretch',
\
\ 'warty', 'hoary', 'breezy', 'dapper', 'edgy', 'feisty',
\ 'gutsy', 'hardy', 'intrepid', 'jaunty', 'karmic', 'lucid',
\ 'maverick', 'natty', 'oneiric', 'precise', 'quantal', 'raring', 'saucy',
\ 'utopic', 'vivid', 'wily', 'yakkety', 'zesty', 'artful', 'cosmic',
\ 'disco', 'eoan', 'hirsute', 'groovy'
\ 'disco', 'eoan', 'hirsute', 'impish', 'groovy'
\ ]
let &cpo=s:cpo

View File

@ -17,6 +17,9 @@ endif
scriptencoding utf-8
" Error
syn match i3ConfigError /.*/
" Todo
syn keyword i3ConfigTodo TODO FIXME XXX contained
@ -54,8 +57,8 @@ syn match i3ConfigInclude /^\s*include\s\+.*$/ contains=i3ConfigIncludeKeyword,i
" Gaps
syn keyword i3ConfigGapStyleKeyword inner outer horizontal vertical top right bottom left current all set plus minus toggle up down contained
syn match i3ConfigGapStyle /^\s*\(gaps\)\s\+\(inner\|outer\|horizontal\|vertical\|left\|top\|right\|bottom\)\(\s\+\(current\|all\)\)\?\(\s\+\(set\|plus\|minus\|toggle\)\)\?\(\s\+\(-\?\d\+\|\$.*\)\)$/ contains=i3ConfigGapStyleKeyword,i3ConfigNumber,i3ConfigVariable
syn keyword i3ConfigSmartGapKeyword on inverse_outer contained
syn match i3ConfigSmartGap /^\s*smart_gaps\s\+\(on\|inverse_outer\)\s\?$/ contains=i3ConfigSmartGapKeyword
syn keyword i3ConfigSmartGapKeyword on inverse_outer off contained
syn match i3ConfigSmartGap /^\s*smart_gaps\s\+\(on\|inverse_outer\|off\)\s\?$/ contains=i3ConfigSmartGapKeyword
syn keyword i3ConfigSmartBorderKeyword on no_gaps contained
syn match i3ConfigSmartBorder /^\s*smart_borders\s\+\(on\|no_gaps\)\s\?$/ contains=i3ConfigSmartBorderKeyword
@ -74,7 +77,7 @@ syn match i3ConfigBind /^\s*\(bindsym\|bindcode\)\s\+.*$/ contains=i3ConfigVaria
syn keyword i3ConfigSizeSpecial x contained
syn match i3ConfigNegativeSize /-/ contained
syn match i3ConfigSize /-\?\d\+\s\?x\s\?-\?\d\+/ contained contains=i3ConfigSizeSpecial,i3ConfigNumber,i3ConfigNegativeSize
syn match i3ConfigFloating /^\s*floating_modifier\s\+\$\w\+\d\?/ contains=i3ConfigVariable
syn match i3ConfigFloatingModifier /^\s*floating_modifier\s\+\$\w\+\d\?/ contains=i3ConfigVariable
syn match i3ConfigFloating /^\s*floating_\(maximum\|minimum\)_size\s\+-\?\d\+\s\?x\s\?-\?\d\+/ contains=i3ConfigSize
" Orientation
@ -183,6 +186,7 @@ syn region i3ConfigBlock start=+^\s*[^#]*s\?{$+ end=+^\s*[^#]*}$+ contains=i3Con
syn region i3ConfigLineCont start=/^.*\\$/ end=/^.*$/ contains=i3ConfigBlockKeyword,i3ConfigString,i3ConfigBind,i3ConfigComment,i3ConfigFont,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend
" Define the highlighting.
hi def link i3ConfigError Error
hi def link i3ConfigTodo Todo
hi def link i3ConfigComment Comment
hi def link i3ConfigFontContent Type
@ -213,6 +217,7 @@ hi def link i3ConfigTimeUnit Constant
hi def link i3ConfigModifier Constant
hi def link i3ConfigString Constant
hi def link i3ConfigNegativeSize Constant
hi def link i3ConfigInclude Constant
hi def link i3ConfigFontSeparator Special
hi def link i3ConfigVariableModifier Special
hi def link i3ConfigSizeSpecial Special
@ -233,6 +238,7 @@ hi def link i3ConfigLayout Identifier
hi def link i3ConfigBorderStyle Identifier
hi def link i3ConfigEdge Identifier
hi def link i3ConfigFloating Identifier
hi def link i3ConfigFloatingModifier Identifier
hi def link i3ConfigCommandKeyword Identifier
hi def link i3ConfigNoFocusKeyword Identifier
hi def link i3ConfigInitializeKeyword Identifier

View File

@ -1,7 +1,7 @@
" Vim syntax file
" Language: Python
" Maintainer: Zvezdan Petkovic <zpetkovic@acm.org>
" Last Change: 2021 Dec 10
" Last Change: 2022 Jun 28
" Credits: Neil Schemenauer <nas@python.ca>
" Dmitry Vasiliev
"
@ -84,13 +84,19 @@ syn keyword pythonStatement as assert break continue del global
syn keyword pythonStatement lambda nonlocal pass return with yield
syn keyword pythonStatement class def nextgroup=pythonFunction skipwhite
syn keyword pythonConditional elif else if
syn keyword pythonConditional case match
syn keyword pythonRepeat for while
syn keyword pythonOperator and in is not or
syn keyword pythonException except finally raise try
syn keyword pythonInclude from import
syn keyword pythonAsync async await
" Soft keywords
" These keywords do not mean anything unless used in the right context
" See https://docs.python.org/3/reference/lexical_analysis.html#soft-keywords
" for more on this.
syn match pythonConditional "^\s*\zscase\%(\s\+.*:.*$\)\@="
syn match pythonConditional "^\s*\zsmatch\%(\s\+.*:\s*\%(#.*\)\=$\)\@="
" Decorators
" A dot must be allowed because of @MyClass.myfunc decorators.
syn match pythonDecorator "@" display contained

View File

@ -0,0 +1,92 @@
" Vim syntax file
" Language: sway window manager config
" Original Author: James Eapen <james.eapen@vai.org>
" Maintainer: James Eapen <james.eapen@vai.org>
" Version: 0.11.0
" Last Change: 2022 Jun 07
" References:
" http://i3wm.org/docs/userguide.html#configuring
" https://github.com/swaywm/sway/blob/b69d637f7a34e239e48a4267ae94a5e7087b5834/sway/sway.5.scd
" http://vimdoc.sourceforge.net/htmldoc/syntax.html
"
"
" Quit when a syntax file was already loaded
if exists("b:current_syntax")
finish
endif
runtime! syntax/i3config.vim
scriptencoding utf-8
" Error
"syn match swayConfigError /.*/
" Group mode/bar
syn keyword swayConfigBlockKeyword set input contained
syn region swayConfigBlock start=+.*s\?{$+ end=+^}$+ contains=i3ConfigBlockKeyword,swayConfigBlockKeyword,i3ConfigString,i3ConfigBind,i3ConfigComment,i3ConfigFont,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend
" binding
syn keyword swayConfigBindKeyword bindswitch bindgesture contained
syn match swayConfigBind /^\s*\(bindswitch\)\s\+.*$/ contains=i3ConfigVariable,i3ConfigBindKeyword,swayConfigBindKeyword,i3ConfigVariableAndModifier,i3ConfigNumber,i3ConfigUnit,i3ConfigUnitOr,i3ConfigBindArgument,i3ConfigModifier,i3ConfigAction,i3ConfigString,i3ConfigGapStyleKeyword,i3ConfigBorderStyleKeyword
" bindgestures
syn keyword swayConfigBindGestureCommand swipe pinch hold contained
syn keyword swayConfigBindGestureDirection up down left right next prev contained
syn keyword swayConfigBindGesturePinchDirection inward outward clockwise counterclockwise contained
syn match swayConfigBindGestureHold /^\s*\(bindgesture\)\s\+hold\(:[1-5]\)\?\s\+.*$/ contains=swayConfigBindKeyword,swayConfigBindGestureCommand,swayConfigBindGestureDirection,i3ConfigWorkspaceKeyword,i3ConfigAction
syn match swayConfigBindGestureSwipe /^\s*\(bindgesture\)\s\+swipe\(:[1-5]\)\?:\(up\|down\|left\|right\)\s\+.*$/ contains=swayConfigBindKeyword,swayConfigBindGestureCommand,swayConfigBindGestureDirection,i3ConfigWorkspaceKeyword,i3ConfigAction
syn match swayConfigBindGesturePinch /^\s*\(bindgesture\)\s\+\(pinch\):.*$/ contains=swayConfigBindKeyword,swayConfigBindGestureCommand,swayConfigBindGestureDirection,swayConfigBindGesturePinchDirection,i3ConfigWorkspaceKeyword,i3ConfigAction
" floating
syn keyword swayConfigFloatingKeyword floating contained
syn match swayConfigFloating /^\s*floating\s\+\(enable\|disable\|toggle\)\s*$/ contains=swayConfigFloatingKeyword
syn clear i3ConfigFloatingModifier
syn keyword swayConfigFloatingModifier floating_modifier contained
syn match swayConfigFloatingMouseAction /^\s\?.*floating_modifier\s.*\(normal\|inverted\)$/ contains=swayConfigFloatingModifier,i3ConfigVariable
" Gaps
syn clear i3ConfigSmartBorderKeyword
syn clear i3ConfigSmartBorder
syn keyword swayConfigSmartBorderKeyword on no_gaps off contained
syn match swayConfigSmartBorder /^\s*smart_borders\s\+\(on\|no_gaps\|off\)\s\?$/ contains=swayConfigSmartBorderKeyword
" Changing colors
syn keyword swayConfigClientColorKeyword focused_tab_title contained
syn match swayConfigClientColor /^\s*client.\w\+\s\+.*$/ contains=i3ConfigClientColorKeyword,i3ConfigColor,i3ConfigVariable,i3ConfigClientColorKeyword,swayConfigClientColorKeyword
" set display outputs
syn match swayConfigOutput /^\s*output\s\+.*$/ contains=i3ConfigOutput
" set display focus
syn keyword swayConfigFocusKeyword focus contained
syn keyword swayConfigFocusType output contained
syn match swayConfigFocus /^\s*focus\soutput\s.*$/ contains=swayConfigFocusKeyword,swayConfigFocusType
" xwayland
syn keyword swayConfigXwaylandKeyword xwayland contained
syn match swayConfigXwaylandModifier /^\s*xwayland\s\+\(enable\|disable\|force\)\s\?$/ contains=swayConfigXwaylandKeyword
"hi def link swayConfigError Error
hi def link i3ConfigFloating Error
hi def link swayConfigFloating Type
hi def link swayConfigFloatingMouseAction Type
hi def link swayConfigFocusKeyword Type
hi def link swayConfigSmartBorderKeyword Type
hi def link swayConfigBindGestureCommand Identifier
hi def link swayConfigBindGestureDirection Constant
hi def link swayConfigBindGesturePinchDirection Constant
hi def link swayConfigBindKeyword Identifier
hi def link swayConfigBlockKeyword Identifier
hi def link swayConfigClientColorKeyword Identifier
hi def link swayConfigFloatingKeyword Identifier
hi def link swayConfigFloatingModifier Identifier
hi def link swayConfigFocusType Identifier
hi def link swayConfigSmartBorder Identifier
hi def link swayConfigXwaylandKeyword Identifier
hi def link swayConfigXwaylandModifier Type
hi def link swayConfigBindGesture PreProc
let b:current_syntax = "swayconfig"