aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax
diff options
context:
space:
mode:
authorJustin M. Keyes <justinkz@gmail.com>2019-08-02 07:08:49 +0200
committerJustin M. Keyes <justinkz@gmail.com>2019-08-02 16:20:22 +0200
commit1e4e890a764dfef1db7046ff24d43241c4054925 (patch)
tree6c968034de0d5e20e8e6d5d715839f6f9d19a7e5 /runtime/syntax
parent0d852bdc69b0293695c391e316c65183b88b83ef (diff)
downloadrneovim-1e4e890a764dfef1db7046ff24d43241c4054925.tar.gz
rneovim-1e4e890a764dfef1db7046ff24d43241c4054925.tar.bz2
rneovim-1e4e890a764dfef1db7046ff24d43241c4054925.zip
vim-patch:396e829fa355
Update runtime files https://github.com/vim/vim/commit/396e829fa355ebc92a618ef18266a3fed71b7042
Diffstat (limited to 'runtime/syntax')
-rw-r--r--runtime/syntax/json.vim24
-rw-r--r--runtime/syntax/vuejs.vim14
2 files changed, 28 insertions, 10 deletions
diff --git a/runtime/syntax/json.vim b/runtime/syntax/json.vim
index d80af84312..e3210a9702 100644
--- a/runtime/syntax/json.vim
+++ b/runtime/syntax/json.vim
@@ -1,7 +1,8 @@
" Vim syntax file
" Language: JSON
-" Maintainer: Eli Parra <eli@elzr.com>
-" Last Change: 2014 Aug 23
+" Maintainer: vacancy
+" Previous Maintainer: Eli Parra <eli@elzr.com>
+" Last Change: 2019 Jul 08
" Version: 0.12
if !exists("main_syntax")
@@ -16,8 +17,19 @@ syntax match jsonNoise /\%(:\|,\)/
" NOTE that for the concealing to work your conceallevel should be set to 2
+" Syntax: JSON Keywords
+" Separated into a match and region because a region by itself is always greedy
+syn match jsonKeywordMatch /"\([^"]\|\\\"\)\+"[[:blank:]\r\n]*\:/ contains=jsonKeyword
+if has('conceal')
+ syn region jsonKeyword matchgroup=jsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ concealends contained
+else
+ syn region jsonKeyword matchgroup=jsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ contained
+endif
+
" Syntax: Strings
" Separated into a match and region because a region by itself is always greedy
+" Needs to come after keywords or else a json encoded string will break the
+" syntax
syn match jsonStringMatch /"\([^"]\|\\\"\)\+"\ze[[:blank:]\r\n]*[,}\]]/ contains=jsonString
if has('conceal')
syn region jsonString oneline matchgroup=jsonQuote start=/"/ skip=/\\\\\|\\"/ end=/"/ concealends contains=jsonEscape contained
@@ -28,14 +40,6 @@ endif
" Syntax: JSON does not allow strings with single quotes, unlike JavaScript.
syn region jsonStringSQError oneline start=+'+ skip=+\\\\\|\\"+ end=+'+
-" Syntax: JSON Keywords
-" Separated into a match and region because a region by itself is always greedy
-syn match jsonKeywordMatch /"\([^"]\|\\\"\)\+"[[:blank:]\r\n]*\:/ contains=jsonKeyword
-if has('conceal')
- syn region jsonKeyword matchgroup=jsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ concealends contained
-else
- syn region jsonKeyword matchgroup=jsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ contained
-endif
" Syntax: Escape sequences
syn match jsonEscape "\\["\\/bfnrt]" contained
diff --git a/runtime/syntax/vuejs.vim b/runtime/syntax/vuejs.vim
new file mode 100644
index 0000000000..bad0e26c42
--- /dev/null
+++ b/runtime/syntax/vuejs.vim
@@ -0,0 +1,14 @@
+" Vim syntax file
+" Language: Vue.js Single File Component
+" Maintainer: Ralph Giles <giles@thaumas.net>
+" URL: https://vuejs.org/v2/guide/single-file-components.html
+" Last Change: 2019 Jul 8
+
+" Quit if a syntax file was already loaded.
+if exists("b:current_syntax")
+ finish
+endif
+
+" We have a collection of html, css and javascript wrapped in
+" tags. The default HTML syntax highlight works well enough.
+runtime! syntax/html.vim