Revert to default json syntax
This commit is contained in:
parent
bef689ae13
commit
dcea5ede4a
1
after/syntax/json.vim
Normal file
1
after/syntax/json.vim
Normal file
@ -0,0 +1 @@
|
||||
hi link jsonKeyword Function
|
@ -1,39 +0,0 @@
|
||||
if !exists("main_syntax")
|
||||
if exists("b:current_syntax")
|
||||
finish
|
||||
endif
|
||||
let main_syntax = 'json'
|
||||
endif
|
||||
|
||||
syn cluster jsonValue contains=jsonString,jsonNumber,jsonObject,jsonArray,jsonBoolean,jsonNull
|
||||
|
||||
syn region jsonString oneline matchgroup=jsonStringEnd start=+"+ skip=+\\"+ end=+"+ concealends contains=jsonCharacter contained
|
||||
syn match jsonNumber '-\?\d\+\(\.\d\+\([eE][-+]\?\d\+\)\?\)\?' contained
|
||||
syn region jsonObject fold matchgroup=jsonObjectEnd start='{' end='}' transparent contains=jsonName,jsonColon,jsonComma,@jsonValue
|
||||
syn region jsonArray fold matchgroup=jsonArrayEnd start='\[' end='\]' transparent contains=jsonComma,@jsonValue
|
||||
syn keyword jsonBoolean true false
|
||||
syn keyword jsonNull null
|
||||
|
||||
syn match jsonCharacter +\\\(["\\\/bfnrt]\|u\x\x\x\x\)+ contained
|
||||
syn region jsonName oneline matchgroup=jsonNameEnd start=+"+ skip=+\\"+ end=+"\ze:+ concealends contains=jsonCharacter contained
|
||||
syn match jsonColon ':' contained
|
||||
syn match jsonComma ',' contained
|
||||
|
||||
hi default link jsonString String
|
||||
hi default link jsonStringEnd Conceal
|
||||
hi default link jsonNumber Number
|
||||
hi default link jsonObjectEnd Delimiter
|
||||
hi default link jsonArrayEnd Delimiter
|
||||
hi default link jsonBoolean Boolean
|
||||
hi default link jsonNull Constant
|
||||
|
||||
hi default link jsonCharacter SpecialChar
|
||||
hi default link jsonName Function
|
||||
hi default link jsonNameEnd Conceal
|
||||
hi default link jsonColon Delimiter
|
||||
hi default link jsonComma Delimiter
|
||||
|
||||
let b:current_syntax = 'json'
|
||||
if main_syntax == 'json'
|
||||
unlet main_syntax
|
||||
endif
|
Loading…
x
Reference in New Issue
Block a user