Skip to content

Commit

Permalink
Fix JSON syntax coloring for number, boolean, null
Browse files Browse the repository at this point in the history
See the following comment for why this way broken:

    elzr/vim-json#37 (comment)
  • Loading branch information
fschauen committed Mar 4, 2020
1 parent 1febfc9 commit 409b519
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions dotfiles/.config/vim/vimrc
Original file line number Diff line number Diff line change
Expand Up @@ -82,6 +82,12 @@ let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc"
Plug 'altercation/vim-colors-solarized'
Plug 'bronson/vim-trailing-whitespace'
Plug 'elzr/vim-json'
" Make numbers and booleans stand out, important because of the
" concealment used by vim-json.
highlight link jsonBraces Text
highlight link jsonNumber Identifier
highlight link jsonBoolean Identifier
highlight link jsonNull Identifier
Plug 'godlygeek/tabular' | Plug 'plasticboy/vim-markdown'
let g:vim_markdown_conceal_code_blocks = 0
Plug 'junegunn/rainbow_parentheses.vim'
Expand Down Expand Up @@ -133,13 +139,6 @@ let $MYVIMRC="$XDG_CONFIG_HOME/vim/vimrc"
colorscheme solarized
filetype plugin indent on
syntax enable

" Make numbers and booleans stand out, important because of the concealment
" used by vim-json. IMPORTANT: these commands need to come after enabling
" syntax highlighting.
" More info: https://github.com/elzr/vim-json/issues/37#issuecomment-500044818
highlight Number ctermfg=4 " blue in solarized (see .bashrc)
highlight Boolean ctermfg=5 " magenta in solarized (see .bashrc)
" }}}

" Functions {{{
Expand Down

0 comments on commit 409b519

Please sign in to comment.