-
Notifications
You must be signed in to change notification settings - Fork 148
/
xml.lua
57 lines (51 loc) · 1.35 KB
/
xml.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
-- Copyright 2014 Paul Kulchenko, ZeroBrane LLC; All rights reserved
local spec = {
exts = {"xml"},
lexer = wxstc.wxSTC_LEX_XML,
apitype = "xml",
stylingbits = 7,
lexerstyleconvert = {
text = {wxstc.wxSTC_H_DEFAULT,},
comment = {wxstc.wxSTC_H_COMMENT,},
stringeol = {wxstc.wxSTC_HJ_STRINGEOL,},
number = {wxstc.wxSTC_H_NUMBER,},
stringtxt = {
wxstc.wxSTC_H_DOUBLESTRING,
wxstc.wxSTC_H_SINGLESTRING,
},
lexerdef= {
wxstc.wxSTC_H_OTHER,
wxstc.wxSTC_H_ENTITY,
wxstc.wxSTC_H_VALUE,
},
keywords0 = {
wxstc.wxSTC_H_TAG,
wxstc.wxSTC_H_ATTRIBUTE,
},
keywords1 = {wxstc.wxSTC_H_TAGUNKNOWN,
wxstc.wxSTC_H_ATTRIBUTEUNKNOWN,
},
keywords2 = {wxstc.wxSTC_H_SCRIPT,},
keywords3 = {wxstc.wxSTC_LUA_WORD,},
keywords4 = {wxstc.wxSTC_LUA_WORD1,},
keywords5 = {wxstc.wxSTC_LUA_WORD2,},
preprocessor= {wxstc.wxSTC_LUA_PREPROCESSOR,},
},
keywords = {
},
}
return {
name = "XML syntax highlighting",
description = "Adds XML syntax highlighting.",
author = "Paul Kulchenko",
version = 0.21,
onRegister = function(self)
local keywords = self:GetConfig().keywords or ''
spec.keywords[1] = keywords
ide:AddSpec("xml", spec)
end,
onUnRegister = function(self) ide:RemoveSpec("xml") end,
}
--[[ configuration example:
xml = {keywords = "foo bar"}
--]]