mirror of https://github.com/MidnightCommander/mc
Ticket #4250: mcedit: add syntax highlighting for .json files.
Signed-off-by: Andrew Borodin <aborodin@vmail.ru>
This commit is contained in:
parent
167f437b14
commit
4be98a52ba
|
@ -44,6 +44,7 @@ SYNTAXFILES = \
|
|||
jal.syntax \
|
||||
java.syntax \
|
||||
js.syntax \
|
||||
json.syntax \
|
||||
kotlin.syntax \
|
||||
latex.syntax \
|
||||
lisp.syntax \
|
||||
|
|
|
@ -136,6 +136,9 @@ include cs.syntax
|
|||
file ..\*\\.(?i:m?js)$ JavaScript\sProgram ^#!.\*[\s/](node|nodejs)\\b
|
||||
include js.syntax
|
||||
|
||||
file ..\*\\.(?i:json)$ JSON\sFile
|
||||
include json.syntax
|
||||
|
||||
file ..\*\\.(?i:ts)$ TypeScript\sProgram
|
||||
include ts.syntax
|
||||
|
||||
|
|
|
@ -0,0 +1,39 @@
|
|||
#
|
||||
# JSON syntax highlighting
|
||||
# for MC Editor/CoolEdit
|
||||
#
|
||||
# Author: Sergii Pylypenko <x.pelya.x@gmail.com>
|
||||
#
|
||||
|
||||
context default
|
||||
|
||||
#=========================
|
||||
# Constants
|
||||
keyword whole true brightgreen
|
||||
keyword whole false brightgreen
|
||||
keyword whole null brightgreen
|
||||
|
||||
#=========================
|
||||
# Numbers
|
||||
keyword whole \[-\]\{0123456789\}\[0123456789\] brightgreen
|
||||
keyword whole \[-\]\{0123456789\}\[0123456789\]\.\{0123456789\}\[0123456789\] brightgreen
|
||||
keyword whole \[-\]\{0123456789\}\[0123456789\]\{eE\}\{0123456789\}\[0123456789\] brightgreen
|
||||
keyword whole \[-\]\{0123456789\}\[0123456789\]\{eE\}\{\-\+\}\{0123456789\}\[0123456789\] brightgreen
|
||||
keyword whole \[-\]\{0123456789\}\[0123456789\]\.\{0123456789\}\[0123456789\]\{eE\}\{0123456789\}\[0123456789\] brightgreen
|
||||
keyword whole \[-\]\{0123456789\}\[0123456789\]\.\{0123456789\}\[0123456789\]\{eE\}\{\-\+\}\{0123456789\}\[0123456789\] brightgreen
|
||||
|
||||
#=========================
|
||||
# Separators
|
||||
keyword { brightcyan
|
||||
keyword } brightcyan
|
||||
keyword [ brightcyan
|
||||
keyword ] brightcyan
|
||||
keyword , brightcyan
|
||||
keyword : brightcyan
|
||||
|
||||
#=============================
|
||||
# Strings
|
||||
context " " green
|
||||
spellcheck
|
||||
keyword \\\{"\\/bfnrt\} brightgreen
|
||||
keyword \\u\{0123456789ABCDEFabcdef\}\{0123456789ABCDEFabcdef\}\{0123456789ABCDEFabcdef\}\{0123456789ABCDEFabcdef\} brightgreen
|
Loading…
Reference in New Issue