Initial commit
This commit is contained in:
commit
209ba130c0
4852 changed files with 1517959 additions and 0 deletions
34
.config/lite-xl/plugins/language_json.lua
Normal file
34
.config/lite-xl/plugins/language_json.lua
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
-- mod-version:3 priority:110
|
||||
|
||||
local syntax = require "core.syntax"
|
||||
|
||||
syntax.add {
|
||||
name = "JSON",
|
||||
|
||||
files = {
|
||||
"%.json$",
|
||||
"%.cjson$",
|
||||
"%.jsonc$",
|
||||
"%.ipynb$",
|
||||
},
|
||||
|
||||
comment = "//",
|
||||
block_comment = {"/*", "*/"},
|
||||
patterns = {
|
||||
|
||||
-- cjson support
|
||||
{ pattern = "//.*", type = "comment" },
|
||||
{ pattern = { "/%*", "%*/" }, type = "comment" },
|
||||
|
||||
{ regex = [["(?:[^"\\]|\\.)*"()\s*:]], type = { "keyword", "normal" } }, -- key
|
||||
{ regex = [["(?:[^"\\]|\\.)*"]], type = "string" }, -- value
|
||||
{ pattern = "0x[%da-fA-F]+", type = "number" },
|
||||
{ pattern = "-?%d+[%d%.eE]*", type = "number" },
|
||||
{ pattern = "-?%.?%d+", type = "number" },
|
||||
{ pattern = "null", type = "literal" },
|
||||
{ pattern = "true", type = "literal" },
|
||||
{ pattern = "false", type = "literal" }
|
||||
},
|
||||
symbols = { }
|
||||
}
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue