summaryrefslogtreecommitdiff
path: root/runtime/syntax
diff options
context:
space:
mode:
authorBram Moolenaar <Bram@vim.org>2022-07-29 21:36:21 +0100
committerBram Moolenaar <Bram@vim.org>2022-07-29 21:36:21 +0100
commit2ecbe53f452e92e941aff623f6a0b72f80e43d07 (patch)
treedc241cf0a9c463f24777f2b0df8ef08d1314f099 /runtime/syntax
parent72981ac94ff7aeaa596d535448ee0bef46050acf (diff)
downloadvim-git-2ecbe53f452e92e941aff623f6a0b72f80e43d07.tar.gz
Update runtime files
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/autohotkey.vim17
-rw-r--r--runtime/syntax/debchangelog.vim12
-rw-r--r--runtime/syntax/debsources.vim12
-rw-r--r--runtime/syntax/i3config.vim12
-rw-r--r--runtime/syntax/python.vim10
-rw-r--r--runtime/syntax/swayconfig.vim92
6 files changed, 131 insertions, 24 deletions
diff --git a/runtime/syntax/autohotkey.vim b/runtime/syntax/autohotkey.vim
index c6a68f7a2..a88839492 100644
--- a/runtime/syntax/autohotkey.vim
+++ b/runtime/syntax/autohotkey.vim
@@ -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=
diff --git a/runtime/syntax/debchangelog.vim b/runtime/syntax/debchangelog.vim
index 2efd91977..9bd836801 100644
--- a/runtime/syntax/debchangelog.vim
+++ b/runtime/syntax/debchangelog.vim
@@ -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
diff --git a/runtime/syntax/debsources.vim b/runtime/syntax/debsources.vim
index e3ec6e659..ea9e59ea8 100644
--- a/runtime/syntax/debsources.vim
+++ b/runtime/syntax/debsources.vim
@@ -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
diff --git a/runtime/syntax/i3config.vim b/runtime/syntax/i3config.vim
index 0018081da..caef244ce 100644
--- a/runtime/syntax/i3config.vim
+++ b/runtime/syntax/i3config.vim
@@ -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
diff --git a/runtime/syntax/python.vim b/runtime/syntax/python.vim
index 3af54cc4c..e67bf58b0 100644
--- a/runtime/syntax/python.vim
+++ b/runtime/syntax/python.vim
@@ -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
diff --git a/runtime/syntax/swayconfig.vim b/runtime/syntax/swayconfig.vim
new file mode 100644
index 000000000..2abfa38bd
--- /dev/null
+++ b/runtime/syntax/swayconfig.vim
@@ -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"