aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax/chatito.vim
diff options
context:
space:
mode:
authorChristian Clason <c.clason@uni-graz.at>2022-09-28 12:48:36 +0200
committerGitHub <noreply@github.com>2022-09-28 12:48:36 +0200
commit9ca313fb968448011aae0509e6552c52b9f8aa8c (patch)
tree0c3c1484d213250dfb2f36718793a646937b1b53 /runtime/syntax/chatito.vim
parent35e2c4a2edd28f72c48c70530c5486365c2502a4 (diff)
downloadrneovim-9ca313fb968448011aae0509e6552c52b9f8aa8c.tar.gz
rneovim-9ca313fb968448011aae0509e6552c52b9f8aa8c.tar.bz2
rneovim-9ca313fb968448011aae0509e6552c52b9f8aa8c.zip
vim-patch:9fbdbb814f4a (#20376)
Update runtime files https://github.com/vim/vim/commit/9fbdbb814f4ad67a14979aba4a6a49800c2f1a99 Skip ftplugin/vim.vim (vim9script change) Drop indent/vim.vim and autoload/dist/vimindent.vim (vim9script rewrite)
Diffstat (limited to 'runtime/syntax/chatito.vim')
-rw-r--r--runtime/syntax/chatito.vim62
1 files changed, 62 insertions, 0 deletions
diff --git a/runtime/syntax/chatito.vim b/runtime/syntax/chatito.vim
new file mode 100644
index 0000000000..d89307cf06
--- /dev/null
+++ b/runtime/syntax/chatito.vim
@@ -0,0 +1,62 @@
+" Vim syntax file
+" Language: Chatito
+" Maintainer: ObserverOfTime <chronobserver@disroot.org>
+" Filenames: *.chatito
+" Last Change: 2022 Sep 19
+
+if exists('b:current_syntax')
+ finish
+endif
+
+" Comment
+syn keyword chatitoTodo contained TODO FIXME XXX
+syn match chatitoComment /^#.*/ contains=chatitoTodo,@Spell
+syn match chatitoComment +^//.*+ contains=chatitoTodo,@Spell
+
+" Import
+syn match chatitoImport /^import \+.*$/ transparent contains=chatitoImportKeyword,chatitoImportFile
+syn keyword chatitoImportKeyword import contained nextgroup=chatitoImportFile
+syn match chatitoImportFile /.*$/ contained skipwhite
+
+" Intent
+syn match chatitoIntent /^%\[[^\]?]\+\]\((.\+)\)\=$/ contains=chatitoArgs
+
+" Slot
+syn match chatitoSlot /^@\[[^\]?#]\+\(#[^\]?#]\+\)\=\]\((.\+)\)\=$/ contains=chatitoArgs,chatitoVariation
+syn match chatitoSlot /@\[[^\]?#]\+\(#[^\]?#]\+\)\=?\=\]/ contained contains=chatitoOpt,chatitoVariation
+
+" Alias
+syn match chatitoAlias /^\~\[[^\]?]\+\]\=$/
+syn match chatitoAlias /\~\[[^\]?]\+?\=\]/ contained contains=chatitoOpt
+
+" Probability
+syn match chatitoProbability /\*\[\d\+\(\.\d\+\)\=%\=\]/ contained
+
+" Optional
+syn match chatitoOpt '?' contained
+
+" Arguments
+syn match chatitoArgs /(.\+)/ contained
+
+" Variation
+syn match chatitoVariation /#[^\]?#]\+/ contained
+
+" Value
+syn match chatitoValue /^ \{4\}\zs.\+$/ contains=chatitoProbability,chatitoSlot,chatitoAlias,@Spell
+
+" Errors
+syn match chatitoError /^\t/
+
+hi def link chatitoAlias String
+hi def link chatitoArgs Special
+hi def link chatitoComment Comment
+hi def link chatitoError Error
+hi def link chatitoImportKeyword Include
+hi def link chatitoIntent Statement
+hi def link chatitoOpt SpecialChar
+hi def link chatitoProbability Number
+hi def link chatitoSlot Identifier
+hi def link chatitoTodo Todo
+hi def link chatitoVariation Special
+
+let b:current_syntax = 'chatito'