Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: don't set conceallevel from syntax plugin #108

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 2 additions & 6 deletions syntax/json.vim
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
" Maintainer: Eli Parra <[email protected]> https://github.com/elzr/vim-json
" Last Change: 2014-12-20 Load ftplugin/json.vim

" Reload the definition of g:vim_json_syntax_conceal
" see https://github.com/elzr/vim-json/issues/42
runtime! ftplugin/json.vim

if !exists("main_syntax")
if version < 600
syntax clear
Expand All @@ -23,7 +19,7 @@ syntax match jsonNoise /\%(:\|,\)/
" Syntax: Strings
" Separated into a match and region because a region by itself is always greedy
syn match jsonStringMatch /"\([^"]\|\\\"\)\+"\ze[[:blank:]\r\n]*[,}\]]/ contains=jsonString
if has('conceal') && g:vim_json_syntax_conceal == 1
if has('conceal') && (!exists('g:vim_json_syntax_conceal') || g:vim_json_syntax_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
Expand All @@ -35,7 +31,7 @@ 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') && g:vim_json_syntax_conceal == 1
if has('conceal') && (!exists('g:vim_json_syntax_conceal') || g:vim_json_syntax_conceal == 1)
syn region jsonKeyword matchgroup=jsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ concealends contains=jsonEscape contained
else
syn region jsonKeyword matchgroup=jsonQuote start=/"/ end=/"\ze[[:blank:]\r\n]*\:/ contains=jsonEscape contained
Expand Down