Riley Bruins
7f31793159
feat(markdown): yaml, toml metadata highlights ( #6360 )
2024-03-26 17:19:51 +02:00
Riley Bruins
a0f18ee98c
feat(markdown): highlight link label delimiter
2024-03-07 12:50:12 +02:00
Christian Clason
99ddf57353
feat(highlights)!: enforce documented captures ( #6232 )
...
Problem: Allowing undocumented "secret" (sub)captures makes it harder
to write comprehensive colorschemes and catch inconsistent captures.
Solution: Only allow captures listed in CONTRIBUTING.md. Add useful
(cross-language) subcaptures and drop language-specific or too niche
ones.
Follow-up: Adding further `*.builtin` captures and changing queries to
use them.
Language-specific subcaptures should instead be added in user config or
a custom language plugin.
2024-03-03 11:00:11 +01:00
dundargoc
9bc21966f2
fix: typos
2024-02-19 17:45:54 +01:00
Christian Clason
a8fa3047b5
fix(highlights): use markup.raw.delimiter for fences
2024-01-20 13:04:29 +01:00
Riley Bruins
f5a839d1e8
fix(markdown): remove @none from code fences
2024-01-20 10:24:57 +01:00
Pham Huy Hoang
57a8acf0c4
chore: query formatting
2024-01-19 16:58:37 +01:00
Christian Clason
1ae9b0e455
feat!: align standard captures with upstream
...
Problem: Sharing highlight queries with upstream tree-sitter and
Helix is difficult.
Solution: Where reasonable, use capture names in tree-sitter's standard
list or Helix's Atom-style hierarchy.
Specifically:
* tree-sitter "standard capture names"
(3f44b89685/highlight/src/lib.rs (L20-L72) ):
- `@parameter` -> `@variable.parameter`
- `@field` -> `@variable.member`
- `@namespace` -> `@module`
- `@float` -> `@number.float`
- `@symbol` -> `@string.special.symbol`
- `@string.regex` -> `@string.regexp`
- `@text.*` -> `@markup.*` (`strong`, `italic`, `link`, `strikethrough`; with exceptions; see below)
- `@text.title` -> `@markup.heading`
- `@text.literal` -> `@markup.raw`
- `@text.reference` -> `@markup.link`
- `@text.uri` -> `@markup.link.url` (in markup links)
- `@string.special` -> `@markup.link.label` (non-url links)
- `@punctuation.special` -> `@markup.list` (markdown lists only; move subitems from `@text.todo`)
* Helix captures
(https://docs.helix-editor.com/master/themes.html#syntax-highlighting ):
- `@method` -> `@function.method`
- `@method.call` -> `@function.method.call`
- `@text.{todo,warning,note,danger}` -> `@comment.{error,warning,hint,info,todo}`
- `@text.diff.{add,delete,}` -> `@diff.{plus,minus,delta}`
- `@text.uri` -> `@string.special.url` (outside markup)
- `@preproc` -> `@keyword.directive`
- `@define` -> `@keyword.directive`(`.define`?)
- `@storageclass` -> `@keyword.storage`
- `@conditional` -> `@keyword.conditional`
- `@debug` -> `@keyword.debug`
- `@exception` -> `@keyword.exception`
- `@include` -> `@keyword.import`
- `@repeat` -> `@keyword.repeat`
* cleanup
- remove some redundant `@conceal` (but still allow it for conceal-only patterns)
- remove obsolete `@error` (syntax linting is out of scope for this repo)
- sort, cleanup capture list in `CONTRIBUTING.md`
2024-01-19 16:58:37 +01:00
Riley Bruins
e9acd01a4a
fix(markdown): revert bullet conceals due to spacing issues ( #5742 )
2023-11-30 09:36:07 +09:00
Riley Bruins
f2de95e30a
feat(markdown): conceals for bullets, block quotes
...
* feat(markdown): conceals for bullets, block quotes
* fix: remove conceals for block quotes, change list minus to em dash
* fix(markdown): allow empty bullets to be concealed
2023-11-19 10:20:51 +09:00
Riley Bruins
28e1361d4a
fix(markdown): set block quote priority within allowed range
2023-10-15 14:34:08 -04:00
Riley Bruins
ea5f5fddad
fix(markdown): give code blocks higher priority than block quotes
2023-10-15 14:34:08 -04:00
Maria José Solano
eb0f975bf2
feat(markdown): conceal triple backticks and HTML entities
2023-09-17 23:16:53 +02:00
Christian Clason
a034c7aa25
fix(highlights): lower priority for codeblocks with injections ( #4905 )
2023-06-05 14:09:44 +02:00
Christian Clason
680807fa6a
highlights(markup): distinguish heading level in queries
...
also add a few queries from Helix and remove controversial
code block conceal in Markdown
2023-05-13 16:50:32 +02:00
Christian Clason
7e4a7c4508
markdown: add strikethrough and blockquote captures
2023-01-14 11:52:25 +01:00
Folke Lemaitre
39bda37d4a
feat: added highlights for markdown checkboxes
2022-12-02 18:02:16 +01:00
Folke Lemaitre
a2ff4b42e1
feat: conceal backslash escape
2022-10-30 11:38:42 +01:00
Folke Lemaitre
9ada5f70f9
feat: markdown table highlights and inline
2022-10-29 15:31:35 +02:00
Lewis Russell
2a63ea5665
feat(spell): upstream spell queries from spellsitter
2022-09-06 12:44:19 +01:00
Matthias Deiml
002084b1be
feat(markdown)!: switch to split parser ( #3048 )
...
* switch to split markdown parser with separate block and inline parsers to improve performance
* add exclude_children! directive (useful for something like Injected markdown incorrectly highlights indented docstrings #2212 )
* split markdown queries into block and inline ones and add the injection for inline into block grammar
* add include_dir option to parser configs (needed because the two grammars don't live in the repos root directory)
BREAKING CHANGE: downstream queries need to be adapted to new parser
2022-06-26 18:02:29 +02:00
Jonathan Lopez
238532fe82
Simplify inline conceal
2022-06-22 13:56:11 +02:00
Jonathan Lopez
536f4294f6
Refactor markdown conceal code
2022-06-22 13:56:11 +02:00
Jonathan Lopez
778bfc337a
Conceal markdown links
2022-06-22 13:56:11 +02:00
Stephan Seitz
436d2ebe24
highlights(markdown): fix conceal capture
2022-04-15 18:47:53 +02:00
Stephan Seitz
f0398b7329
highlights(markdown): conceal link markers
2022-04-15 18:42:53 +02:00
Stephan Seitz
2bedaeb732
highlights(markdown): conceal emphasis_delimiter
2022-04-15 18:42:53 +02:00
Stephan Seitz
ade64b4459
highlights(markdown): add conceal to fenced code blocks
2022-04-15 18:42:53 +02:00
Gustaf Lindstedt
01150f50e7
Highlight markdown uri_autolink as @text.uri
2022-03-14 21:34:15 +01:00
MDeiml
9fff379c17
Add highlight for markdown delimiters
2022-01-11 12:05:56 +01:00
MDeiml
b5cdb868c7
Fix slow startup times for markdown grammar
2022-01-10 20:32:27 +01:00
MDeiml
391f29c03a
Add highlight for quote marker
2022-01-08 20:00:28 +01:00
numToStr
ab691444ce
highlights(markdown): image_description as reference
2022-01-07 11:14:29 +01:00
numToStr
2a49c05f66
highlights(markdown): image ! as delimeter
2022-01-07 11:14:29 +01:00
numToStr
5b69f82e15
highlights(markdown): link_title as string literal
2022-01-07 11:14:29 +01:00
numToStr
b84a09292e
highlights(markdown): image ( ) [ ] as delemiter
2022-01-07 11:14:29 +01:00
Alvaro Muñoz Sanchez
142c017ecb
improve markdown highlighting
2022-01-06 20:38:54 +01:00
Santos Gallegos
6c5f4b1b49
Markdown: update queries
2021-12-21 01:07:22 +01:00
Michael Chris Lopez
c9db432435
highlights(markdown): separate highlight for header marker and underline ( #2129 )
2021-12-19 19:38:42 -05:00
Michael Chris Lopez
296c28be53
highlights(markdown): highlight link_text as @text.reference
2021-12-17 10:36:58 +01:00
Stephan Seitz
387a8f38bd
parsers: Add MDeiml/tree-sitter-markdown as markdown parser
...
Fixes #872
2021-12-14 15:00:14 +01:00
jghauser
b0e1520f47
Add inline html comments
2021-02-25 13:42:25 +01:00
Thomas Vigouroux
f7d92f663c
feat(languagetree): implement language tree
...
Allow the LanguageTree to be used as an option for highlighting.
Co-authored-by: Santos Gallegos <stsewd@protonmail.com>
Co-authored-by: Yazdani Kiyan <yazdani.kiyan@protonmail.com>
2020-10-19 18:28:45 +02:00