summaryrefslogtreecommitdiffstats
path: root/syntax/toml.vim
diff options
context:
space:
mode:
Diffstat (limited to 'syntax/toml.vim')
-rw-r--r--syntax/toml.vim10
1 files changed, 8 insertions, 2 deletions
diff --git a/syntax/toml.vim b/syntax/toml.vim
index 82338428..17ea3cf9 100644
--- a/syntax/toml.vim
+++ b/syntax/toml.vim
@@ -41,10 +41,16 @@ hi def link tomlBoolean Boolean
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 tomlTable /^\s*\[[^#\[\]]\+\]\s*\(#.*\)\?$/ contains=tomlComment
+syn region tomlKeyDq oneline start=/"/ end=/"/ contains=tomlEscape contained
+hi def link tomlKeyDq Identifier
+
+syn region tomlKeySq oneline start=/'/ end=/'/ contained
+hi def link tomlKeySq Identifier
+
+syn region tomlTable oneline start=/^\s*\[[^\[]/ end=/\]/ contains=tomlKeyDq,tomlKeySq
hi def link tomlTable Identifier
-syn match tomlTableArray /^\s*\[\[[^#\[\]]\+\]\]\s*\(#.*\)\?$/ contains=tomlComment
+syn region tomlTableArray oneline start=/^\s*\[\[/ end=/\]\]/ contains=tomlKeyDq,tomlKeySq
hi def link tomlTableArray Identifier
syn keyword tomlTodo TODO FIXME XXX BUG contained