| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
| |
Otherwise the same link will be opened twice when the cursor is on the
link text itself.
|
| |
|
|
|
|
|
|
| |
**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
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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`
|
| |
|
|
| |
The `injection.include-children` is needed in markdown_inline parser.
|
| | |
|
| |
|
| |
These `include-children` were to alleviate an issue with empty range language tree, which has been fixed for Neovim nightly/Neovim 0.9.2
|
| |
|
|
|
|
|
|
|
| |
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
|
| | |
|
| |
|
|
|
| |
also add a few queries from Helix and remove controversial
code block conceal in Markdown
|
| | |
|
| | |
|
| |
|
|
| |
added in https://github.com/MDeiml/tree-sitter-markdown/pull/71
|
| | |
|
| | |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
* 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
|