Commit Graph

17 Commits (daef7fadab4ef03bff91c5c631839177d3f327b2)

Author SHA1 Message Date
Timothy DeHerrera 9c6c63a2be
inject language based on file extension & shebang (#3970)
* inject language based on file extension

Nodes can now be captured with "injection.filename". If this capture
contains a valid file extension known to Helix, then the content will
be highlighted as that language.

* inject language by shebang

Nodes can now be captured with "injection.shebang". If this capture
contains a valid shebang line known to Helix, then the content will
be highlighted as the language the shebang calls for.

* add documentation for language injection

* nix: fix highlights

The `@` is now highlighted properly on either side of the function arg.

Also, extending the phases with `buildPhase = prev.buildPhase + ''''`
is now highlighted properly.

Fix highlighting of `''$` style escapes (requires tree-sitter-nix bump)

Fix `inherit` highlighting.

* simplify injection_for_match

Split out injection pair logic into its own method to make the overall
flow easier to follow.

Also transform the top-level function into a method on a
HighlightConfiguration.

* markdown: add shebang injection query
2 years ago
Erasin Wang 851ac6cdd3
Add theme keys for (un)checked markup list items (#6434) 2 years ago
Matthias Deiml 0cbb61c3a4
Improve markdown highlights and add latex injection (#6100) 2 years ago
Michael Davis 7905086b55
Fix HTML injection within markdown (#5265)
HTML nodes should be combined injections in the markdown block
grammar. When nodes are together the highlighting works properly but
when there is markdown content between HTML nodes like in a `<details>`
tag, the highlighting of the closing tag breaks since tree-sitter-html
looks for opening and closing tags.
2 years ago
David 18f6ec7a8e
Update treesitter markdown (#4078)
* Update treesitter markdown

* Update inline and add table injections
2 years ago
Erasin 1eeca10675
Fix Markdown Metadata (#3400) 2 years ago
Matthias Deiml ea04220874
Use split_parser branch for markdown grammar (#3108) 2 years ago
Michael Davis c5600c9c01 markdown: limit raw block highlight to code fence content 2 years ago
Michael Davis ca82cd86e6 markdown: highlight punctuation 2 years ago
Michael Davis 42d780b103
add tree-sitter-edoc (#2640)
* add tree-sitter-edoc

* fix escape character capture in markdown queries

* add field negation operator "!" to tsq highlights
2 years ago
ChrHorn b38c268097
fix Markdown list highlighting (#2401) 3 years ago
Alex d5ba0b5162
Allow separate styles for markup headings (#1618)
* update markdown highlighting to use separate heading themes

* remove markdown theme scopes in ui
3 years ago
Michael Davis b799b0d50e
capture markdown link text as markup.link.text (#1456) 3 years ago
Flakebi 0dab6c8c17 Fix markdown code-block highlighting
Markdown code blocks should be highlighted as a single block, so set
injection.include-children.
3 years ago
Gokul Soumya 7c01d92653 Add link and quote queries for markdown
- Rename markup.underline.link to markup.link.url
- Add markup.link.label
- Add markup.quote

(The constructor theme scope was missing from the
docs, so unrelated to this commit).
3 years ago
Blaž Hrastnik ac4b72fcc8 Add injections query for markdown 3 years ago
Blaž Hrastnik 49e0678741 Add markdown grammar
Fixes #215
3 years ago