Loading syntax/json.vim currently loads ftplugin/json.vim, which sets conceallevel. This is IMHO bad practise. For instance, if you load nested syntax in Markdown, LaTeX or similar, it should not affect the current filetype settings.
I noticed this:
|
" Reload the definition of g:vim_json_syntax_conceal |
|
" see https://github.com/elzr/vim-json/issues/42 |
|
runtime! ftplugin/json.vim |
Thus, #42 concluded that runtime! ftplugin/json.vim is necessary, but I propose it is not. Instead, you should replace the use of the option g:vim_json_syntax_conceal with get(g:, 'vim_json_syntax_conceal', 1) (or 0, if that's the default). Or, use a plugin/json.vim to set default values for the options. Or an autoload function. Whatever, but don't load ftplugin/json.vim.
I notice that the repo seems relatively unmaintained, but I hope it might be possible to fix this regardless.
Loading
syntax/json.vimcurrently loadsftplugin/json.vim, which setsconceallevel. This is IMHO bad practise. For instance, if you load nested syntax in Markdown, LaTeX or similar, it should not affect the current filetype settings.I noticed this:
vim-json/syntax/json.vim
Lines 6 to 8 in 3727f08
Thus, #42 concluded that
runtime! ftplugin/json.vimis necessary, but I propose it is not. Instead, you should replace the use of the optiong:vim_json_syntax_concealwithget(g:, 'vim_json_syntax_conceal', 1)(or 0, if that's the default). Or, use aplugin/json.vimto set default values for the options. Or an autoload function. Whatever, but don't loadftplugin/json.vim.I notice that the repo seems relatively unmaintained, but I hope it might be possible to fix this regardless.