aboutsummaryrefslogtreecommitdiff
path: root/runtime/lua/vim/treesitter.lua
Commit message (Collapse)AuthorAge
* refactor(treesitter): rename x_position => x_posJustin M. Keyes2022-09-25
| | | | | "pos" has a long precedent as "position" in vim, and there is no reason to use a verbose name here.
* fix(treesitter): return full metadata for get_captures_at_position (#20203)Christian Clason2022-09-16
| | | | | | | | fix(treesitter): get_captures_at_position returns metadata Return the full `metadata` table for the capture instead of just the priority. Further cleanup of related docs.
* docs(treesitter): clean up and update treesitter.txt (#20142)Christian Clason2022-09-14
| | | | | * add type annotations to code * clean up and expand static documentation * consistent use of tags for static and generated docs
* Merge pull request #20093 from neovim/upstream-ts-utilChristian Clason2022-09-08
|\ | | | | | | * feat(treesitter): upstream get_{node,captures} utility functions * refactor(treesitter): get_{nodes,captures}_at_{position,cursor}
| * refactor(treesitter): get_{nodes,captures}_at_{position,cursor}Christian Clason2022-09-06
| |
| * feat(treesitter): upstream get_node_at_cursor()Quentin Rasmont2022-09-06
| | | | | | | | Util from the nvim-treesitter project.
* | docs(treesitter): fix doxygenzeertzjq2022-09-08
| |
* | Use weak tables in tree-sitter code (#17117)Thomas Vigouroux2022-09-07
| | | | | | | | | | | | feat(treesitter): use weak tables when possible Also add the defaulttable function to create a table whose values are created when a key is missing.
* | fix(treesitter): don't support legacy syntax in start()Christian Clason2022-09-06
|/
* feat(treesitter): add vim.treesitter.start(), enable for LuaChristian Clason2022-09-06
| | | | | | | | | | * Add vim.treesitter.start() for starting treesitter highlighting via ftplugin or autocommand (can be extended later for fold, indent, matchpairs, ...) * Add vim.treesitter.stop() for manually stopping treesitter highlighting * Enable treesitter highlighting for Lua if `vim.g.ts_highlight_lua = true` is set in `init.lua`
* fix(treesitter): make it get_captures_at_positionbfredl2022-08-26
|
* feat(treesitter): upstream get_hl_groups_at_position()Quentin Rasmont2022-08-26
| | | | Util from the nvim-treesitter project.
* feat(treesitter): clarify similar 'get_node_range' functionsQuentin Rasmont2022-08-25
| | | | | | | | | The private 'get_node_range' function from the languagetree module has been renamed and remains private as it serve a purpose that is only relevant inside the languagetree module. The 'get_node_range' upstreamed from nvim-treesitter in the treesitter module has been made public as it is in itself a utlity function.
* feat(treesitter): upstream node_contains()Quentin Rasmont2022-08-25
| | | | Util from the nvim-treesitter project.
* feat(treesitter): upstream is_parent()Quentin Rasmont2022-08-25
| | | | | Util from the nvim-treesitter project. Renamed is_parent to is_ancestor for clarity.
* chore: format runtime with styluaChristian Clason2022-05-09
|
* fix(treesitter): create new parser if language is not the same as cached ↵Chinmay Dalal2022-04-22
| | | | parser (#18149)
* feat(ts): expose minimum language version to lua (#17186)Thomas Vigouroux2022-01-27
|
* chore: fix typos (#16361)dundargoc2021-11-27
| | | | | | | | | | | | | | | | | | | | | | | | | | Co-authored-by: Brede Yabo Sherling Kristensen <bredeyabo@hotmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: István Donkó <istvan.donko@gmail.com> Co-authored-by: Julian Berman <Julian@GrayVines.com> Co-authored-by: bryant <bryant@users.noreply.github.com> Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com> Co-authored-by: nlueb <9465658+nlueb@users.noreply.github.com> Co-authored-by: Leonhard Saam <leonhard.saam@yahoo.com> Co-authored-by: Jesse Wertheim <jaawerth@gmail.com> Co-authored-by: dm1try <me@dmitry.it> Co-authored-by: Jakub Łuczyński <doubleloop@o2.pl> Co-authored-by: Louis Lebrault <louis.lebrault@gmail.com> Co-authored-by: Brede Yabo Sherling Kristensen <bredeyabo@hotmail.com> Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: István Donkó <istvan.donko@gmail.com> Co-authored-by: Julian Berman <Julian@GrayVines.com> Co-authored-by: bryant <bryant@users.noreply.github.com> Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com> Co-authored-by: nlueb <9465658+nlueb@users.noreply.github.com> Co-authored-by: Leonhard Saam <leonhard.saam@yahoo.com> Co-authored-by: Jesse Wertheim <jaawerth@gmail.com> Co-authored-by: dm1try <me@dmitry.it> Co-authored-by: Jakub Łuczyński <doubleloop@o2.pl> Co-authored-by: Louis Lebrault <louis.lebrault@gmail.com>
* feat(ts): add query module in treesitter keysThomas Vigouroux2021-08-23
|
* docs: make Lua docstrings consistent #15255Gregory Anders2021-08-22
| | | | | | | | | | | | The official developer documentation in in :h dev-lua-doc specifies to use "--@" for special/magic tokens. However, this format is not consistent with EmmyLua notation (used by some Lua language servers) nor with the C version of the magic docstring tokens which use three comment characters. Further, the code base is currently split between usage of "--@", "---@", and "--- @". In an effort to remain consistent, change all Lua magic tokens to use "---@" and update the developer documentation accordingly.
* docs: Treesitter (#13260)TJ DeVries2021-05-01
| | | | | | | | | * doc & fixes: Generate treesitter docs * fixup to treesitter-core * docs(treesitter): fix docs for most functions Co-authored-by: Thomas Vigouroux <tomvig38@gmail.com>
* fix: allow accessing vim.treesitter.language without requireThomas Vigouroux2021-04-01
|
* ts: Add language version to vim.treesitter (#14255)TJ DeVries2021-03-30
|
* chore: remove deprecated lua module tshighlighterMatthieu Coudron2021-03-16
|
* buffer updates: add on_reload callback and handle it in treesitter parserBjörn Linse2021-02-10
|
* treesitter: propagate on_detach event properlyBjörn Linse2021-02-10
|
* fix(treesitter): use source() method on attachThomas Vigouroux2021-01-14
| | | | | Fixes an issue that tree-sitter always attached to the current buffer, instead of the provided buffer.
* feat(buffer_updates): allow ignoring when previewingThomas Vigouroux2020-12-15
| | | | | Also adds a test that we actually subscribe to buffer events when in CMDPREVIEW.
* feat(treesitter): add language treeSteven Sojka2020-11-23
| | | | | | | | | | | | | Implement the LanguageTree structure to enable language injection. This is done be removing the old Parser metatable and replacing by the new structure, with the same API (almost). Some noticeable differences : - `parser:parse()` now returns a table of trees - There is no incremental parsing for child (injected) languages Co-authored-by: Thomas Vigouroux <tomvig38@gmail.com>
* treesitter: separate tree and parserThomas Vigouroux2020-11-04
| | | | While this might sound silly, it is needed for further improvements.
* treesitter: allow custom parser for highlighterThomas Vigouroux2020-10-12
| | | | | | | | | | | Also allow to get parser ranges. This will be useful for language injection, allowing us to tweak the parser's ranges on the fly. Update runtime/lua/vim/treesitter.lua Co-authored-by: Paul Burlumi <paul@burlumi.com>
* treesitter: add string parser (#13008)Thomas Vigouroux2020-09-30
|
* treesitter: use new on_bytes interfaceBjörn Linse2020-09-09
| | | | | | | | | | This will significantly reduce the parsing work needed e.g. when rehighlighting after every keypress in insert mode. Also add safety check for tree-sitter trying to read past the end of a line. This can happen after we sent an incorrect buffer update.
* treesitter(docs): update and refresh docsThomas Vigouroux2020-08-13
|
* treesitter: refactor and use lua regexesThomas Vigouroux2020-08-13
|
* treesitter: add parser on_lines callbacksThomas Vigouroux2020-07-10
|
* treesitter: call bufload before parsing (#12603)Thomas Vigouroux2020-07-10
|
* treesitter: use nodes to mark rangesThomas Vigouroux2020-06-29
|
* treesitter: add set_included_ranges to the parserThomas Vigouroux2020-06-29
| | | | This is the first step towards language injection using treesitter.
* treesitter: fix testsThomas Vigouroux2020-06-03
|
* treesitter: unknown predicates always match #12173Thomas Vigouroux2020-04-30
|
* treesitter: escape backslashes in queriesThomas Vigouroux2020-04-18
| | | | | | | | Treesitter changed their decoders and apparently thus causing this change. This decoder change happened on ee9a3c0ebb218990cf391ed987be7f2448c54a73.
* lua: add regex support, and `@match` support in treesitter queriesBjörn Linse2020-02-26
|
* treesitter: add standard &rtp/parser/ search path for parsersBjörn Linse2020-02-07
|
* tree-sitter: implement query functionality and highlighting prototype ↵Björn Linse2019-12-22
| | | | [skip.lint]
* tree-sitter: use "module" pattern in lua sourceBjörn Linse2019-09-28
|
* tree-sitter: simplify editing using the new old_byte_size parameterBjörn Linse2019-09-28
|
* tree-sitter: fix lint, delete "demo" plugin (replaced by functional tests)Björn Linse2019-09-28
|
* tree-sitter: improve parser API (shared parser between plugins)Björn Linse2019-09-28
|