tangled
alpha
login
or
join now
boltless.me
/
nvim_rocks
0
fork
atom
neovim configuration using rocks.nvim plugin manager
0
fork
atom
overview
issues
pulls
pipelines
feat(norg): hard copy norg queries
Seongmin Lee
10 months ago
a5ebd8ab
1cfc022e
+146
3 changed files
expand all
collapse all
unified
split
after
queries
norg
folds.scm
highlights.scm
injections.scm
+8
after/queries/norg/folds.scm
···
1
1
+
(ranged_tag
2
2
+
name: (_) @_name
3
3
+
(#eq? @_name "document.meta")) @fold
4
4
+
5
5
+
(section) @fold
6
6
+
7
7
+
(unordered_list_item) @fold
8
8
+
(ordered_list_item) @fold
+124
after/queries/norg/highlights.scm
···
1
1
+
(empty_heading) @markup.heading.marker
2
2
+
(document
3
3
+
(section
4
4
+
(heading
5
5
+
(heading_prefix) @markup.heading.1.marker
6
6
+
title: (_) @markup.heading.1)))
7
7
+
(document
8
8
+
(section
9
9
+
(section
10
10
+
(heading
11
11
+
(heading_prefix) @markup.heading.2.marker
12
12
+
title: (_) @markup.heading.2))))
13
13
+
(document
14
14
+
(section
15
15
+
(section
16
16
+
(section
17
17
+
(heading
18
18
+
(heading_prefix) @markup.heading.3.marker
19
19
+
title: (_) @markup.heading.3)))))
20
20
+
(document
21
21
+
(section
22
22
+
(section
23
23
+
(section
24
24
+
(section
25
25
+
(heading
26
26
+
(heading_prefix) @markup.heading.4.marker
27
27
+
title: (_) @markup.heading.4))))))
28
28
+
(document
29
29
+
(section
30
30
+
(section
31
31
+
(section
32
32
+
(section
33
33
+
(section
34
34
+
(heading
35
35
+
(heading_prefix) @markup.heading.5.marker
36
36
+
title: (_) @markup.heading.5)))))))
37
37
+
(section
38
38
+
(section
39
39
+
(section
40
40
+
(section
41
41
+
(section
42
42
+
(section
43
43
+
(heading
44
44
+
(heading_prefix) @markup.heading.6.marker
45
45
+
title: (_) @markup.heading.6)))))))
46
46
+
47
47
+
(unordered_list_prefix) @markup.list
48
48
+
(ordered_list_prefix) @markup.list
49
49
+
(quote) @markup.quote
50
50
+
((null_list_prefix) @conceal
51
51
+
(#set! conceal ""))
52
52
+
53
53
+
(bold) @markup.strong
54
54
+
(italic) @markup.italic
55
55
+
(underline) @markup.underline
56
56
+
(strikethrough) @markup.strikethrough
57
57
+
(verbatim) @markup.raw.verbatim @nospell
58
58
+
(inline_macro) @function.macro
59
59
+
60
60
+
( [
61
61
+
(bold [(bold_open) (bold_close)] @conceal)
62
62
+
(italic [(italic_open) (italic_close)] @conceal)
63
63
+
(underline [(underline_open) (underline_close)] @conceal)
64
64
+
(strikethrough [(strikethrough_open) (strikethrough_close)] @conceal)
65
65
+
(verbatim [(verbatim_open) (verbatim_close)] @conceal)
66
66
+
]
67
67
+
(#set! conceal ""))
68
68
+
69
69
+
(link
70
70
+
[
71
71
+
"["
72
72
+
"]"
73
73
+
"{"
74
74
+
"}"
75
75
+
] @conceal
76
76
+
(#set! conceal ""))
77
77
+
;; only conceal target when markup exists for that link
78
78
+
(link
79
79
+
target: (_) @conceal
80
80
+
markup: (_) @markup.link
81
81
+
(#set! conceal ""))
82
82
+
(link
83
83
+
target: (_) @markup.link
84
84
+
!markup)
85
85
+
(anchor
86
86
+
[
87
87
+
"["
88
88
+
"]"
89
89
+
"{"
90
90
+
target: (_)
91
91
+
"}"
92
92
+
] @conceal
93
93
+
(#set! conceal ""))
94
94
+
(anchor
95
95
+
markup: (_) @markup.link)
96
96
+
97
97
+
(escape_sequence) @string.escape
98
98
+
(hard_break) @string.escape
99
99
+
100
100
+
((escape_sequence) @conceal
101
101
+
(#offset! @conceal 0 0 0 -1)
102
102
+
(#set! conceal ""))
103
103
+
104
104
+
((hard_break) @conceal
105
105
+
(#set! conceal ""))
106
106
+
107
107
+
(ranged_tag
108
108
+
[
109
109
+
(ranged_open)
110
110
+
name: (_)
111
111
+
(ranged_close)
112
112
+
] @function.macro)
113
113
+
(ranged_tag
114
114
+
line: (_) @markup.raw.block @nospell
115
115
+
(#set! "priority" 90))
116
116
+
(infirm_tag
117
117
+
[
118
118
+
(infirm_tag_prefix)
119
119
+
name: (_)
120
120
+
] @function.macro)
121
121
+
122
122
+
(ERROR) @error
123
123
+
124
124
+
; vim:ts=2:sw=2:
+14
after/queries/norg/injections.scm
···
1
1
+
(ranged_tag
2
2
+
name: (_) @_keyword
3
3
+
(#any-of? @_keyword "code" "embed")
4
4
+
;; TODO: only accept first argument as @_lang
5
5
+
param: (_) @injection.language
6
6
+
line: (_) @injection.content
7
7
+
(#set! injection.combined))
8
8
+
9
9
+
(ranged_tag
10
10
+
name: (_) @_keyword
11
11
+
(#eq? @_keyword "eval")
12
12
+
line: (_) @injection.content
13
13
+
(#set! injection.language "janet")
14
14
+
(#set! injection.combined))