on master help sign in
Add Hoon syntax highlighting
fe398b5Matilde Park
config.toml+2
@@ -17,6 +17,8 @@ generate_rss = true
17# Whether to do syntax highlighting
17# Whether to do syntax highlighting
18# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola
18# Theme can be customised by setting the `highlight_theme` variable to a theme supported by Zola
19highlight_code = true
19highlight_code = true
20+extra_syntaxes = ["syntaxes"]
21+highlight_theme = "subway-moscow"
20
22
21# Whether to build a search index to be used later on by a JavaScript library
23# Whether to build a search index to be used later on by a JavaScript library
22build_search_index = true
24build_search_index = true
sass/_main.scss+1−6
@@ -339,12 +339,7 @@ pre {
339 margin: 0.5rem 0 0.5rem 0;
339 margin: 0.5rem 0 0.5rem 0;
340 padding: 1.25rem;
340 padding: 1.25rem;
341}
341}
342−pre, pre span {
342+
343− font-family: "Source Code Pro", monospace;
344− background-color: #f9f9f9 !important;
345− color: black !important;
346− overflow-x: scroll;
347−}
348.mono {
343.mono {
349 font-family: "Source Code Pro", monospace;
344 font-family: "Source Code Pro", monospace;
350}
345}
syntaxes/hoon.sublime-syntaxnew file+66
@@ -0,0 +1,66 @@
1+%YAML 1.2
2+---
3+# http://www.sublimetext.com/docs/3/syntax.html
4+name: hoon
5+file_extensions:
6+ - hoon
7+ - hook
8+scope: source.hoon
9+contexts:
10+ main:
11+ - match: "::"
12+ comment: comment
13+ push:
14+ - meta_scope: comment.line.hoon
15+ - match: \n
16+ pop: true
17+ - match: \s*"""
18+ comment: doqbloq
19+ push:
20+ - meta_scope: string.double.hoon
21+ - match: \s*"""
22+ pop: true
23+ - match: \s*'''
24+ comment: soqbloq
25+ push:
26+ - meta_scope: string.double.hoon
27+ - match: \s*'''
28+ pop: true
29+ - match: \"
30+ comment: tape
31+ push:
32+ - meta_scope: string.double.hoon
33+ - match: \"
34+ pop: true
35+ - match: '\\.|[^"]'
36+ - match: \'
37+ comment: cord
38+ push:
39+ - meta_scope: string.single.hoon
40+ - match: \'
41+ pop: true
42+ - match: '\\.|[^'']'
43+ - match: "[a-z]([a-z0-9-]*[a-z0-9])?/"
44+ comment: arm
45+ scope: constant.character.hoon
46+ - match: '\+[-+] (?=[a-z]([a-z0-9-]*[a-z0-9])?)'
47+ comment: arm
48+ push:
49+ - meta_content_scope: entity.name.function.hoon
50+ - match: "(?![a-z0-9-])"
51+ pop: true
52+ - match: "%[a-z]([a-z0-9-]*[a-z0-9])?"
53+ comment: cube
54+ scope: constant.character.hoon
55+ - match: "@[a-z]([a-z0-9-]*[a-z0-9])?"
56+ comment: odor
57+ scope: storage.type.hoon
58+ - match: '[+\-|$%:.#^~;=?!_,&@\/<>%*]'
59+ comment: rune
60+ scope: keyword.control.hoon
61+ - match: ;script(type "text/coffeescript")
62+ comment: rune
63+ push:
64+ - meta_scope: keyword.control.hoon
65+ - match: "=="
66+ pop: true