aboutsummaryrefslogtreecommitdiff
path: root/runtime/syntax/json.vim
diff options
context:
space:
mode:
authorJan Edmund Lazo <jan.lazo@mail.utoronto.ca>2021-05-04 19:18:16 -0400
committerGitHub <noreply@github.com>2021-05-04 19:18:16 -0400
commit4ad30f775e5564c539324b4818886f067d2ecd99 (patch)
tree97a554379bda7e5fc77e58c690db3f5a72db8c74 /runtime/syntax/json.vim
parent63d8a8f4e8b02e524d85aed08aa16c5d9815598c (diff)
parentd5b063aec1db95704b37a77fdbd968cb6b48cc3b (diff)
downloadrneovim-4ad30f775e5564c539324b4818886f067d2ecd99.tar.gz
rneovim-4ad30f775e5564c539324b4818886f067d2ecd99.tar.bz2
rneovim-4ad30f775e5564c539324b4818886f067d2ecd99.zip
Merge pull request #14424 from janlazo/vim-8.1.1726
vim-patch:8.1.1726,8.2.{296,860,1827,2388,2788,2790,2801}
Diffstat (limited to 'runtime/syntax/json.vim')
-rw-r--r--runtime/syntax/json.vim6
1 files changed, 3 insertions, 3 deletions
diff --git a/runtime/syntax/json.vim b/runtime/syntax/json.vim
index e3210a9702..3f49b0c5ea 100644
--- a/runtime/syntax/json.vim
+++ b/runtime/syntax/json.vim
@@ -2,7 +2,7 @@
" Language: JSON
" Maintainer: vacancy
" Previous Maintainer: Eli Parra <eli@elzr.com>
-" Last Change: 2019 Jul 08
+" Last Change: 2019 Sep 17
" Version: 0.12
if !exists("main_syntax")
@@ -20,7 +20,7 @@ syntax match jsonNoise /\%(:\|,\)/
" 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')
+if has('conceal') && (!exists("g:vim_json_conceal") || g:vim_json_conceal==1)
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
@@ -31,7 +31,7 @@ endif
" 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')
+if has('conceal') && (!exists("g:vim_json_conceal") || g:vim_json_conceal==1)
syn region jsonString oneline matchgroup=jsonQuote start=/"/ skip=/\\\\\|\\"/ end=/"/ concealends contains=jsonEscape contained
else
syn region jsonString oneline matchgroup=jsonQuote start=/"/ skip=/\\\\\|\\"/ end=/"/ contains=jsonEscape contained