aboutsummaryrefslogtreecommitdiffstats
path: root/queries/markdown_inline
Commit message (Collapse)AuthorAgeFilesLines
* fix(markdown): don't set link metadata twiceRiley Bruins2024-09-281-3/+0
| | | | | Otherwise the same link will be opened twice when the cursor is on the link text itself.
* fix(markdown): broader link recognitionRiley Bruins2024-09-201-6/+4
| | | | | | | | **Problem:** Neovim's `gx` will not work when the cursor is on the first `[` of an inline Markdown link. **Solution:** Set the `url` metadata property on the link parent node, rather than just the link label node
* feat(markdown): set url attribute on image linksGregory Anders2024-08-301-0/+5
|
* refactor(queries): Remove quotes from properties in set! directiveOmar Valdez2024-07-281-3/+3
|
* feat(markdown): set url attribute on plain URLsGregory Anders2024-07-241-0/+7
| | | | | | | | | Setting the url attribute on actual URLs will cause Nvim to use the OSC 8 sequence on the entire URL, which enables terminal emulators to detect the URL even when it is wrapped. The (uri_autolink) node must use an #offset! directive to strip the surrounding <> characters from the URL.
* fix(markdown): conceal nbsp entity as space (#6778)Jannik Buhr2024-06-171-1/+1
|
* feat(markdown_inline): No spell for emails and HTML entitiesOmar Valdez2024-06-101-0/+3
|
* fix(markdown): align link with image highlightsRiley Bruins2024-05-041-10/+10
|
* fix(vimdoc): adapt to breaking Neovim changeChristian Clason2024-03-141-0/+5
| | | | | | | | | | Problem: https://github.com/neovim/neovim/commit/cb46f6e467268edf917cc3617b4c024a66b256de#diff-edf997b0c2d42d31828800641ac1f5a46487fe24a0d46ccf70bcd58a14f3868f introduced a regression on how `#set!` behaves with several matches in a single pattern, breaking conceals in, e.g., taglinks. Solution: Separate taglink etc. patterns into concealed marker and contents. Also add URL support for concealed markdown links.
* feat(highlights)!: enforce documented captures (#6232)Christian Clason2024-03-031-4/+4
| | | | | | | | | | | | | | | 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.
* fix(highlights): use `markup.raw.delimiter` for fencesChristian Clason2024-01-201-2/+2
|
* fix(markdown_inline): prioritize link URI (#5935)Riley Bruins2024-01-201-12/+12
|
* chore: query formattingPham Huy Hoang2024-01-192-13/+32
|
* feat!: align standard captures with upstreamChristian Clason2024-01-191-35/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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" (https://github.com/tree-sitter/tree-sitter/blob/3f44b896852eb7daaa6df4fb778c9bb52c70c815/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`
* fix(markdown_inline): latex highlight injection (#5397)Zhuofeng Wang2024-01-051-1/+2
| | | | The `injection.include-children` is needed in markdown_inline parser.
* feat(markdown): conceal triple backticks and HTML entitiesMaria José Solano2023-09-171-0/+8
|
* refactor: remove `include-children` from queries (#5226)Pham Huy Hoang2023-09-121-4/+2
| | | These `include-children` were to alleviate an issue with empty range language tree, which has been fixed for Neovim nightly/Neovim 0.9.2
* chore(injections)!: update injection syntax to 0.9Pham Huy Hoang2023-08-121-2/+8
| | | | | | | | | Since 0.9, @lang syntax is still available as fallback but will soon be deprecated. Because of that, new syntax should be adopted once 0.9 becomes the baseline requirements for nvim-treesitter - update health check - update doc
* fix(markdown_inline): don't spellcheck shortlinksRepetitive2023-07-021-0/+2
|
* highlights(markup): distinguish heading level in queriesChristian Clason2023-05-131-6/+4
| | | | | also add a few queries from Helix and remove controversial code block conceal in Markdown
* fix: add @combined to markdown htmlPham Huy Hoang2023-05-031-1/+1
|
* feat(markdown_inline): add @nospell where appropriateJaehwang Jung2023-04-081-2/+2
|
* feat(markdown): add latex injectionsChristian Clason2023-02-051-0/+1
| | | | added in https://github.com/MDeiml/tree-sitter-markdown/pull/71
* markdown: add strikethrough and blockquote capturesChristian Clason2023-01-141-0/+3
|
* highlights(markdown_inline): added ')' to linksJosef Litoš2023-01-041-2/+2
|
* Conceal reference and shortcut links in markdownBen Weedon2022-08-111-6/+30
| | | | | | | | | | | | | | | | | | | | | | | This change conceals `full_reference_link`, `collapsed_reference_link`, and `shortcut_link` similarly to the `markdown_inline` query file already conceals `inline_link` and `image`. ## Test markdown contents ```markdown Some text before the link [full reference link text][link label] and now some text after the link onto a new line. Some text before the link [collapsed reference link text][] and now some text after the link onto a new line. Some text before the link [shortcut link text] and now some text after the link onto a new line. ``` ## Test markdown concealed screenshot Closes #3267
* feat(markdown)!: switch to split parser (#3048)Matthias Deiml2022-06-262-0/+68
* 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