mirror of
https://github.com/sheerun/vim-polyglot.git
synced 2025-11-08 11:33:52 -05:00
Ensure some files are compied from each package
This commit is contained in:
7
syntax/lilypond-words.vim
Normal file
7
syntax/lilypond-words.vim
Normal file
File diff suppressed because one or more lines are too long
108
syntax/lilypond.vim
Normal file
108
syntax/lilypond.vim
Normal file
@@ -0,0 +1,108 @@
|
||||
if polyglot#init#is_disabled(expand('<sfile>:p'), 'lilypond', 'syntax/lilypond.vim')
|
||||
finish
|
||||
endif
|
||||
|
||||
" LilyPond syntax file
|
||||
" Language: LilyPond
|
||||
" Maintainer: Heikki Junes <hjunes@cc.hut.fi>
|
||||
" License: This file is part of LilyPond, the GNU music typesetter.
|
||||
"
|
||||
" Copyright (C) 2002-2004, 2008-2010 Han-Wen Nienhuys <hanwen@xs4all.nl>
|
||||
"
|
||||
" LilyPond is free software: you can redistribute it and/or modify
|
||||
" it under the terms of the GNU General Public License as published by
|
||||
" the Free Software Foundation, either version 3 of the License, or
|
||||
" (at your option) any later version.
|
||||
"
|
||||
" LilyPond is distributed in the hope that it will be useful,
|
||||
" but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
" GNU General Public License for more details.
|
||||
"
|
||||
" You should have received a copy of the GNU General Public License
|
||||
" along with LilyPond. If not, see <http://www.gnu.org/licenses/>.
|
||||
"
|
||||
" Last Change: 2010 Jul 26
|
||||
"
|
||||
" Installed As: vim/syntax/lilypond.vim
|
||||
" Uses Generated File: vim/syntax/lilypond-words.vim
|
||||
"
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
syntax clear
|
||||
elseif exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
|
||||
" Read the LilyPond syntax match groups:
|
||||
" lilyKeyword, lilyReservedWord, lilyNote
|
||||
if version < 600
|
||||
so <sfile>:p:h/lilypond-words.vim
|
||||
else
|
||||
runtime! syntax/lilypond-words.vim
|
||||
if exists("b:current_syntax")
|
||||
unlet b:current_syntax
|
||||
endif
|
||||
endif
|
||||
|
||||
" Match also parethesis of angle type
|
||||
setlocal mps+=<:>
|
||||
|
||||
" Case matters
|
||||
syn case match
|
||||
|
||||
syn cluster lilyMatchGroup contains=lilyMatcher,lilyString,lilyComment,lilyStatement,lilyNumber,lilySlur,lilySpecial,lilyNote,lilyKeyword,lilyArticulation,lilyReservedWord,lilyScheme
|
||||
|
||||
syn region lilyMatcher matchgroup=Delimiter start="{" skip="\\\\\|\\[<>]" end="}" contains=@lilyMatchGroup fold
|
||||
syn region lilyMatcher matchgroup=Delimiter start="\[" end="]" contains=@lilyMatchGroup fold
|
||||
syn region lilyMatcher matchgroup=Delimiter start="<" skip="\\\\\|\\[{<>}]" end=">" contains=@lilyMatchGroup fold
|
||||
|
||||
syn region lilyString start=/"/ end=/"/ skip=/\\"/
|
||||
syn region lilyComment start="%{" skip="%$" end="%}"
|
||||
syn region lilyComment start="%\([^{]\|$\)" end="$"
|
||||
|
||||
syn match lilyNumber "[-_^.]\?\d\+[.]\?"
|
||||
syn match lilySlur "[(~)]"
|
||||
syn match lilySlur "\\[()]"
|
||||
syn match lilySpecial "\\[<!>\\]"
|
||||
" avoid highlighting the extra character in situations like
|
||||
" c--\mf c^^\mf c__\mf
|
||||
syn match lilyArticulation "[-_^][-_^+|>.]"
|
||||
|
||||
" Include Scheme syntax highlighting, where appropriate
|
||||
syn include @embeddedScheme syntax/scheme.vim
|
||||
unlet b:current_syntax
|
||||
syn region lilyScheme matchgroup=Delimiter start="#['`]\?(" matchgroup=Delimiter end=")" contains=@embeddedScheme
|
||||
|
||||
" Rest of syntax highlighting rules start here
|
||||
"
|
||||
" " Define the default highlighting.
|
||||
" " For version 5.7 and earlier: only when not done already
|
||||
" " For version 5.8 and later: only when an item doesn't have highlighting yet
|
||||
if version >= 508 || !exists("did_lily_syn_inits")
|
||||
if version < 508
|
||||
let did_lily_syn_inits = 1
|
||||
command -nargs=+ HiLink hi link <args>
|
||||
else
|
||||
command -nargs=+ HiLink hi def link <args>
|
||||
endif
|
||||
|
||||
HiLink Delimiter Identifier
|
||||
|
||||
HiLink lilyString String
|
||||
HiLink lilyComment Comment
|
||||
|
||||
HiLink lilyNote Identifier
|
||||
HiLink lilyArticulation PreProc
|
||||
HiLink lilyKeyword Keyword
|
||||
HiLink lilyReservedWord Type
|
||||
|
||||
HiLink lilyNumber Constant
|
||||
HiLink lilySpecial Special
|
||||
HiLink lilySlur ModeMsg
|
||||
|
||||
delcommand HiLink
|
||||
endif
|
||||
|
||||
let b:current_syntax = "lilypond"
|
||||
65
syntax/mermaid.vim
Normal file
65
syntax/mermaid.vim
Normal file
@@ -0,0 +1,65 @@
|
||||
if polyglot#init#is_disabled(expand('<sfile>:p'), 'mermaid', 'syntax/mermaid.vim')
|
||||
finish
|
||||
endif
|
||||
|
||||
setlocal iskeyword+=-
|
||||
|
||||
syntax keyword mermaidDiagramType classDiagram classDiagram-v2 erDiagram gantt graph flowchart pie sequenceDiagram stateDiagram stateDiagram-v2
|
||||
syntax match mermaidOperator /\v(-|\<|\>|\+|\||\=)/
|
||||
syntax match mermaidComment /\v^(\s?)+\%\%.*$/
|
||||
syntax region mermaidString start=/"/ end=/"/ skip=/\\"/
|
||||
" is used in both class and state diagrams
|
||||
syntax match mermaidSpecialAnnotation /\v\<\<\w+\>\>/
|
||||
syntax match mermaidKeyword /\v^\s+(subgraph|loop|alt|else|opt|par[^a-z]|and|rect|end|participant|activate|deactivate)/
|
||||
|
||||
syntax match mermaidGraphOperator /\v(\.-|-\.|\&|o-|-o|x-|-x)/
|
||||
syntax keyword mermaidGraphClickKeyword click
|
||||
|
||||
syntax match mermaidNote /\v^\s+(note[^s]|Note[^s]|end note)/ nextgroup=mermaidNoteDirection
|
||||
syntax match mermaidNoteDirection /\v(left of|right of|over[^a-z])/
|
||||
|
||||
syntax keyword mermaidSequenceFunction rgb
|
||||
|
||||
" TODO: support class dashed link operator: `..`
|
||||
syntax match mermaidClassOperator /\v(\*-|-\*|\<\.\.|\.\.\>|\|\.\.|\.\.\|)/
|
||||
syntax keyword mermaidClassClassKeyword class
|
||||
syntax keyword mermaidClassType
|
||||
\ int[eger] bool[ean] string float bigdec[imal] char[cter] double symbol
|
||||
syntax match mermaidClassGenericType /\v\w+\~\w+\~/
|
||||
\ contains=ALLBUT,mermaidClassGenericType
|
||||
" TODO Fix matching on graph/flowchart round shape: `SecondStep(Go Shopping)`
|
||||
syntax match mermaidClassFunction /\v\w+\(((\w+|\s+|\~)?,?)+\)/ contains=ALLBUT,mermaidClassFunction
|
||||
" TODO support class visibility operators
|
||||
" https://mermaid-js.github.io/mermaid/#/classDiagram?id=visibility
|
||||
|
||||
syntax match mermaidStateFinalKeyword /\[\*\]/
|
||||
syntax match mermaidStateKeyword /\v(\s+as[^a-z]|^\s+state)/
|
||||
|
||||
" TODO highlight gantt keywords
|
||||
|
||||
" TODO improve er operators
|
||||
syntax match mermaidErOperator /\v(\}\||\|\{|o\{)/
|
||||
|
||||
highlight link mermaidDiagramType Constant
|
||||
highlight link mermaidOperator Operator
|
||||
highlight link mermaidComment Comment
|
||||
highlight link mermaidString String
|
||||
highlight link mermaidSpecialAnnotation Label
|
||||
highlight link mermaidNote Keyword
|
||||
highlight link mermaidNoteDirection Keyword
|
||||
|
||||
highlight link mermaidGraphOperator Operator
|
||||
highlight link mermaidGraphClickKeyword Keyword
|
||||
|
||||
highlight link mermaidKeyword Keyword
|
||||
highlight link mermaidSequenceFunction Function
|
||||
|
||||
highlight link mermaidClassClassKeyword Keyword
|
||||
highlight link mermaidClassOperator Operator
|
||||
highlight link mermaidClassType Type
|
||||
highlight link mermaidClassGenericType Type
|
||||
|
||||
highlight link mermaidStateFinalKeyword Keyword
|
||||
highlight link mermaidStateKeyword Keyword
|
||||
|
||||
highlight link mermaidErOperator Operator
|
||||
285
syntax/swayconfig.vim
Normal file
285
syntax/swayconfig.vim
Normal file
@@ -0,0 +1,285 @@
|
||||
if polyglot#init#is_disabled(expand('<sfile>:p'), 'sway', 'syntax/swayconfig.vim')
|
||||
finish
|
||||
endif
|
||||
|
||||
" Vim syntax file
|
||||
" Language: sway config file
|
||||
" Original Author: Mohamed Boughaba <mohamed dot bgb at gmail dot com>
|
||||
" Maintainer: James Eapen <jamespeapen at gmail dot com>
|
||||
" Version: 1.0
|
||||
" Last Change: 2020-10-07
|
||||
|
||||
" References:
|
||||
" http://i3wm.org/docs/userguide.html#configuring
|
||||
" http://vimdoc.sourceforge.net/htmldoc/syntax.html
|
||||
"
|
||||
"
|
||||
" For version 5.x: Clear all syntax items
|
||||
" For version 6.x: Quit when a syntax file was already loaded
|
||||
if version < 600
|
||||
syn clear
|
||||
elsei exists("b:current_syntax")
|
||||
fini
|
||||
en
|
||||
|
||||
scriptencoding utf-8
|
||||
|
||||
" Error
|
||||
syn match swayConfigError /.*/
|
||||
|
||||
" Todo
|
||||
syn keyword swayConfigTodo TODO FIXME XXX contained
|
||||
|
||||
" Comment
|
||||
" Comments are started with a # and can only be used at the beginning of a line
|
||||
syn match swayConfigComment /^\s*#.*$/ contains=swayConfigTodo
|
||||
|
||||
" Font
|
||||
" A FreeType font description is composed by:
|
||||
" a font family, a style, a weight, a variant, a stretch and a size.
|
||||
syn match swayConfigFontSeparator /,/ contained
|
||||
syn match swayConfigFontSeparator /:/ contained
|
||||
syn keyword swayConfigFontKeyword font contained
|
||||
syn match swayConfigFontNamespace /\w\+:/ contained contains=swayConfigFontSeparator
|
||||
syn match swayConfigFontContent /-\?\w\+\(-\+\|\s\+\|,\)/ contained contains=swayConfigFontNamespace,swayConfigFontSeparator,swayConfigFontKeyword
|
||||
syn match swayConfigFontSize /\s\=\d\+\(px\)\?\s\?$/ contained
|
||||
syn match swayConfigFont /^\s*font\s\+.*$/ contains=swayConfigFontContent,swayConfigFontSeparator,swayConfigFontSize,swayConfigFontNamespace
|
||||
syn match swayConfigFont /^\s*font\s\+.*\(\\\_.*\)\?$/ contains=swayConfigFontContent,swayConfigFontSeparator,swayConfigFontSize,swayConfigFontNamespace
|
||||
syn match swayConfigFont /^\s*font\s\+.*\(\\\_.*\)\?[^\\]\+$/ contains=swayConfigFontContent,swayConfigFontSeparator,swayConfigFontSize,swayConfigFontNamespace
|
||||
syn match swayConfigFont /^\s*font\s\+\(\(.*\\\_.*\)\|\(.*[^\\]\+$\)\)/ contains=swayConfigFontContent,swayConfigFontSeparator,swayConfigFontSize,swayConfigFontNamespace
|
||||
|
||||
" variables
|
||||
syn match swayConfigString /\(['"]\)\(.\{-}\)\1/ contained
|
||||
syn match swayConfigColor /#\w\{6}/ contained
|
||||
syn match swayConfigVariableModifier /+/ contained
|
||||
syn match swayConfigVariableAndModifier /+\w\+/ contained contains=swayConfigVariableModifier
|
||||
syn match swayConfigVariable /\$\w\+\(\(-\w\+\)\+\)\?\(\s\|+\)\?/ contains=swayConfigVariableModifier,swayConfigVariableAndModifier
|
||||
syn keyword swayConfigInitializeKeyword set contained
|
||||
syn match swayConfigInitialize /^\s*set\s\+.*$/ contains=swayConfigVariable,swayConfigInitializeKeyword,swayConfigColor,swayConfigString
|
||||
|
||||
" Gaps
|
||||
syn keyword swayConfigGapStyleKeyword inner outer horizontal vertical top right bottom left current all set plus minus toggle up down contained
|
||||
syn match swayConfigGapStyle /^\s*\(gaps\)\s\+\(inner\|outer\|horizontal\|vertical\|left\|top\|right\|bottom\)\(\s\+\(current\|all\)\)\?\(\s\+\(set\|plus\|minus\|toggle\)\)\?\(\s\+\(-\?\d\+\|\$.*\)\)$/ contains=swayConfigGapStyleKeyword,swayConfigNumber,swayConfigVariable
|
||||
syn keyword swayConfigSmartGapKeyword on inverse_outer contained
|
||||
syn match swayConfigSmartGap /^\s*smart_gaps\s\+\(on\|inverse_outer\)\s\?$/ contains=swayConfigSmartGapKeyword
|
||||
syn keyword swayConfigSmartBorderKeyword on no_gaps contained
|
||||
syn match swayConfigSmartBorder /^\s*smart_borders\s\+\(on\|no_gaps\)\s\?$/ contains=swayConfigSmartBorderKeyword
|
||||
|
||||
" Keyboard bindings
|
||||
syn keyword swayConfigAction toggle fullscreen restart key import kill shrink grow contained
|
||||
syn keyword swayConfigAction focus move grow height width split layout resize restore reload mute unmute exit mode workspace container to output contained
|
||||
syn match swayConfigModifier /\w\++\w\+\(\(+\w\+\)\+\)\?/ contained contains=swayConfigVariableModifier
|
||||
syn match swayConfigNumber /\s\d\+/ contained
|
||||
syn match swayConfigUnit /\sp\(pt\|x\)/ contained
|
||||
syn match swayConfigUnitOr /\sor/ contained
|
||||
syn keyword swayConfigBindKeyword bindsym bindcode exec gaps border contained
|
||||
syn match swayConfigBindArgument /--\w\+\(\(-\w\+\)\+\)\?\s/ contained
|
||||
syn match swayConfigBind /^\s*\(bindsym\|bindcode\)\s\+.*$/ contains=swayConfigVariable,swayConfigBindKeyword,swayConfigVariableAndModifier,swayConfigNumber,swayConfigUnit,swayConfigUnitOr,swayConfigBindArgument,swayConfigModifier,swayConfigAction,swayConfigString,swayConfigGapStyleKeyword,swayConfigBorderStyleKeyword
|
||||
|
||||
" Floating
|
||||
syn keyword swayConfigFloatingModifier floating_modifier contained
|
||||
syn match swayConfigFloatingMouseAction /^\s\?.*floating_modifier\s.*\(normal\|inverted\)$/ contains=swayConfigFloatingModifier,swayConfigVariable
|
||||
|
||||
syn keyword swayConfigSizeSpecial x contained
|
||||
syn match swayConfigNegativeSize /-/ contained
|
||||
syn match swayConfigSize /-\?\d\+\s\?x\s\?-\?\d\+/ contained contains=swayConfigSizeSpecial,swayConfigNumber,swayConfigNegativeSize
|
||||
syn match swayConfigFloating /^\s*floating_\(maximum\|minimum\)_size\s\+-\?\d\+\s\?x\s\?-\?\d\+/ contains=swayConfigSize
|
||||
|
||||
" Orientation
|
||||
syn keyword swayConfigOrientationKeyword vertical horizontal auto contained
|
||||
syn match swayConfigOrientation /^\s*default_orientation\s\+\(vertical\|horizontal\|auto\)\s\?$/ contains=swayConfigOrientationKeyword
|
||||
|
||||
" Layout
|
||||
syn keyword swayConfigLayoutKeyword default stacking tabbed contained
|
||||
syn match swayConfigLayout /^\s*workspace_layout\s\+\(default\|stacking\|tabbed\)\s\?$/ contains=swayConfigLayoutKeyword
|
||||
|
||||
" Border style
|
||||
syn keyword swayConfigBorderStyleKeyword none normal pixel contained
|
||||
syn match swayConfigBorderStyle /^\s*\(new_window\|new_float\|default_border\|default_floating_border\)\s\+\(none\|\(normal\|pixel\)\(\s\+\d\+\)\?\(\s\+\$\w\+\(\(-\w\+\)\+\)\?\(\s\|+\)\?\)\?\)\s\?$/ contains=swayConfigBorderStyleKeyword,swayConfigNumber,swayConfigVariable
|
||||
|
||||
" Hide borders and edges
|
||||
syn keyword swayConfigEdgeKeyword none vertical horizontal both smart smart_no_gaps contained
|
||||
syn match swayConfigEdge /^\s*hide_edge_borders\s\+\(none\|vertical\|horizontal\|both\|smart\|smart_no_gaps\)\s\?$/ contains=swayConfigEdgeKeyword
|
||||
|
||||
" Arbitrary commands for specific windows (for_window)
|
||||
syn keyword swayConfigCommandKeyword for_window contained
|
||||
syn region swayConfigWindowStringSpecial start=+"+ skip=+\\"+ end=+"+ contained contains=swayConfigString
|
||||
syn region swayConfigWindowCommandSpecial start="\[" end="\]" contained contains=swayConfigWindowStringSpacial,swayConfigString
|
||||
syn match swayConfigArbitraryCommand /^\s*for_window\s\+.*$/ contains=swayConfigWindowCommandSpecial,swayConfigCommandKeyword,swayConfigBorderStyleKeyword,swayConfigLayoutKeyword,swayConfigOrientationKeyword,Size,swayConfigNumber
|
||||
|
||||
" Disable focus open opening
|
||||
syn keyword swayConfigNoFocusKeyword no_focus contained
|
||||
syn match swayConfigDisableFocus /^\s*no_focus\s\+.*$/ contains=swayConfigWindowCommandSpecial,swayConfigNoFocusKeyword
|
||||
|
||||
" Move client to specific workspace automatically
|
||||
syn keyword swayConfigAssignKeyword assign contained
|
||||
syn match swayConfigAssignSpecial /→/ contained
|
||||
syn match swayConfigAssign /^\s*assign\s\+.*$/ contains=swayConfigAssignKeyword,swayConfigWindowCommandSpecial,swayConfigAssignSpecial
|
||||
|
||||
" X resources
|
||||
syn keyword swayConfigResourceKeyword set_from_resource contained
|
||||
syn match swayConfigResource /^\s*set_from_resource\s\+.*$/ contains=swayConfigResourceKeyword,swayConfigWindowCommandSpecial,swayConfigColor,swayConfigVariable
|
||||
|
||||
" Auto start applications
|
||||
syn keyword swayConfigExecKeyword exec exec_always contained
|
||||
syn match swayConfigNoStartupId /--no-startup-id/ contained " We are not using swayConfigBindArgument as only no-startup-id is supported here
|
||||
syn match swayConfigExec /^\s*exec\(_always\)\?\s\+.*$/ contains=swayConfigExecKeyword,swayConfigNoStartupId,swayConfigString
|
||||
|
||||
" Automatically putting workspaces on specific screens
|
||||
syn keyword swayConfigWorkspaceKeyword workspace contained
|
||||
syn keyword swayConfigOutputKeyword output contained
|
||||
syn match swayConfigWorkspace /^\s*workspace\s\+.*$/ contains=swayConfigWorkspaceKeyword,swayConfigNumber,swayConfigString,swayConfigOutputKeyword
|
||||
|
||||
" set display outputs
|
||||
syn match swayConfigOutput /^\s*output\s\+.*$/ contains=swayConfigOutputKeyword
|
||||
|
||||
" set display focus
|
||||
syn keyword swayConfigFocusKeyword focus contained
|
||||
syn keyword swayConfigFocusType output contained
|
||||
syn match swayConfigFocus /^\s*focus\soutput\s.*$/ contains=swayConfigFocusKeyword,swayConfigFocusType
|
||||
|
||||
" Changing colors
|
||||
syn keyword swayConfigClientColorKeyword client focused focused_inactive unfocused urgent placeholder background contained
|
||||
syn match swayConfigClientColor /^\s*client.\w\+\s\+.*$/ contains=swayConfigClientColorKeyword,swayConfigColor,swayConfigVariable
|
||||
|
||||
syn keyword swayConfigTitleAlignKeyword left center right contained
|
||||
syn match swayConfigTitleAlign /^\s*title_align\s\+.*$/ contains=swayConfigTitleAlignKeyword
|
||||
|
||||
" Interprocess communication
|
||||
syn match swayConfigInterprocessKeyword /ipc-socket/ contained
|
||||
syn match swayConfigInterprocess /^\s*ipc-socket\s\+.*$/ contains=swayConfigInterprocessKeyword
|
||||
|
||||
" Mouse warping
|
||||
syn keyword swayConfigMouseWarpingKeyword mouse_warping contained
|
||||
syn keyword swayConfigMouseWarpingType output none contained
|
||||
syn match swayConfigMouseWarping /^\s*mouse_warping\s\+\(output\|none\)\s\?$/ contains=swayConfigMouseWarpingKeyword,swayConfigMouseWarpingType
|
||||
|
||||
" Focus follows mouse
|
||||
syn keyword swayConfigFocusFollowsMouseKeyword focus_follows_mouse contained
|
||||
syn keyword swayConfigFocusFollowsMouseType yes no contained
|
||||
syn match swayConfigFocusFollowsMouse /^\s*focus_follows_mouse\s\+\(yes\|no\)\s\?$/ contains=swayConfigFocusFollowsMouseKeyword,swayConfigFocusFollowsMouseType
|
||||
|
||||
" Popups during fullscreen mode
|
||||
syn keyword swayConfigPopupOnFullscreenKeyword popup_during_fullscreen contained
|
||||
syn keyword swayConfigPopuponFullscreenType smart ignore leave_fullscreen contained
|
||||
syn match swayConfigPopupOnFullscreen /^\s*popup_during_fullscreen\s\+\w\+\s\?$/ contains=swayConfigPopupOnFullscreenKeyword,swayConfigPopupOnFullscreenType
|
||||
|
||||
" Focus wrapping
|
||||
syn keyword swayConfigFocusWrappingKeyword force_focus_wrapping focus_wrapping contained
|
||||
syn keyword swayConfigFocusWrappingType yes no contained
|
||||
syn match swayConfigFocusWrapping /^\s*\(force_\)\?focus_wrapping\s\+\(yes\|no\)\s\?$/ contains=swayConfigFocusWrappingType,swayConfigFocusWrappingKeyword
|
||||
|
||||
" Forcing Xinerama
|
||||
syn keyword swayConfigForceXineramaKeyword force_xinerama contained
|
||||
syn match swayConfigForceXinerama /^\s*force_xinerama\s\+\(yes\|no\)\s\?$/ contains=swayConfigFocusWrappingType,swayConfigForceXineramaKeyword
|
||||
|
||||
" Automatic back-and-forth when switching to the current workspace
|
||||
syn keyword swayConfigAutomaticSwitchKeyword workspace_auto_back_and_forth contained
|
||||
syn match swayConfigAutomaticSwitch /^\s*workspace_auto_back_and_forth\s\+\(yes\|no\)\s\?$/ contains=swayConfigFocusWrappingType,swayConfigAutomaticSwitchKeyword
|
||||
|
||||
" Delay urgency hint
|
||||
syn keyword swayConfigTimeUnit ms contained
|
||||
syn keyword swayConfigDelayUrgencyKeyword force_display_urgency_hint contained
|
||||
syn match swayConfigDelayUrgency /^\s*force_display_urgency_hint\s\+\d\+\s\+ms\s\?$/ contains=swayConfigFocusWrappingType,swayConfigDelayUrgencyKeyword,swayConfigNumber,swayConfigTimeUnit
|
||||
|
||||
" Focus on window activation
|
||||
syn keyword swayConfigFocusOnActivationKeyword focus_on_window_activation contained
|
||||
syn keyword swayConfigFocusOnActivationType smart urgent focus none contained
|
||||
syn match swayConfigFocusOnActivation /^\s*focus_on_window_activation\s\+\(smart\|urgent\|focus\|none\)\s\?$/ contains=swayConfigFocusOnActivationKeyword,swayConfigFocusOnActivationType
|
||||
|
||||
" Automatic back-and-forth when switching to the current workspace
|
||||
syn keyword swayConfigDrawingMarksKeyword show_marks contained
|
||||
syn match swayConfigDrawingMarks /^\s*show_marks\s\+\(yes\|no\)\s\?$/ contains=swayConfigFocusWrappingType,swayConfigDrawingMarksKeyword
|
||||
|
||||
" Group mode/bar
|
||||
syn keyword swayConfigBlockKeyword mode bar colors i3bar_command status_command position exec mode hidden_state modifier id position output background statusline tray_output tray_padding separator separator_symbol workspace_buttons strip_workspace_numbers binding_mode_indicator focused_workspace active_workspace inactive_workspace urgent_workspace binding_mode contained
|
||||
syn region swayConfigBlock start=+.*s\?{$+ end=+^}$+ contains=swayConfigBlockKeyword,swayConfigString,swayConfigBind,swayConfigComment,swayConfigFont,swayConfigFocusWrappingType,swayConfigColor,swayConfigVariable transparent keepend extend
|
||||
|
||||
" Line continuation
|
||||
syn region swayConfigLineCont start=/^.*\\$/ end=/^.*$/ contains=swayConfigBlockKeyword,swayConfigString,swayConfigBind,swayConfigComment,swayConfigFont,swayConfigFocusWrappingType,swayConfigColor,swayConfigVariable transparent keepend extend
|
||||
|
||||
" Includes with relative paths to config files
|
||||
syn keyword swayConfigInclude include contained
|
||||
syn match swayConfigFile /^include\s\(\~\?\/.*$\|\.\{0,2}\/.*$\)/ contains=swayConfigInclude
|
||||
|
||||
" Define the highlighting.
|
||||
let b:current_syntax = "swayconfig"
|
||||
hi! def link swayConfigError Error
|
||||
hi! def link swayConfigTodo Todo
|
||||
hi! def link swayConfigComment Comment
|
||||
hi! def link swayConfigFontContent Type
|
||||
hi! def link swayConfigFocusOnActivationType Type
|
||||
hi! def link swayConfigPopupOnFullscreenType Type
|
||||
hi! def link swayConfigOrientationKeyword Type
|
||||
hi! def link swayConfigMouseWarpingType Type
|
||||
hi! def link swayConfigFocusFollowsMouseType Type
|
||||
hi! def link swayConfigGapStyleKeyword Type
|
||||
hi! def link swayConfigTitleAlignKeyword Type
|
||||
hi! def link swayConfigSmartGapKeyword Type
|
||||
hi! def link swayConfigSmartBorderKeyword Type
|
||||
hi! def link swayConfigLayoutKeyword Type
|
||||
hi! def link swayConfigBorderStyleKeyword Type
|
||||
hi! def link swayConfigEdgeKeyword Type
|
||||
hi! def link swayConfigAction Type
|
||||
hi! def link swayConfigCommand Type
|
||||
hi! def link swayConfigOutputKeyword Type
|
||||
hi! def link swayConfigWindowCommandSpecial Type
|
||||
hi! def link swayConfigFocusWrappingType Type
|
||||
hi! def link swayConfigUnitOr Type
|
||||
hi! def link swayConfigFontSize Constant
|
||||
hi! def link swayConfigColor Constant
|
||||
hi! def link swayConfigNumber Constant
|
||||
hi! def link swayConfigUnit Constant
|
||||
hi! def link swayConfigVariableAndModifier Constant
|
||||
hi! def link swayConfigTimeUnit Constant
|
||||
hi! def link swayConfigModifier Constant
|
||||
hi! def link swayConfigString Constant
|
||||
hi! def link swayConfigNegativeSize Constant
|
||||
hi! def link swayConfigFontSeparator Special
|
||||
hi! def link swayConfigVariableModifier Special
|
||||
hi! def link swayConfigSizeSpecial Special
|
||||
hi! def link swayConfigWindowSpecial Special
|
||||
hi! def link swayConfigAssignSpecial Special
|
||||
hi! def link swayConfigFontNamespace PreProc
|
||||
hi! def link swayConfigBindArgument PreProc
|
||||
hi! def link swayConfigNoStartupId PreProc
|
||||
hi! def link swayConfigFontKeyword Identifier
|
||||
hi! def link swayConfigBindKeyword Identifier
|
||||
hi! def link swayConfigOrientation Identifier
|
||||
hi! def link swayConfigGapStyle Identifier
|
||||
hi! def link swayConfigTitleAlign Identifier
|
||||
hi! def link swayConfigSmartGap Identifier
|
||||
hi! def link swayConfigSmartBorder Identifier
|
||||
hi! def link swayConfigLayout Identifier
|
||||
hi! def link swayConfigBorderStyle Identifier
|
||||
hi! def link swayConfigEdge Identifier
|
||||
hi! def link swayConfigFloating Identifier
|
||||
hi! def link swayConfigCommandKeyword Identifier
|
||||
hi! def link swayConfigNoFocusKeyword Identifier
|
||||
hi! def link swayConfigInitializeKeyword Identifier
|
||||
hi! def link swayConfigAssignKeyword Identifier
|
||||
hi! def link swayConfigResourceKeyword Identifier
|
||||
hi! def link swayConfigExecKeyword Identifier
|
||||
hi! def link swayConfigWorkspaceKeyword Identifier
|
||||
hi! def link swayConfigClientColorKeyword Identifier
|
||||
hi! def link swayConfigInterprocessKeyword Identifier
|
||||
hi! def link swayConfigMouseWarpingKeyword Identifier
|
||||
hi! def link swayConfigFocusFollowsMouseKeyword Identifier
|
||||
hi! def link swayConfigPopupOnFullscreenKeyword Identifier
|
||||
hi! def link swayConfigFocusWrappingKeyword Identifier
|
||||
hi! def link swayConfigForceXineramaKeyword Identifier
|
||||
hi! def link swayConfigAutomaticSwitchKeyword Identifier
|
||||
hi! def link swayConfigDelayUrgencyKeyword Identifier
|
||||
hi! def link swayConfigFocusOnActivationKeyword Identifier
|
||||
hi! def link swayConfigDrawingMarksKeyword Identifier
|
||||
hi! def link swayConfigBlockKeyword Identifier
|
||||
hi! def link swayConfigVariable Statement
|
||||
hi! def link swayConfigArbitraryCommand Type
|
||||
hi! def link swayConfigInclude Identifier
|
||||
hi! def link swayConfigFile Constant
|
||||
hi! def link swayConfigFloatingModifier Identifier
|
||||
hi! def link swayConfigFloatingMouseAction Type
|
||||
hi! def link swayConfigFocusKeyword Type
|
||||
hi! def link swayConfigFocusType Identifier
|
||||
|
||||
|
||||
80
syntax/toml.vim
Normal file
80
syntax/toml.vim
Normal file
@@ -0,0 +1,80 @@
|
||||
if polyglot#init#is_disabled(expand('<sfile>:p'), 'toml', 'syntax/toml.vim')
|
||||
finish
|
||||
endif
|
||||
|
||||
" Language: TOML
|
||||
" Maintainer: Caleb Spare <cespare@gmail.com>
|
||||
" URL: https://github.com/cespare/vim-toml
|
||||
" LICENSE: MIT
|
||||
|
||||
if exists('b:current_syntax')
|
||||
finish
|
||||
endif
|
||||
|
||||
syn match tomlEscape /\\[btnfr"/\\]/ display contained
|
||||
syn match tomlEscape /\\u\x\{4}/ contained
|
||||
syn match tomlEscape /\\U\x\{8}/ contained
|
||||
hi def link tomlEscape SpecialChar
|
||||
|
||||
syn match tomlLineEscape /\\$/ contained
|
||||
hi def link tomlLineEscape SpecialChar
|
||||
|
||||
" Basic strings
|
||||
syn region tomlString oneline start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=tomlEscape
|
||||
" Multi-line basic strings
|
||||
syn region tomlString start=/"""/ end=/"""/ contains=tomlEscape,tomlLineEscape
|
||||
" Literal strings
|
||||
syn region tomlString oneline start=/'/ end=/'/
|
||||
" Multi-line literal strings
|
||||
syn region tomlString start=/'''/ end=/'''/
|
||||
hi def link tomlString String
|
||||
|
||||
syn match tomlInteger /[+-]\=\<[1-9]\(_\=\d\)*\>/ display
|
||||
syn match tomlInteger /[+-]\=\<0\>/ display
|
||||
syn match tomlInteger /[+-]\=\<0x[[:xdigit:]]\(_\=[[:xdigit:]]\)*\>/ display
|
||||
syn match tomlInteger /[+-]\=\<0o[0-7]\(_\=[0-7]\)*\>/ display
|
||||
syn match tomlInteger /[+-]\=\<0b[01]\(_\=[01]\)*\>/ display
|
||||
syn match tomlInteger /[+-]\=\<\(inf\|nan\)\>/ display
|
||||
hi def link tomlInteger Number
|
||||
|
||||
syn match tomlFloat /[+-]\=\<\d\(_\=\d\)*\.\d\+\>/ display
|
||||
syn match tomlFloat /[+-]\=\<\d\(_\=\d\)*\(\.\d\(_\=\d\)*\)\=[eE][+-]\=\d\(_\=\d\)*\>/ display
|
||||
hi def link tomlFloat Float
|
||||
|
||||
syn match tomlBoolean /\<\%(true\|false\)\>/ display
|
||||
hi def link tomlBoolean Boolean
|
||||
|
||||
" https://tools.ietf.org/html/rfc3339
|
||||
syn match tomlDate /\d\{4\}-\d\{2\}-\d\{2\}/ display
|
||||
syn match tomlDate /\d\{2\}:\d\{2\}:\d\{2\}\%(\.\d\+\)\?/ display
|
||||
syn match tomlDate /\d\{4\}-\d\{2\}-\d\{2\}[T ]\d\{2\}:\d\{2\}:\d\{2\}\%(\.\d\+\)\?\%(Z\|[+-]\d\{2\}:\d\{2\}\)\?/ display
|
||||
hi def link tomlDate Constant
|
||||
|
||||
syn match tomlKey /\v(^|[{,])\s*\zs[[:alnum:]._-]+\ze\s*\=/ display
|
||||
hi def link tomlKey Identifier
|
||||
|
||||
syn region tomlKeyDq oneline start=/\v(^|[{,])\s*\zs"/ end=/"\ze\s*=/ contains=tomlEscape
|
||||
hi def link tomlKeyDq Identifier
|
||||
|
||||
syn region tomlKeySq oneline start=/\v(^|[{,])\s*\zs'/ end=/'\ze\s*=/
|
||||
hi def link tomlKeySq Identifier
|
||||
|
||||
syn region tomlTable oneline start=/^\s*\[[^\[]/ end=/\]/ contains=tomlKey,tomlKeyDq,tomlKeySq
|
||||
hi def link tomlTable Title
|
||||
|
||||
syn region tomlTableArray oneline start=/^\s*\[\[/ end=/\]\]/ contains=tomlKey,tomlKeyDq,tomlKeySq
|
||||
hi def link tomlTableArray Title
|
||||
|
||||
syn cluster tomlValue contains=tomlArray,tomlString,tomlInteger,tomlFloat,tomlBoolean,tomlDate,tomlComment
|
||||
syn region tomlKeyValueArray start=/=\s*\[\zs/ end=/\]/ contains=@tomlValue
|
||||
syn region tomlArray start=/\[/ end=/\]/ contains=@tomlValue contained
|
||||
|
||||
syn keyword tomlTodo TODO FIXME XXX BUG contained
|
||||
hi def link tomlTodo Todo
|
||||
|
||||
syn match tomlComment /#.*/ contains=@Spell,tomlTodo
|
||||
hi def link tomlComment Comment
|
||||
|
||||
syn sync minlines=500
|
||||
|
||||
let b:current_syntax = 'toml'
|
||||
Reference in New Issue
Block a user