summaryrefslogtreecommitdiffstats
path: root/syntax/toml.vim
diff options
context:
space:
mode:
authorAdam Stankiewicz <sheerun@sher.pl>2018-07-08 15:16:28 +0200
committerAdam Stankiewicz <sheerun@sher.pl>2018-07-08 15:16:28 +0200
commit055f7710b65dfa2df52fc0b5be2486ae36ac5751 (patch)
tree0b6c36a330e8c0c4e37ad521773d28b6c52ad3ec /syntax/toml.vim
parent33f610feb73ce782cf41a7d9a377541991c692b5 (diff)
downloadvim-polyglot-055f7710b65dfa2df52fc0b5be2486ae36ac5751.tar.gz
vim-polyglot-055f7710b65dfa2df52fc0b5be2486ae36ac5751.zip
Update dependencies
Diffstat (limited to 'syntax/toml.vim')
-rw-r--r--syntax/toml.vim12
1 files changed, 8 insertions, 4 deletions
diff --git a/syntax/toml.vim b/syntax/toml.vim
index 7a5b44f2..1decc5fb 100644
--- a/syntax/toml.vim
+++ b/syntax/toml.vim
@@ -28,6 +28,7 @@ syn region tomlString start=/'''/ end=/'''/
hi def link tomlString String
syn match tomlInteger /\<[+-]\=[0-9]\(_\=\d\)*\>/ display
+syn match tomlInteger /\<[+-]\=\(inf\|nan\)\>/ display
hi def link tomlInteger Number
syn match tomlFloat /\<[+-]\=[0-9]\(_\=\d\)*\.\d\+\>/ display
@@ -43,16 +44,19 @@ 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 region tomlKeyDq oneline start=/"/ end=/"/ contains=tomlEscape contained
+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=/'/ end=/'/ contained
+syn region tomlKeySq oneline start=/\v(^|[{,])\s*\zs'/ end=/'\ze\s*=/
hi def link tomlKeySq Identifier
-syn region tomlTable oneline start=/^\s*\[[^\[]/ end=/\]/ contains=tomlKeyDq,tomlKeySq
+syn region tomlTable oneline start=/^\s*\[[^\[]/ end=/\]/ contains=tomlKey,tomlKeyDq,tomlKeySq
hi def link tomlTable Identifier
-syn region tomlTableArray oneline start=/^\s*\[\[/ end=/\]\]/ contains=tomlKeyDq,tomlKeySq
+syn region tomlTableArray oneline start=/^\s*\[\[/ end=/\]\]/ contains=tomlKey,tomlKeyDq,tomlKeySq
hi def link tomlTableArray Identifier
syn keyword tomlTodo TODO FIXME XXX BUG contained