Skip to content

Commit

Permalink
feat: conceal ~ in column heading #55
Browse files Browse the repository at this point in the history
  • Loading branch information
Christian Clason committed Oct 27, 2022
1 parent df0d90a commit 8df3266
Show file tree
Hide file tree
Showing 4 changed files with 3,926 additions and 4,784 deletions.
3 changes: 2 additions & 1 deletion grammar.js
Original file line number Diff line number Diff line change
Expand Up @@ -164,7 +164,8 @@ module.exports = grammar({
// TODO: children should be $.word (plaintext), not $.atom.
column_heading: ($) => seq(
field('name', seq(choice($._atom_noli, $._uppercase_words), repeat($._atom))),
/~\n/,
'~',
token.immediate('\n'),
),

h1: ($) =>
Expand Down
2 changes: 2 additions & 0 deletions queries/help/highlights.scm
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@
(h2) @text.title
(h3) @text.title
(column_heading) @text.title
(column_heading
"~" @conceal (#set! conceal ""))
(tag
"*" @conceal (#set! conceal "")
text: (_) @label)
Expand Down
11 changes: 9 additions & 2 deletions src/grammar.json
Original file line number Diff line number Diff line change
Expand Up @@ -682,8 +682,15 @@
}
},
{
"type": "PATTERN",
"value": "~\\n"
"type": "STRING",
"value": "~"
},
{
"type": "IMMEDIATE_TOKEN",
"content": {
"type": "STRING",
"value": "\n"
}
}
]
},
Expand Down
Loading

0 comments on commit 8df3266

Please sign in to comment.