Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita76bcff

Browse files
committed
chore: Fixed broken files
1 parentcba2ff7 commita76bcff

File tree

4 files changed

+1780
-0
lines changed

4 files changed

+1780
-0
lines changed

‎lua/markview/config/html.lua‎

Lines changed: 214 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,214 @@
1+
return {
2+
enable=true,
3+
4+
container_elements= {
5+
enable=true,
6+
7+
["^a$"]= {
8+
on_opening_tag= {conceal="",virt_text_pos="inline",virt_text= { {"","MarkviewHyperlink"} } },
9+
on_node= {hl_group="MarkviewHyperlink"},
10+
on_closing_tag= {conceal=""},
11+
},
12+
["^b$"]= {
13+
on_opening_tag= {conceal=""},
14+
on_node= {hl_group="Bold"},
15+
on_closing_tag= {conceal=""},
16+
},
17+
["^code$"]= {
18+
on_opening_tag= {conceal="",hl_mode="combine",virt_text_pos="inline",virt_text= { {"","MarkviewInlineCode"} } },
19+
on_node= {hl_group="MarkviewInlineCode"},
20+
on_closing_tag= {conceal="",hl_mode="combine",virt_text_pos="inline",virt_text= { {"","MarkviewInlineCode"} } },
21+
},
22+
["^em$"]= {
23+
on_opening_tag= {conceal=""},
24+
on_node= {hl_group="@text.emphasis"},
25+
on_closing_tag= {conceal=""},
26+
},
27+
["^i$"]= {
28+
on_opening_tag= {conceal=""},
29+
on_node= {hl_group="Italic"},
30+
on_closing_tag= {conceal=""},
31+
},
32+
["^kbd$"]=function (_,item)
33+
localhl="MarkviewInlineCode";
34+
localoutput= {
35+
on_opening_tag= {conceal=""},
36+
on_node= {
37+
virt_text_pos="inline",
38+
right_gravity=true,
39+
hl_group=hl
40+
},
41+
on_closing_tag= {conceal="",hl_mode="combine",virt_text_pos="inline",virt_text= { {"",hl } } },
42+
};
43+
44+
ifnotitemthen
45+
returnoutput;
46+
end
47+
48+
---@typeinteger Start column of the node.
49+
localstart_col=item.range.col_start;
50+
51+
---@typeinteger[] Output of`TSNode:range()`on the opening tag.
52+
localopen_range=item.opening_tag.range;
53+
---@typeinteger[] Output of`TSNode:range()`on the closing tag.
54+
localclose_range=item.closing_tag.range;
55+
56+
---@typestring Normalized keymap.
57+
localkey=string.upper(
58+
string.sub(
59+
item.text[1],
60+
(open_range[4]+1)-start_col,
61+
close_range[2]-start_col
62+
)
63+
);
64+
65+
ifstring.match(key,"^%<C")orstring.match(key,"CTRL")then
66+
hl="MarkviewPalette3";
67+
68+
output.on_node.hl_group=hl;
69+
output.on_node.virt_text= { {"",hl } };
70+
output.on_closing_tag.virt_text= { {"",hl } };
71+
elseifstring.match(key,"^%<S")orstring.match(key,"SHIFT")then
72+
hl="MarkviewPalette4";
73+
74+
output.on_node.hl_group=hl;
75+
output.on_node.virt_text= { {" 󰘶",hl } };
76+
output.on_closing_tag.virt_text= { {"",hl } };
77+
elseif
78+
string.match(key,"^%<M")or
79+
string.match(key,"OPT")orstring.match(key,"OPTION")or
80+
string.match(key,"ALT")orstring.match(key,"META")
81+
then
82+
hl="MarkviewPalette2";
83+
84+
output.on_node.hl_group=hl;
85+
output.on_node.virt_text= { {" 󰘵",hl } };
86+
output.on_closing_tag.virt_text= { {"",hl } };
87+
elseifstring.match(key,"CMD")orstring.match(key,"COMMAND")then
88+
hl="MarkviewPalette5";
89+
90+
output.on_node.hl_group=hl;
91+
output.on_node.virt_text= { {" 󰘳",hl } };
92+
output.on_closing_tag.virt_text= { {"",hl } };
93+
elseifstring.match(key,"CAPS.LOCK")then
94+
hl="MarkviewPalette1";
95+
96+
output.on_node.hl_group=hl;
97+
output.on_node.virt_text= { {" 󰘲",hl } };
98+
output.on_closing_tag.virt_text= { {"",hl } };
99+
elseifstring.match(key,"SPACE")then
100+
hl="MarkviewPalette5";
101+
102+
output.on_node.hl_group=hl;
103+
output.on_node.virt_text= { {" 󱁐",hl } };
104+
output.on_closing_tag.virt_text= { {"",hl } };
105+
elseifstring.match(key,"ENTER")then
106+
hl="MarkviewPalette2";
107+
108+
output.on_node.hl_group=hl;
109+
output.on_node.virt_text= { {" 󰌑",hl } };
110+
output.on_closing_tag.virt_text= { {"",hl } };
111+
elseifstring.match(key,"TAB")then
112+
hl="MarkviewPalette3";
113+
114+
output.on_node.hl_group=hl;
115+
output.on_node.virt_text= { {" 󰌒",hl } };
116+
output.on_closing_tag.virt_text= { {"",hl } };
117+
else
118+
hl="MarkviewPalette6";
119+
120+
output.on_node.hl_group=hl;
121+
output.on_node.virt_text= { {" 󰌌",hl } };
122+
output.on_closing_tag.virt_text= { {"",hl } };
123+
end
124+
125+
returnoutput;
126+
end,
127+
["^mark$"]= {
128+
on_opening_tag= {conceal=""},
129+
on_node= {hl_group="MarkviewPalette1"},
130+
on_closing_tag= {conceal=""},
131+
},
132+
["^pre$"]= {
133+
on_opening_tag= {conceal=""},
134+
on_node= {hl_group="Special"},
135+
on_closing_tag= {conceal=""},
136+
},
137+
["^strong$"]= {
138+
on_opening_tag= {conceal=""},
139+
on_node= {hl_group="@text.strong"},
140+
on_closing_tag= {conceal=""},
141+
},
142+
["^sub$"]= {
143+
on_opening_tag= {conceal="",hl_mode="combine",virt_text_pos="inline",virt_text= { {"↓[","MarkviewSubscript"} } },
144+
on_node= {hl_group="MarkviewSubscript"},
145+
on_closing_tag= {conceal="",hl_mode="combine",virt_text_pos="inline",virt_text= { {"]","MarkviewSubscript"} } },
146+
},
147+
["^sup$"]= {
148+
on_opening_tag= {conceal="",hl_mode="combine",virt_text_pos="inline",virt_text= { {"↑[","MarkviewSuperscript"} } },
149+
on_node= {hl_group="MarkviewSuperscript"},
150+
on_closing_tag= {conceal="",hl_mode="combine",virt_text_pos="inline",virt_text= { {"]","MarkviewSuperscript"} } },
151+
},
152+
["^u$"]= {
153+
on_opening_tag= {conceal=""},
154+
on_node= {hl_group="Underlined"},
155+
on_closing_tag= {conceal=""},
156+
},
157+
},
158+
159+
headings= {
160+
enable=true,
161+
162+
heading_1= {
163+
hl_group="MarkviewPalette1Bg"
164+
},
165+
heading_2= {
166+
hl_group="MarkviewPalette2Bg"
167+
},
168+
heading_3= {
169+
hl_group="MarkviewPalette3Bg"
170+
},
171+
heading_4= {
172+
hl_group="MarkviewPalette4Bg"
173+
},
174+
heading_5= {
175+
hl_group="MarkviewPalette5Bg"
176+
},
177+
heading_6= {
178+
hl_group="MarkviewPalette6Bg"
179+
},
180+
},
181+
182+
void_elements= {
183+
enable=true,
184+
185+
["^hr$"]= {
186+
on_node= {
187+
conceal="",
188+
189+
virt_text_pos="inline",
190+
virt_text= {
191+
{"","MarkviewGradient2"},
192+
{"","MarkviewGradient3"},
193+
{"","MarkviewGradient4"},
194+
{"","MarkviewGradient5"},
195+
{"","MarkviewGradient9"},
196+
{"","MarkviewGradient5"},
197+
{"","MarkviewGradient4"},
198+
{"","MarkviewGradient3"},
199+
{"","MarkviewGradient2"},
200+
}
201+
}
202+
},
203+
["^br$"]= {
204+
on_node= {
205+
conceal="",
206+
207+
virt_text_pos="inline",
208+
virt_text= {
209+
{"󱞦","Comment"},
210+
}
211+
}
212+
},
213+
}
214+
};

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp