1
0
lite-xl-ignore-syntax/language_ignore.lua

25 lines
628 B
Lua
Raw Normal View History

2022-06-24 16:15:40 +00:00
-- mod-version:2
-- Anthony Axenov (c) 2022, The MIT License
2022-06-25 03:35:15 +00:00
-- https://github.com/anthonyaxenov/lite-xl-ignore-syntax/
2022-06-24 16:15:40 +00:00
local syntax = require "core.syntax"
local style = require "core.style"
local common = require "core.common"
style.syntax["ignore"] = { common.color "#72B886" }
style.syntax["exclude"] = { common.color "#F36161" }
syntax.add {
name = ".ignore file",
files = { "%..*ignore$" },
comment = "#",
patterns = {
{ regex = "^ *#.*$", type = "comment" },
{ regex = { "(?=^ *!.)", "$" }, type = "ignore" },
{ regex = { "(?=.)", "$" }, type = "exclude" },
},
symbols = {}
}