aboutsummaryrefslogtreecommitdiff
path: root/runtime/queries
Commit message (Collapse)AuthorAge
* build(deps): bump tree-sitter-query to v0.5.0 (#32299)Riley Bruins2025-02-04
| | | and sync queries from nvim-treesitter (adds support for `MISSING` nodes).
* fix(treesitter): update queriesChristian Clason2024-11-22
|
* feat(defaults): pretty :help headings #30544Justin M. Keyes2024-09-27
| | | | | | | | | | | | | | Problem: Headings in :help do not stand out visually. Solution: Define a non-standard `@markup.heading.1.delimiter` group and special-case it in `highlight_group.c`. FUTURE: This is a cheap workaround until we have #25718 which will enable: - fully driven by `vimdoc/highlights.scm` instead of using highlight tricks (`guibg=bg guifg=bg guisp=fg`) - better support of "cterm" ('notermguicolors')
* fix(treesitter): sync queries from upstreamChristian Clason2024-09-12
|
* fix(runtime): sync bundled treesitter queriesChristian Clason2024-07-28
|
* fix(runtime): sync bundled treesitter queriesChristian Clason2024-07-24
|
* build(deps): drop unused bundled bash, python parsers and queriesChristian Clason2024-07-09
| | | | | | | | | | Problem: Neovim bundles treesitter parsers for bash and python but does not use them by default. This dilutes the messaging about the bundled parsers being required for functionality or reasonable out-of-the-box experience. It also increases the risk of query incompatibilities for no gain. Solution: Stop bundling bash and python parser and queries.
* build(deps): bump tree-sitter-vimdoc to v3.0.0Christian Clason2024-06-08
|
* build(deps): bump tree-sitter-query to v0.4.0Christian Clason2024-05-26
|
* fix(treesitter): update queriesChristian Clason2024-05-05
|
* fix(treesitter): update parsers and queriesChristian Clason2024-04-05
|
* feat(treesitter): update Markdown parsers and queries to v0.2.1Christian Clason2024-03-19
|
* feat(treesitter): update Bash parser and queries to v0.21.0Christian Clason2024-03-19
|
* feat(treesitter): update Python parser and queries to v0.21.0Christian Clason2024-03-19
|
* feat(treesitter): update Vimdoc parser and queries to v2.4.0Christian Clason2024-03-19
|
* feat(treesitter): update Vim parser and queries to v0.4.0Christian Clason2024-03-19
|
* feat(treesitter): update Lua parser and queries to v0.1.0Christian Clason2024-03-19
|
* feat(treesitter): update C parser and queries to v0.21.0Christian Clason2024-03-19
|
* feat(treesitter): support URLs (#27132)Gregory Anders2024-03-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Tree-sitter queries can add URLs to a capture using the `#set!` directive, e.g. (inline_link (link_text) @text.reference (link_destination) @text.uri (#set! @text.reference "url" @text.uri)) The pattern above is included by default in the `markdown_inline` highlight query so that users with supporting terminals will see hyperlinks. For now, this creates a hyperlink for *all* Markdown URLs of the pattern [link text](link url), even if `link url` does not contain a valid protocol (e.g. if `link url` is a path to a file). We may wish to change this in the future to only linkify when the URL has a valid protocol scheme, but for now we delegate handling this to the terminal emulator. In order to support directives which reference other nodes, the highlighter must be updated to use `iter_matches` rather than `iter_captures`. The former provides the `match` table which maps capture IDs to nodes. However, this has its own challenges: - `iter_matches` does not guarantee the order in which patterns are iterated matches the order in the query file. So we must enforce ordering manually using "subpriorities" (#27131). The pattern index of each match dictates the extmark's subpriority. - When injections are used, the highlighter contains multiple trees. The pattern indices of each tree must be offset relative to the maximum pattern index from all previous trees to ensure that extmarks appear in the correct order. - The `iter_captures` implementation currently has a bug where the "match" table is only returned for the first capture within a pattern (see #27274). This bug means that `#set!` directives in a query apply only to the first capture within a pattern. Unfortunately, many queries in the wild have come to depend on this behavior. `iter_matches` does not share this flaw, so switching to `iter_matches` exposed bugs in existing highlight queries. These queries have been updated in this repo, but may still need to be updated by users. The `#set!` directive applies to the _entire_ query pattern when used without a capture argument. To make `#set!` apply only to a single capture, the capture must be given as an argument.
* build(deps): bump tree-sitter-bash to v0.20.5Christian Clason2024-02-10
|
* feat(treesitter)!: new standard capture namesChristian Clason2024-01-21
| | | | | | | | | | | | | | Problem: Sharing queries with upstream and Helix is difficult due to different capture names. Solution: Define and document a new set of standard captures that matches tree-sitter "standard captures" (where defined) and is closer to Helix' Atom-style nested groups. This is a breaking change for colorschemes that defined highlights based on the old captures. On the other hand, the default colorscheme now defines links for all standard captures (not just those used in bundled queries), improving the out-of-the-box experience.
* feat(lsp): use treesitter for stylize markdownMaria José Solano2023-09-19
|
* build(deps): bump tree-sitter-python to v0.20.4Sanchayan Maity2023-08-27
|
* feat(treesitter): update C queries from upstreamChristian Clason2023-08-13
|
* feat(treesitter): add injection language fallback (#24659)Christian Clason2023-08-11
| | | | | | | | | | | | * feat(treesitter): add injection language fallback Problem: injection languages are often specified via aliases (e.g., filetype or in upper case), requiring custom directives. Solution: include lookup logic (try as parser name, then filetype, then lowercase) in LanguageTree itself and remove `#inject-language` directive. Co-authored-by: Lewis Russell <me@lewisr.dev>
* build(deps): bump tree-sitter-c to v0.20.4 (#24495)Christian Clason2023-07-27
|
* fix(treesitter): update markdown parser and queries (#24429)Christian Clason2023-07-22
|
* feat(treesitter): add bash parser and queriesChristian Clason2023-07-01
|
* feat(treesitter): add python parser and queriesChristian Clason2023-07-01
|
* feat(treesitter): bundle markdown parser and queries (#22481)Christian Clason2023-07-01
| | | | | | | * bundle split Markdown parser from https://github.com/MDeiml/tree-sitter-markdown * add queries from https://github.com/nvim-treesitter/nvim-treesitter/tree/main * upstream `#trim!` and `#inject-language!` directives Co-authored-by: dundargoc <gocdundar@gmail.com>
* fix(treesitter): update lua parser and queries (#24148)Christian Clason2023-06-26
|
* fix(treesitter): update highlights for query (#23699)Christian Clason2023-05-21
| | | captures for `; extends` and `; inherits`
* fix(treesitter): update c queriesChristian Clason2023-05-15
|
* fix(treesitter): update vimdoc and vimscript queriesChristian Clason2023-05-15
|
* build(deps): update lua parser and queriesChristian Clason2023-05-15
|
* refactor(treesitter)!: rename help parser to vimdocChristian Clason2023-04-01
|
* fix(treesitter): update queries from nvim-treesitterChristian Clason2023-04-01
| | | | remove self-injection for C preprocessor macros (can be very slow)
* feat(treesitter): use upstream format for injection queriesLewis Russell2023-03-08
|
* feat(treesitter): bundle query parser and queries (#22483)Christian Clason2023-03-03
| | | skip injections for now
* feat(treesitter): upstream foldexpr from nvim-treesitterLewis Russell2023-02-23
|
* feat(help): highlighted codeblocksChristian Clason2022-11-29
|
* build(deps): update viml parser and queries (#21158)Christian Clason2022-11-22
|
* build(deps): bump lua parser to v0.0.14 (#20897)Christian Clason2022-11-01
|
* build(deps): bump vimdoc parser to v1.2.5 (#20829)Christian Clason2022-10-27
|
* build(deps): bump vimdoc parser and queries to v1.2.4 (#20788)Christian Clason2022-10-24
|
* build(deps): bump vimdoc (help) parser to v1.2.1 #20642Justin M. Keyes2022-10-13
|
* build(deps): bump help parser and queries (#20388)Christian Clason2022-09-28
|
* feat(treesitter): bundle :help parser and queriesJustin M. Keyes2022-09-22
| | | | | parser from https://github.com/vigoux/tree-sitter-vimdoc queries from nvim-treesitter
* build(deps): bump tree-sitter-viml to 0.2.0 (#20121)Christian Clason2022-09-08
|
* feat(extmarks,ts,spell): full support for spellingThomas Vigouroux2022-09-06
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - Added 'spell' option to extmarks: Extmarks with this set will have the region spellchecked. - Added 'noplainbuffer' option to 'spelloptions': This is used to tell Neovim not to spellcheck the buffer. The old behaviour was to spell check the whole buffer unless :syntax was set. - Added spelling support to the treesitter highlighter: @spell captures in highlights.scm are used to define regions which should be spell checked. - Added support for navigating spell errors for extmarks: Works for both ephemeral and static extmarks - Added '_on_spell_nav' callback for decoration providers: Since ephemeral callbacks are only drawn for the visible screen, providers must implement this callback to instruct Neovim which regions in the buffer need can be spell checked. The callback takes a start position and an end position. Note: this callback is subject to change hence the _ prefix. - Added spell captures for built-in support languages Co-authored-by: Lewis Russell <lewis6991@gmail.com> Co-authored-by: Björn Linse <bjorn.linse@gmail.com>