aboutsummaryrefslogtreecommitdiffstats
path: root/queries/rst
Commit message (Collapse)AuthorAgeFilesLines
* feat!: drop modules, general refactor and cleanupChristian Clason2025-05-123-259/+0
|
* fix(rst): capture (adornment) node as @markup.heading (#7302)Shengyu Zhang2024-11-011-5/+5
| | | | Node alias "adornment" is used as title's overline and underline: https://github.com/stsewd/tree-sitter-rst/blob/5120f6e59284cb8b85b450bd2db0bd352635ba9f/grammar.js#L112
* refactor(format): drop extra indentation for fieldPhạm Huy Hoàng2024-03-213-27/+19
|
* feat(highlights)!: enforce documented captures (#6232)Christian Clason2024-03-031-10/+1
| | | | | | | | | | | | | | | 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.
* feat(format-scripts): linewrap predicates再生花2024-02-232-31/+18
| | | "format-ignore".kick()
* Fixup format (#5934)Phạm Huy Hoàng2024-01-201-0/+1
| | | | | | | * fix(format): newline between top-level field defs * fixup: newline between node and comment * fixup: optimize pattern
* chore: query formattingPham Huy Hoang2024-01-193-97/+94
|
* refactor: manual pre-cleanupPham Huy Hoang2024-01-191-32/+32
| | | | | Moving comments, adding `format-ignore` to lines that will be better with it
* feat!: align standard captures with upstreamChristian Clason2024-01-191-21/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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`
* feat(locals)!: switch to upstream capturesChristian Clason2024-01-191-10/+10
|
* refactor: Remove all `(ERROR) @error` capturesPham Huy Hoang2023-10-251-2/+0
| | | | | | | | | | | | As discussed in PR#5421, capturing `@error` is inconsistent, requiring deep nesting (or priority) in order to correctly have red backgrounds to it. Some queries has this capture, some don't. For consistency purposes, removing all of them is more preferable. For re-enabling error, either add `(ERROR) @error` or `(ERROR _ @error)` to your custom queries.
* feat: add CSV, PSV, & TSVAmaan Qureshi2023-08-171-5/+5
|
* chore(injections)!: update injection syntax to 0.9Pham Huy Hoang2023-08-121-13/+22
| | | | | | | | | 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
* highlights(rst): don't spell check linksObserverOfTime2023-01-221-5/+3
|
* highlights(rst): disable spell for code blocksObserverOfTime2022-10-152-2/+2
| | | | injections(rst): add sourcecode directive
* feat(spell): support more languagesLewis Russell2022-09-261-2/+1
|
* feat(spell): upstream spell queries from spellsitterLewis Russell2022-09-061-0/+11
|
* RST: use `any-of?` instead of `match?` (#1678)Santos Gallegos2021-08-082-10/+42
|
* RST: add code-block to injections (#1677)Santos Gallegos2021-08-081-1/+1
| | | | This isn't part of the rst spec, but it's common enough on third party libs (sphinx specially).
* Improve check-queries (#1253)Santos Gallegos2021-05-311-4/+5
| | | | | - Add checks for injections. - Allow queries that start with [A-Z] for highlights only. - Don't stop on the first error, finish checking all queries.
* Revert "Comment: use `@combined` to create just one tree per buffer (#1252)"Santos Gallegos2021-05-071-1/+1
| | | | This reverts commit 4a7a713c527f57c355bc817f16fc6d955b8cce9b.
* Comment: use `@combined` to create just one tree per buffer (#1252)Santos Gallegos2021-04-281-1/+1
| | | | | | | | | | | | * Comment: use `@combined` to create just one tree per buffer There is no need to create a tree per line/block for comments. Should fix https://github.com/nvim-treesitter/nvim-treesitter/issues/1251 * Add injections for scss * Fix jsonc * Combine jsdoc
* Add text.reference and text.environmentStephan Seitz2021-03-301-1/+1
|
* Add comment parser to highlight comment tags (#893)Santos Gallegos2021-03-121-0/+2
| | | Closes #236
* highlights(rst): Reset highlights in doctest_blockStephan Seitz2021-02-151-0/+4
|
* RST: update injection queriesSantos Gallegos2021-01-023-16/+32
| | | | Finally, highlight for code blocks
* RST: update parser and queriesSantos Gallegos2021-01-013-12/+68
| | | | | | | | | | | | | | | | | | | | | | | | | - The directive type does not longer includes `::`. - The content of the directives is not longer interpreted as rst, but it uses language injection for it. - Fix a query to allow to capture targets without link. - Reset the content of the math role so it can be highlighted by the injection instead. Problems I found: - Capturing the same node with @language and @content will raise an error. ``` Error detected while processing FileType Autocommands for "*": E5108: Error executing lua /usr/share/nvim/runtime/lua/vim/treesitter/languagetree.lua:331: table index is nil ``` Harcoding the language works, Using the offset predicate doesn't work either `(#offset! 0 0 1 0)` nor `(#offset! 0 0 0 5)` - Generating the grammar using `tree-sitter-cli@0.17.x` breaks nvim-treesitter, `@0.16.9` works.
* Remove textobjects moduleStephan Seitz2020-10-041-32/+0
|
* RST: update queriesSantos Gallegos2020-09-183-4/+30
| | | | Some nodes were renamed and added more textobjects.
* RST: update localsSantos Gallegos2020-09-151-0/+2
| | | | A title is an implicit target.
* rst: remove unused capturesSantos Gallegos2020-09-061-6/+0
| | | | This is causing an error.
* fix(queries): use vim-match for non lua regexesSteven Sojka2020-08-161-2/+2
|
* RST: update textobjectsSantos Gallegos2020-08-111-0/+4
|
* RST: update queriesSantos Gallegos2020-08-071-3/+14
|
* RST: update localsSantos Gallegos2020-08-011-0/+7
|
* RST: update highlightsSantos Gallegos2020-08-011-10/+39
|
* rst: update highlight queriesSantos Gallegos2020-07-291-0/+8
|
* Parsers: add reStructuredTextSantos Gallegos2020-07-273-0/+114