This commit is contained in:
Adam Stankiewicz
2021-06-09 21:11:58 +02:00
parent 839447bbf5
commit c4e50b4e9d
10 changed files with 150 additions and 417 deletions

View File

@@ -102,7 +102,6 @@ On top of all language packs from [vim repository](https://github.com/vim/vim/tr
- [hive](https://github.com/zebradil/hive.vim) (HiveQL syntax highlighting for q, hql and ql files) - [hive](https://github.com/zebradil/hive.vim) (HiveQL syntax highlighting for q, hql and ql files)
- [hjson](https://github.com/hjson/vim-hjson) (Syntax highlighting for hjson files) - [hjson](https://github.com/hjson/vim-hjson) (Syntax highlighting for hjson files)
- [html5](https://github.com/othree/html5.vim) - [html5](https://github.com/othree/html5.vim)
- [i3/sway](https://github.com/jamespeapen/swayconfig.vim/tree/i3sway) (Syntax highlighting for i3.config, i3config, sway.config and swayconfig files)
- [icalendar](https://github.com/chutzpah/icalendar.vim) (Syntax highlighting for ics files) - [icalendar](https://github.com/chutzpah/icalendar.vim) (Syntax highlighting for ics files)
- [idris2](https://github.com/edwinb/idris2-vim) (Syntax highlighting for idr, ipkg and lidr files) - [idris2](https://github.com/edwinb/idris2-vim) (Syntax highlighting for idr, ipkg and lidr files)
- [idris](https://github.com/idris-hackers/idris-vim) (Idris syntax highlighting for idr and lidr files) - [idris](https://github.com/idris-hackers/idris-vim) (Idris syntax highlighting for idr and lidr files)
@@ -118,7 +117,7 @@ On top of all language packs from [vim repository](https://github.com/vim/vim/tr
- [jst](https://github.com/briancollins/vim-jst) (EJS syntax highlighting for ejs, ect and jst files) - [jst](https://github.com/briancollins/vim-jst) (EJS syntax highlighting for ejs, ect and jst files)
- [jsx](https://github.com/MaxMEllon/vim-jsx-pretty) (Syntax highlighting for jsx files) - [jsx](https://github.com/MaxMEllon/vim-jsx-pretty) (Syntax highlighting for jsx files)
- [julia](https://github.com/JuliaEditorSupport/julia-vim) (Julia syntax highlighting for jl files) - [julia](https://github.com/JuliaEditorSupport/julia-vim) (Julia syntax highlighting for jl files)
- [just](https://github.com/NoahTheDuke/vim-just) (Syntax highlighting for justfile and *.just files) - [just](https://github.com/NoahTheDuke/vim-just) (Syntax highlighting for just files)
- [kotlin](https://github.com/udalov/kotlin-vim) (Kotlin syntax highlighting for kt, ktm and kts files) - [kotlin](https://github.com/udalov/kotlin-vim) (Kotlin syntax highlighting for kt, ktm and kts files)
- [ledger](https://github.com/ledger/vim-ledger) (Syntax highlighting for ldg, ledger and journal files) - [ledger](https://github.com/ledger/vim-ledger) (Syntax highlighting for ldg, ledger and journal files)
- [lilypond](https://github.com/anowlcalledjosh/vim-lilypond) (LilyPond syntax highlighting for ly and ily files) - [lilypond](https://github.com/anowlcalledjosh/vim-lilypond) (LilyPond syntax highlighting for ly and ily files)
@@ -182,6 +181,7 @@ On top of all language packs from [vim repository](https://github.com/vim/vim/tr
- [svelte](https://github.com/leafOfTree/vim-svelte-plugin) (Svelte syntax highlighting for svelte files) - [svelte](https://github.com/leafOfTree/vim-svelte-plugin) (Svelte syntax highlighting for svelte files)
- [svg-indent](https://github.com/jasonshell/vim-svg-indent) - [svg-indent](https://github.com/jasonshell/vim-svg-indent)
- [svg](https://github.com/vim-scripts/svg.vim) (SVG syntax highlighting for svg files) - [svg](https://github.com/vim-scripts/svg.vim) (SVG syntax highlighting for svg files)
- [sway](https://github.com/jamespeapen/swayconfig.vim/tree/i3sway) (Syntax highlighting for i3config, i3.config, swayconfig and sway.config files)
- [swift](https://github.com/keith/swift.vim) (Swift syntax highlighting for swift files) - [swift](https://github.com/keith/swift.vim) (Swift syntax highlighting for swift files)
- [sxhkd](https://github.com/baskerville/vim-sxhkdrc) (Syntax highlighting for sxhkdrc files) - [sxhkd](https://github.com/baskerville/vim-sxhkdrc) (Syntax highlighting for sxhkdrc files)
- [systemd](https://github.com/wgwoods/vim-systemd-syntax) (Syntax highlighting for automount, dnssd, link, mount, netdev and 9 more files) - [systemd](https://github.com/wgwoods/vim-systemd-syntax) (Syntax highlighting for automount, dnssd, link, mount, netdev and 9 more files)

11
after/ftplugin/just.vim Normal file
View File

@@ -0,0 +1,11 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'just', 'after/ftplugin/just.vim')
finish
endif
" Vim ftplugin file
" Language: Justfile
" Maintainer: Noah Bogart <noah.bogart@hey.com>
" URL: https://github.com/NoahTheDuke/vim-just.git
" Last Change: 2021 May 19
setlocal iskeyword+=-

View File

@@ -177,8 +177,12 @@ if !has_key(g:polyglot_is_disabled, 'nftables')
au BufNewFile,BufRead *.nft,*/nftables.conf setf nftables au BufNewFile,BufRead *.nft,*/nftables.conf setf nftables
endif endif
if !has_key(g:polyglot_is_disabled, 'just')
au BufNewFile,BufRead *.just,justfile setf just
endif
if !has_key(g:polyglot_is_disabled, 'sway') if !has_key(g:polyglot_is_disabled, 'sway')
au BufNewFile,BufRead *sway/config setf sway au BufNewFile,BufRead *.i3.config,*.i3config,*.sway.config,*.swayconfig,*sway/config,i3.config,sway.config setf i3config
endif endif
if !has_key(g:polyglot_is_disabled, 'hjson') if !has_key(g:polyglot_is_disabled, 'hjson')
@@ -2293,10 +2297,6 @@ if !has_key(g:polyglot_is_disabled, 'icalendar')
au BufNewFile,BufRead *.ics setf icalendar au BufNewFile,BufRead *.ics setf icalendar
endif endif
if !has_key(g:polyglot_is_disabled, 'i3')
au BufNewFile,BufRead *.i3.config,*.i3config,{.,}i3.config,{.,}i3config,i3.config,i3config setf i3config
endif
if !has_key(g:polyglot_is_disabled, 'hive') if !has_key(g:polyglot_is_disabled, 'hive')
au BufNewFile,BufRead *.hql,*.q,*.ql setf hive au BufNewFile,BufRead *.hql,*.q,*.ql setf hive
endif endif

View File

@@ -237,7 +237,7 @@ let s:globs = {
\ 'htmlm4': '*.html.m4', \ 'htmlm4': '*.html.m4',
\ 'httest': '*.htt,*.htb', \ 'httest': '*.htt,*.htb',
\ 'hxml': '*.hxml', \ 'hxml': '*.hxml',
\ 'i3config': '*.i3.config,*.i3config,i3.config,i3config,.i3.config,.i3config', \ 'i3config': '*.i3config,*.i3.config,*.swayconfig,*.sway.config,i3.config,sway.config',
\ 'ibasic': '*.iba,*.ibi', \ 'ibasic': '*.iba,*.ibi',
\ 'icalendar': '*.ics', \ 'icalendar': '*.ics',
\ 'icemenu': '', \ 'icemenu': '',
@@ -271,6 +271,7 @@ let s:globs = {
\ 'jsp': '*.jsp', \ 'jsp': '*.jsp',
\ 'jst': '*.ejs,*.ect,*.jst', \ 'jst': '*.ejs,*.ect,*.jst',
\ 'julia': '*.jl', \ 'julia': '*.jl',
\ 'just': '*.just,justfile',
\ 'kconfig': 'Kconfig,Kconfig.debug,Kconfig.*', \ 'kconfig': 'Kconfig,Kconfig.debug,Kconfig.*',
\ 'kivy': '*.kv', \ 'kivy': '*.kv',
\ 'kix': '*.kix', \ 'kix': '*.kix',
@@ -528,7 +529,6 @@ let s:globs = {
\ 'svelte': '*.svelte', \ 'svelte': '*.svelte',
\ 'svg': '*.svg', \ 'svg': '*.svg',
\ 'svn': 'svn-commit*.tmp', \ 'svn': 'svn-commit*.tmp',
\ 'sway': '',
\ 'swift': '*.swift', \ 'swift': '*.swift',
\ 'swiftgyb': '*.swift.gyb', \ 'swiftgyb': '*.swift.gyb',
\ 'sxhkdrc': '*.sxhkdrc,sxhkdrc', \ 'sxhkdrc': '*.sxhkdrc,sxhkdrc',

View File

@@ -1,5 +0,0 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'i3', 'ftplugin/i3config.vim')
finish
endif
setlocal commentstring=#\ %s

View File

@@ -1,5 +0,0 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'sway', 'ftplugin/sway.vim')
finish
endif
setlocal commentstring=#\ %s

View File

@@ -1,263 +0,0 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'i3', 'syntax/i3config.vim')
finish
endif
" Vim syntax file
" Language: i3 config file
" Maintainer: Mohamed Boughaba <mohamed dot bgb at gmail dot com>
" Version: 0.4
" Last Change: 2019-03-23 21:54
" 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 i3ConfigError /.*/
" Todo
syn keyword i3ConfigTodo TODO FIXME XXX contained
" Comment
" Comments are started with a # and can only be used at the beginning of a line
syn match i3ConfigComment /^\s*#.*$/ contains=i3ConfigTodo
" Font
" A FreeType font description is composed by:
" a font family, a style, a weight, a variant, a stretch and a size.
syn match i3ConfigFontSeparator /,/ contained
syn match i3ConfigFontSeparator /:/ contained
syn keyword i3ConfigFontKeyword font contained
syn match i3ConfigFontNamespace /\w\+:/ contained contains=i3ConfigFontSeparator
syn match i3ConfigFontContent /-\?\w\+\(-\+\|\s\+\|,\)/ contained contains=i3ConfigFontNamespace,i3ConfigFontSeparator,i3ConfigFontKeyword
syn match i3ConfigFontSize /\s\=\d\+\(px\)\?\s\?$/ contained
syn match i3ConfigFont /^\s*font\s\+.*$/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
syn match i3ConfigFont /^\s*font\s\+.*\(\\\_.*\)\?$/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
syn match i3ConfigFont /^\s*font\s\+.*\(\\\_.*\)\?[^\\]\+$/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
syn match i3ConfigFont /^\s*font\s\+\(\(.*\\\_.*\)\|\(.*[^\\]\+$\)\)/ contains=i3ConfigFontContent,i3ConfigFontSeparator,i3ConfigFontSize,i3ConfigFontNamespace
" variables
syn match i3ConfigString /\(['"]\)\(.\{-}\)\1/ contained
syn match i3ConfigColor /#\w\{6}/ contained
syn match i3ConfigVariableModifier /+/ contained
syn match i3ConfigVariableAndModifier /+\w\+/ contained contains=i3ConfigVariableModifier
syn match i3ConfigVariable /\$\w\+\(\(-\w\+\)\+\)\?\(\s\|+\)\?/ contains=i3ConfigVariableModifier,i3ConfigVariableAndModifier
syn keyword i3ConfigInitializeKeyword set contained
syn match i3ConfigInitialize /^\s*set\s\+.*$/ contains=i3ConfigVariable,i3ConfigInitializeKeyword,i3ConfigColor,i3ConfigString
" 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 i3ConfigSmartBorderKeyword on no_gaps contained
syn match i3ConfigSmartBorder /^\s*smart_borders\s\+\(on\|no_gaps\)\s\?$/ contains=i3ConfigSmartBorderKeyword
" Keyboard bindings
syn keyword i3ConfigAction toggle fullscreen restart key import kill shrink grow contained
syn keyword i3ConfigAction focus move grow height width split layout resize restore reload mute unmute exit mode workspace container to contained
syn match i3ConfigModifier /\w\++\w\+\(\(+\w\+\)\+\)\?/ contained contains=i3ConfigVariableModifier
syn match i3ConfigNumber /\s\d\+/ contained
syn match i3ConfigUnit /\sp\(pt\|x\)/ contained
syn match i3ConfigUnitOr /\sor/ contained
syn keyword i3ConfigBindKeyword bindsym bindcode exec gaps border contained
syn match i3ConfigBindArgument /--\w\+\(\(-\w\+\)\+\)\?\s/ contained
syn match i3ConfigBind /^\s*\(bindsym\|bindcode\)\s\+.*$/ contains=i3ConfigVariable,i3ConfigBindKeyword,i3ConfigVariableAndModifier,i3ConfigNumber,i3ConfigUnit,i3ConfigUnitOr,i3ConfigBindArgument,i3ConfigModifier,i3ConfigAction,i3ConfigString,i3ConfigGapStyleKeyword,i3ConfigBorderStyleKeyword
" Floating
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 i3ConfigFloating /^\s*floating_\(maximum\|minimum\)_size\s\+-\?\d\+\s\?x\s\?-\?\d\+/ contains=i3ConfigSize
" Orientation
syn keyword i3ConfigOrientationKeyword vertical horizontal auto contained
syn match i3ConfigOrientation /^\s*default_orientation\s\+\(vertical\|horizontal\|auto\)\s\?$/ contains=i3ConfigOrientationKeyword
" Layout
syn keyword i3ConfigLayoutKeyword default stacking tabbed contained
syn match i3ConfigLayout /^\s*workspace_layout\s\+\(default\|stacking\|tabbed\)\s\?$/ contains=i3ConfigLayoutKeyword
" Border style
syn keyword i3ConfigBorderStyleKeyword none normal pixel contained
syn match i3ConfigBorderStyle /^\s*\(new_window\|new_float\|default_border\|default_floating_border\)\s\+\(none\|\(normal\|pixel\)\(\s\+\d\+\)\?\(\s\+\$\w\+\(\(-\w\+\)\+\)\?\(\s\|+\)\?\)\?\)\s\?$/ contains=i3ConfigBorderStyleKeyword,i3ConfigNumber,i3ConfigVariable
" Hide borders and edges
syn keyword i3ConfigEdgeKeyword none vertical horizontal both smart smart_no_gaps contained
syn match i3ConfigEdge /^\s*hide_edge_borders\s\+\(none\|vertical\|horizontal\|both\|smart\|smart_no_gaps\)\s\?$/ contains=i3ConfigEdgeKeyword
" Arbitrary commands for specific windows (for_window)
syn keyword i3ConfigCommandKeyword for_window contained
syn region i3ConfigWindowStringSpecial start=+"+ skip=+\\"+ end=+"+ contained contains=i3ConfigString
syn region i3ConfigWindowCommandSpecial start="\[" end="\]" contained contains=i3ConfigWindowStringSpacial,i3ConfigString
syn match i3ConfigArbitraryCommand /^\s*for_window\s\+.*$/ contains=i3ConfigWindowCommandSpecial,i3ConfigCommandKeyword,i3ConfigBorderStyleKeyword,i3ConfigLayoutKeyword,i3ConfigOrientationKeyword,Size,i3ConfigNumber
" Disable focus open opening
syn keyword i3ConfigNoFocusKeyword no_focus contained
syn match i3ConfigDisableFocus /^\s*no_focus\s\+.*$/ contains=i3ConfigWindowCommandSpecial,i3ConfigNoFocusKeyword
" Move client to specific workspace automatically
syn keyword i3ConfigAssignKeyword assign contained
syn match i3ConfigAssignSpecial /→/ contained
syn match i3ConfigAssign /^\s*assign\s\+.*$/ contains=i3ConfigAssignKeyword,i3ConfigWindowCommandSpecial,i3ConfigAssignSpecial
" X resources
syn keyword i3ConfigResourceKeyword set_from_resource contained
syn match i3ConfigResource /^\s*set_from_resource\s\+.*$/ contains=i3ConfigResourceKeyword,i3ConfigWindowCommandSpecial,i3ConfigColor,i3ConfigVariable
" Auto start applications
syn keyword i3ConfigExecKeyword exec exec_always contained
syn match i3ConfigNoStartupId /--no-startup-id/ contained " We are not using i3ConfigBindArgument as only no-startup-id is supported here
syn match i3ConfigExec /^\s*exec\(_always\)\?\s\+.*$/ contains=i3ConfigExecKeyword,i3ConfigNoStartupId,i3ConfigString
" Automatically putting workspaces on specific screens
syn keyword i3ConfigWorkspaceKeyword workspace contained
syn keyword i3ConfigOutput output contained
syn match i3ConfigWorkspace /^\s*workspace\s\+.*$/ contains=i3ConfigWorkspaceKeyword,i3ConfigNumber,i3ConfigString,i3ConfigOutput
" Changing colors
syn keyword i3ConfigClientColorKeyword client focused focused_inactive unfocused urgent placeholder background contained
syn match i3ConfigClientColor /^\s*client.\w\+\s\+.*$/ contains=i3ConfigClientColorKeyword,i3ConfigColor,i3ConfigVariable
syn keyword i3ConfigTitleAlignKeyword left center right contained
syn match i3ConfigTitleAlign /^\s*title_align\s\+.*$/ contains=i3ConfigTitleAlignKeyword
" Interprocess communication
syn match i3ConfigInterprocessKeyword /ipc-socket/ contained
syn match i3ConfigInterprocess /^\s*ipc-socket\s\+.*$/ contains=i3ConfigInterprocessKeyword
" Mouse warping
syn keyword i3ConfigMouseWarpingKeyword mouse_warping contained
syn keyword i3ConfigMouseWarpingType output none contained
syn match i3ConfigMouseWarping /^\s*mouse_warping\s\+\(output\|none\)\s\?$/ contains=i3ConfigMouseWarpingKeyword,i3ConfigMouseWarpingType
" Focus follows mouse
syn keyword i3ConfigFocusFollowsMouseKeyword focus_follows_mouse contained
syn keyword i3ConfigFocusFollowsMouseType yes no contained
syn match i3ConfigFocusFollowsMouse /^\s*focus_follows_mouse\s\+\(yes\|no\)\s\?$/ contains=i3ConfigFocusFollowsMouseKeyword,i3ConfigFocusFollowsMouseType
" Popups during fullscreen mode
syn keyword i3ConfigPopupOnFullscreenKeyword popup_during_fullscreen contained
syn keyword i3ConfigPopuponFullscreenType smart ignore leave_fullscreen contained
syn match i3ConfigPopupOnFullscreen /^\s*popup_during_fullscreen\s\+\w\+\s\?$/ contains=i3ConfigPopupOnFullscreenKeyword,i3ConfigPopupOnFullscreenType
" Focus wrapping
syn keyword i3ConfigFocusWrappingKeyword force_focus_wrapping focus_wrapping contained
syn keyword i3ConfigFocusWrappingType yes no contained
syn match i3ConfigFocusWrapping /^\s*\(force_\)\?focus_wrapping\s\+\(yes\|no\)\s\?$/ contains=i3ConfigFocusWrappingType,i3ConfigFocusWrappingKeyword
" Forcing Xinerama
syn keyword i3ConfigForceXineramaKeyword force_xinerama contained
syn match i3ConfigForceXinerama /^\s*force_xinerama\s\+\(yes\|no\)\s\?$/ contains=i3ConfigFocusWrappingType,i3ConfigForceXineramaKeyword
" Automatic back-and-forth when switching to the current workspace
syn keyword i3ConfigAutomaticSwitchKeyword workspace_auto_back_and_forth contained
syn match i3ConfigAutomaticSwitch /^\s*workspace_auto_back_and_forth\s\+\(yes\|no\)\s\?$/ contains=i3ConfigFocusWrappingType,i3ConfigAutomaticSwitchKeyword
" Delay urgency hint
syn keyword i3ConfigTimeUnit ms contained
syn keyword i3ConfigDelayUrgencyKeyword force_display_urgency_hint contained
syn match i3ConfigDelayUrgency /^\s*force_display_urgency_hint\s\+\d\+\s\+ms\s\?$/ contains=i3ConfigFocusWrappingType,i3ConfigDelayUrgencyKeyword,i3ConfigNumber,i3ConfigTimeUnit
" Focus on window activation
syn keyword i3ConfigFocusOnActivationKeyword focus_on_window_activation contained
syn keyword i3ConfigFocusOnActivationType smart urgent focus none contained
syn match i3ConfigFocusOnActivation /^\s*focus_on_window_activation\s\+\(smart\|urgent\|focus\|none\)\s\?$/ contains=i3ConfigFocusOnActivationKeyword,i3ConfigFocusOnActivationType
" Automatic back-and-forth when switching to the current workspace
syn keyword i3ConfigDrawingMarksKeyword show_marks contained
syn match i3ConfigDrawingMarks /^\s*show_marks\s\+\(yes\|no\)\s\?$/ contains=i3ConfigFocusWrappingType,i3ConfigDrawingMarksKeyword
" Group mode/bar
syn keyword i3ConfigBlockKeyword 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 i3ConfigBlock start=+.*s\?{$+ end=+^}$+ contains=i3ConfigBlockKeyword,i3ConfigString,i3ConfigBind,i3ConfigComment,i3ConfigFont,i3ConfigFocusWrappingType,i3ConfigColor,i3ConfigVariable transparent keepend extend
" Line continuation
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
hi! def link i3ConfigFocusOnActivationType Type
hi! def link i3ConfigPopupOnFullscreenType Type
hi! def link i3ConfigOrientationKeyword Type
hi! def link i3ConfigMouseWarpingType Type
hi! def link i3ConfigFocusFollowsMouseType Type
hi! def link i3ConfigGapStyleKeyword Type
hi! def link i3ConfigTitleAlignKeyword Type
hi! def link i3ConfigSmartGapKeyword Type
hi! def link i3ConfigSmartBorderKeyword Type
hi! def link i3ConfigLayoutKeyword Type
hi! def link i3ConfigBorderStyleKeyword Type
hi! def link i3ConfigEdgeKeyword Type
hi! def link i3ConfigAction Type
hi! def link i3ConfigCommand Type
hi! def link i3ConfigOutput Type
hi! def link i3ConfigWindowCommandSpecial Type
hi! def link i3ConfigFocusWrappingType Type
hi! def link i3ConfigUnitOr Type
hi! def link i3ConfigFontSize Constant
hi! def link i3ConfigColor Constant
hi! def link i3ConfigNumber Constant
hi! def link i3ConfigUnit Constant
hi! def link i3ConfigVariableAndModifier Constant
hi! def link i3ConfigTimeUnit Constant
hi! def link i3ConfigModifier Constant
hi! def link i3ConfigString Constant
hi! def link i3ConfigNegativeSize Constant
hi! def link i3ConfigFontSeparator Special
hi! def link i3ConfigVariableModifier Special
hi! def link i3ConfigSizeSpecial Special
hi! def link i3ConfigWindowSpecial Special
hi! def link i3ConfigAssignSpecial Special
hi! def link i3ConfigFontNamespace PreProc
hi! def link i3ConfigBindArgument PreProc
hi! def link i3ConfigNoStartupId PreProc
hi! def link i3ConfigFontKeyword Identifier
hi! def link i3ConfigBindKeyword Identifier
hi! def link i3ConfigOrientation Identifier
hi! def link i3ConfigGapStyle Identifier
hi! def link i3ConfigTitleAlign Identifier
hi! def link i3ConfigSmartGap Identifier
hi! def link i3ConfigSmartBorder Identifier
hi! def link i3ConfigLayout Identifier
hi! def link i3ConfigBorderStyle Identifier
hi! def link i3ConfigEdge Identifier
hi! def link i3ConfigFloating Identifier
hi! def link i3ConfigCommandKeyword Identifier
hi! def link i3ConfigNoFocusKeyword Identifier
hi! def link i3ConfigInitializeKeyword Identifier
hi! def link i3ConfigAssignKeyword Identifier
hi! def link i3ConfigResourceKeyword Identifier
hi! def link i3ConfigExecKeyword Identifier
hi! def link i3ConfigWorkspaceKeyword Identifier
hi! def link i3ConfigClientColorKeyword Identifier
hi! def link i3ConfigInterprocessKeyword Identifier
hi! def link i3ConfigMouseWarpingKeyword Identifier
hi! def link i3ConfigFocusFollowsMouseKeyword Identifier
hi! def link i3ConfigPopupOnFullscreenKeyword Identifier
hi! def link i3ConfigFocusWrappingKeyword Identifier
hi! def link i3ConfigForceXineramaKeyword Identifier
hi! def link i3ConfigAutomaticSwitchKeyword Identifier
hi! def link i3ConfigDelayUrgencyKeyword Identifier
hi! def link i3ConfigFocusOnActivationKeyword Identifier
hi! def link i3ConfigDrawingMarksKeyword Identifier
hi! def link i3ConfigBlockKeyword Identifier
hi! def link i3ConfigVariable Statement
hi! def link i3ConfigArbitraryCommand Type
let b:current_syntax = "i3config"

128
syntax/just.vim Normal file
View File

@@ -0,0 +1,128 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'just', 'syntax/just.vim')
finish
endif
" Vim syntax file
" Language: Justfile
" Maintainer: Noah Bogart <noah.bogart@hey.com>
" URL: https://github.com/NoahTheDuke/vim-just.git
" Last Change: 2021 May 19
if exists('b:current_syntax')
finish
endif
let b:current_syntax = 'just'
syntax sync minlines=20 maxlines=200
syntax match justNoise ","
syntax match justComment "\v#.*$" contains=@Spell
syntax match justName "[a-zA-Z_][a-zA-Z0-9_-]*" contained
syntax match justFunction "[a-zA-Z_][a-zA-Z0-9_-]*" contained
syntax region justBacktick start=/`/ skip=/\./ end=/`/ contains=justInterpolation
syntax region justRawString start=/'/ skip=/\./ end=/'/ contains=justInterpolation
syntax region justString start=/"/ skip=/\./ end=/"/ contains=justInterpolation
syntax cluster justAllStrings contains=justBacktick,justRawString,justString
syntax match justAssignmentOperator ":=" contained
syntax match justParameterOperator "=" contained
syntax match justVariadicOperator "*\|+\|\$" contained
syntax match justParameter "\v\s\zs%(\*|\+|\$)?[a-zA-Z_][a-zA-Z0-9_-]*\ze\=?" contained contains=justVariadicOperator,justParameterOperator
syntax match justNextLine "\\\n\s*"
syntax match justRecipeAt "^@" contained
syntax match justRecipeColon "\v:" contained
syntax region justRecipe
\ matchgroup=justRecipeBody start="\v^\@?[a-zA-Z_]((:\=)@!.)*\ze:%(\s|\n)"
\ matchgroup=justRecipeDeps end="\v:\zs.*\n"
\ contains=justFunction,justRecipeColon
syntax match justRecipeBody "\v^\@?[a-zA-Z_]((:\=)@!.)*\ze:%(\s|\n)"
\ contains=justRecipeAt,justRecipeColon,justParameter,justParameterOperator,justVariadicOperator,@justAllStrings,justComment
syntax match justRecipeDeps "\v:[^\=]?.*\n"
\ contains=justComment,justFunction,justRecipeColon
syntax match justBoolean "\v(true|false)" contained
syntax match justKeywords "\v%(export|set)" contained
syntax match justAssignment "\v^[a-zA-Z_][a-zA-Z0-9_-]*\s+:\=" transparent contains=justAssignmentOperator
syntax match justSetKeywords "\v%(dotenv-load|export|positional-arguments|shell)" contained
syntax match justSetDefinition "\v^set\s+%(dotenv-load|export|positional-arguments)%(\s+:\=\s+%(true|false))?$"
\ contains=justSetKeywords,justKeywords,justAssignmentOperator,justBoolean
\ transparent
syntax match justSetBraces "\v[\[\]]" contained
syntax region justSetDefinition
\ start="\v^set\s+shell\s+:\=\s+\["
\ end="]"
\ contains=justSetKeywords,justKeywords,justAssignmentOperator,@justAllStrings,justNoise,justSetBraces
\ transparent skipwhite oneline
syntax region justAlias
\ matchgroup=justAlias start="\v^alias\ze\s+[a-zA-Z_][a-zA-Z0-9_-]*\s+:\="
\ end="$"
\ contains=justKeywords,justFunction,justAssignmentOperator
\ oneline skipwhite
syntax region justExport
\ matchgroup=justExport start="\v^export\ze\s+[a-zA-Z_][a-zA-Z0-9_-]*%(\s+:\=)?"
\ end="$"
\ contains=justKeywords,justAssignmentOperator
\ transparent oneline skipwhite
syntax keyword justConditional if else
syntax region justConditionalBraces start="\v[^{]\{[^{]" end="}" contained oneline contains=ALLBUT,justConditionalBraces,justBodyText
syntax match justBodyText "[^[:space:]#]\+" contained
syntax match justLineLeadingSymbol "\v^\s+\zs%(\@|-)" contained
syntax match justLineContinuation "\\$" contained
syntax region justBody transparent matchgroup=justLineLeadingSymbol start="\v^\s+\zs[@-]"hs=e-1 matchgroup=justBodyText start="\v^\s+\zs[^[:space:]@#-]"hs=e-1 end="\n" skipwhite oneline contains=justInterpolation,justBodyText,justLineLeadingSymbol,justLineContinuation,justComment
syntax region justInterpolation start="{{" end="}}" contained contains=ALLBUT,justInterpolation,justFunction,justBodyText
syntax match justBuiltInFunctionParens "[()]" contained
syntax match justBuiltInFunctions "\v%(arch|os|os_family|invocation_directory|justfile|justfile_directory|just_executable)\ze\(\)" contains=justBuiltInFunctions
syntax region justBuiltInFunctions transparent matchgroup=justBuiltInFunctions start="\v%(env_var_or_default|env_var)\ze\(" end=")" oneline contains=@justAllStrings,justBuiltInFunctionParens,justNoise
syntax match justBuiltInFunctionsError "\v%(arch|os|os_family|invocation_directory|justfile|justfile_directory|just_executable)\(.+\)"
syntax match justOperator "\v%(\=\=|!\=|\+)"
highlight default link justAlias Keyword
highlight default link justAssignmentOperator Operator
highlight default link justBacktick String
highlight default link justBodyText Constant
highlight default link justBoolean Boolean
highlight default link justBuiltInFunctions Function
highlight default link justBuiltInFunctionsError Error
highlight default link justBuiltInFunctionParens Delimiter
highlight default link justComment Comment
highlight default link justConditional Conditional
highlight default link justConditionalBraces Delimiter
highlight default link justExport Keyword
highlight default link justFunction Function
highlight default link justInterpolation Delimiter
highlight default link justKeywords Keyword
highlight default link justLineContinuation Special
highlight default link justLineLeadingSymbol Special
highlight default link justName Identifier
highlight default link justNextLine Special
highlight default link justOperator Operator
highlight default link justParameter Identifier
highlight default link justParameterOperator Operator
highlight default link justRawString String
highlight default link justRecipe Function
highlight default link justRecipeAt Special
highlight default link justRecipeBody Function
highlight default link justRecipeColon Operator
highlight default link justSetDefinition Keyword
highlight default link justSetKeywords Keyword
highlight default link justString String
highlight default link justVariadicOperator Operator

View File

@@ -1,133 +0,0 @@
if polyglot#init#is_disabled(expand('<sfile>:p'), 'sway', 'syntax/sway.vim')
finish
endif
" Vim syntax file
" Language: sway-wm config file
" Maintainer: Aaron Ouellette
" Latest Revision: 11 June 2016
if exists("b:current_syntax")
finish
endif
" Symbols
syn match swayOperators "+\|→"
syn match swayChainDelimiter ";"
syn match swayVar "\$\w\+"
" Key modifiers
syn keyword swayKeyModifier Shift Control Ctrl Mod1 Mod2 Mod3 Mod4 Mod5 Mode_switch
" Strings
syn region swaySimpleString keepend start='[^ \t]' end='$\|;' contained contains=swayChainDelimiter,swayVar
syn match swayQuotedString '"[^"]\+"' contained
syn cluster swayString contains=swaySimpleString,swayQuotedString
" Config commands
syn keyword swayConfigCommand bind bindcode bindsym assign new_window popup_during_fullscreen font floating_modifier default_orientation workspace_layout for_window focus_follows_mouse bar position colors output input workspace_buttons workspace_auto_back_and_forth binding_mode_indicator debuglog floating_minimum_size floating_maximum_size force_focus_wrapping force_display_urgency_hint hidden_state modifier new_float socket_path mouse_warping strip_workspace_numbers focus_on_window_activation no_focus include gaps
syn match swayIpcSocket "ipc[-_]socket" nextgroup=@swayString skipwhite
" Command keywords
syn keyword swayCommand exit reload restart kill fullscreen global layout border focus move open split append_layout mark unmark resize grow shrink show nop rename title_format sticky
syn keyword swayParam 1pixel default stacked tabbed normal none tiling stacking floating enable disable up down horizontal vertical auto up down left right parent child px or ppt leave_fullscreen toggle mode_toggle scratchpad width height top bottom client hide primary yes all active window container to absolute center on off x ms h v smart ignore pixel splith splitv output true
syn match swayDashedParam '--\(release\|border\|whole-window\|toggle\)' skipwhite
syn keyword swayWsSpecialParam next prev next_on_output prev_on_output back_and_forth current number
syn keyword swayBordersSpecialParam none vertical horizontal both
syn keyword swayModeParam dock hide invisible skipwhite
" these are not keywords but we add them for consistency
syn keyword swayPseudoParam no false inactive
" Exec commands
syn region swayExecCommand keepend start='[^ \t]' end='$\|;' contained contains=swayChainDelimiter,swayVar,swayNoStartupId
syn match swayQuotedExecCommand '"[^"]\+"' contained
syn keyword swayExecKeyword exec exec_always swaybar_command nextgroup=swayQuotedExecCommand,swayExecCommand skipwhite
" Status command
syn match swayStatusCommand ".*$" contained
syn keyword swayStatusCommandKeyword status_command nextgroup=swayStatusCommand skipwhite
" Font statement
syn keyword swayFontStatement font nextgroup=@swayString skipwhite
" Separator symbol
syn keyword swaySeparatorSymbol separator_symbol nextgroup=@swayString skipwhite
" Set statement
syn match swaySetVar "\$\w\+" contained nextgroup=@swayString skipwhite
syn keyword swaySetKeyword set nextgroup=swaySetVar skipwhite
" Workspaces
syn keyword swayWsKeyword workspace nextgroup=swayWsSpecialParam,@swayString skipwhite
" Hide edge borders
syn keyword swayBordersConfigCommand hide_edge_borders nextgroup=swayBordersSpecialParam skipwhite
" Mode
syn keyword swayModeKeyword mode nextgroup=swayModeParam,@swayString skipwhite
" Comments
syn keyword swayTodo contained TODO FIXME XXX NOTE
syn match swayComment "^\s*#.*$" contains=swayTodo
" Error (at end of line)
syn match swayError ".*$" contained
" Hex color code
syn match swayColorLast "#[0-9a-fA-F]\{6\}" contained nextgroup=swayError skipwhite
syn match swayColor2nd "#[0-9a-fA-F]\{6\}" contained nextgroup=swayColorLast skipwhite
syn match swayColor1st "#[0-9a-fA-F]\{6\}" contained nextgroup=swayColor2nd skipwhite
syn match swayColorDef1 "client\.background\|statusline\|background\|separator\|statusline" nextgroup=swayColorLast skipwhite
syn match swayColorDef3 "client\.\(focused_inactive\|focused\|unfocused\|urgent\)\|inactive_workspace\|urgent_workspace\|focused_workspace\|active_workspace" nextgroup=swayColor1st skipwhite
highlight link swayChainDelimiter Operator
highlight link swayOperators Operator
highlight link swayExecCommand Special
highlight link swayQuotedExecCommand Special
highlight link swayStatusCommand Special
highlight link swayParam Constant
highlight link swayPseudoParam Constant
highlight link swayDashedParam Constant
highlight link swayNoStartupId Constant
highlight link swayColor1st Constant
highlight link swayColor2nd Constant
highlight link swayColorLast Constant
highlight link swayWsSpecialParam Constant
highlight link swayBordersSpecialParam Constant
highlight link swayModeParam Constant
highlight link swayVar Identifier
highlight link swaySetVar Identifier
highlight link swayKeyModifier Function
highlight link swaySimpleString String
highlight link swayQuotedString String
highlight link swayWsName String
highlight link swayQuotedWsName String
highlight link swaySetValue String
highlight link swayFont String
highlight link swayExecKeyword Keyword
highlight link swayCommand Keyword
highlight link swayWsKeyword Keyword
highlight link swayColorDef1 Define
highlight link swayColorDef3 Define
highlight link swayConfigCommand Define
highlight link swayIpcSocket Define
highlight link swaySetKeyword Define
highlight link swayModeKeyword Define
highlight link swayFontStatement Define
highlight link swaySeparatorSymbol Define
highlight link swayStatusCommandKeyword Define
highlight link swayBordersConfigCommand Define
highlight link swayTodo Todo
highlight link swayComment Comment
highlight link swayError Error

View File

@@ -121,7 +121,6 @@ call TestFiletype('hxml')
call TestFiletype('hss') call TestFiletype('hss')
call TestFiletype('hcl') call TestFiletype('hcl')
call TestFiletype('hive') call TestFiletype('hive')
call TestFiletype('i3config')
call TestFiletype('icalendar') call TestFiletype('icalendar')
call TestFiletype('idris') call TestFiletype('idris')
call TestFiletype('idris2') call TestFiletype('idris2')
@@ -649,7 +648,8 @@ call TestFiletype('mint')
call TestFiletype('jsonc') call TestFiletype('jsonc')
call TestFiletype('gleam') call TestFiletype('gleam')
call TestFiletype('hjson') call TestFiletype('hjson')
call TestFiletype('sway') call TestFiletype('i3config')
call TestFiletype('just')
call TestFiletype('nftables') call TestFiletype('nftables')
call TestFiletype('openscad') call TestFiletype('openscad')