aboutsummaryrefslogtreecommitdiff
path: root/src/nvim/lua/treesitter.c
Commit message (Collapse)AuthorAge
...
* refactor(treesitter): delegate region calculation to treesitter (#22576)Lewis Russell2023-04-04
|
* fix(treesitter): correct include_bytes arg for parse()Lewis Russell2023-03-10
|
* refactor(treesitter): use byte ranges from treesitter (#22589)Lewis Russell2023-03-09
|
* Revert "refactor(treesitter): delegate region calculation to treesitter" ↵Lewis Russell2023-03-08
| | | | | | | (#22575) Revert "refactor(treesitter): delegate region calculation to treesitter (#22553)" This reverts commit 276b647fdba07bf1762d8dd371c4b655b8a418df.
* refactor(treesitter): delegate region calculation to treesitter (#22553)Lewis Russell2023-03-08
|
* fix(treesitter): raise ts_match_limit to 256 (#22497)Christian Clason2023-03-03
| | | | | | | | | | Problem: Some complex queries may not return all matches. Solution: Raise `ts_match_limit` from current 64 (twice the original default) to 256 (which Helix uses, and seems to be enough for the reported problematic cases). If this leads performance regressions in other queries, we should add a generic querying timeout instead of relying on a low value here.
* refactor(build): graduate libtreesitter features which are 1+ years oldbfredl2023-03-03
|
* feat(treesitter): expand the APILewis Russell2023-02-26
|
* build: enable MSVC level 3 warnings (#21934)dundargoc2023-02-11
| | | | | | MSVC has 4 different warning levels: 1 (severe), 2 (significant), 3 (production quality) and 4 (informational). Enabling level 3 warnings mostly revealed conversion problems, similar to GCC/clang -Wconversion flag.
* feat(treesitter): show filetype associated with parser (#17633)Matthieu Coudron2023-01-22
| | | to ease debug. At one point I had an empty filetype and the current message was not helpful enough
* refactor: replace char_u with char 18 (#21237)dundargoc2023-01-09
| | | | | refactor: replace char_u with char Work on https://github.com/neovim/neovim/issues/459
* build: allow IWYU to fix includes for all .c filesdundargoc2022-11-15
| | | | | | | | | | Allow Include What You Use to remove unnecessary includes and only include what is necessary. This helps with reducing compilation times and makes it easier to visualise which dependencies are actually required. Work on https://github.com/neovim/neovim/issues/549, but doesn't close it since this only works fully for .c files and not headers.
* refactor: replace char_u with charDundar Göc2022-10-15
| | | | Work on https://github.com/neovim/neovim/issues/459
* docs: fix typos (#20394)dundargoc2022-09-30
| | | | | Co-authored-by: Raphael <glephunter@gmail.com> Co-authored-by: smjonas <jonas.strittmatter@gmx.de> Co-authored-by: zeertzjq <zeertzjq@outlook.com>
* refactor: move klib out of src/nvim/ #20341dundargoc2022-09-25
| | | | It's confusing to mix vendored dependencies with neovim source code. A clean separation is simpler to keep track of and simpler to document.
* refactor: replace char_u with charDundar Göc2022-09-09
| | | | Work on https://github.com/neovim/neovim/issues/459
* refactor: replace char_u with charDundar Göc2022-09-06
| | | | Work on https://github.com/neovim/neovim/issues/459
* feat(treesitter): include language in invalid query error (#14053)Stephan Seitz2022-09-03
|
* fix(treesitter): more efficient node:root()bfredl2022-08-25
|
* feat(treesitter): upstream node_length() as a node methodQuentin Rasmont2022-08-25
| | | | Util from the nvim-treesitter project.
* feat(treesitter): upstream get_root_for_node() as a node methodQuentin Rasmont2022-08-25
| | | | Util from the nvim-treesitter project.
* feat(treesitter): upstream get_named_children() as a node methodQuentin Rasmont2022-08-25
| | | | Util from the nvim-treesitter project.
* fix(treesitter): free memory on removing parser (#19933)zeertzjq2022-08-25
| | | This fixes the ASAN failure.
* test(treesitter): make internal lang test pending when necessaryThomas Vigouroux2022-08-24
|
* feat(treesitter): allow customizing language symbol nameThomas Vigouroux2022-08-22
|
* refactor: enable -Wconversion warning for lua/treesitter.cDundar Goc2022-07-28
| | | | Work on https://github.com/neovim/neovim/issues/567
* docs: fix typos (#18269)dundargoc2022-06-04
| | | | | | | | | | Co-authored-by: zeertzjq <zeertzjq@outlook.com> Co-authored-by: Dan Sully <dan+github@sully.org> Co-authored-by: saher <msaher.shair@gmail.com> Co-authored-by: Stephan Seitz <stephan.seitz@fau.de> Co-authored-by: Benedikt Müller <d12bb@posteo.de> Co-authored-by: Andrey Mishchenko <mishchea@gmail.com> Co-authored-by: Famiu Haque <famiuhaque@protonmail.com> Co-authored-by: Oliver Marriott <hello@omarriott.com>
* refactor(uncrustify): set maximum number of consecutive newlines to 2 (#18695)dundargoc2022-05-25
|
* Merge pull request #18398 from vigoux/perf/ts_reuse_listbfredl2022-05-03
|\ | | | | perf(treesitter): use a reuse list for query cursors
| * perf(treesitter): use a reuse list for query cursorsThomas Vigouroux2022-05-03
| |
* | fix(treesitter): bump match limit upThomas Vigouroux2022-05-03
|/ | | | | This avoids ignoring too many match results, and avoid highlighting being blank in some files.
* refactor(uncrustify): change rules to better align with the style guideDundar Goc2022-04-29
| | | | | | | | | | | | | Add space around arithmetic operators '+' and '-'. Remove space between back-to-back parentheses, i.e. ')(' vs. ') ('. Remove space between '((' or '))' of control statements. Add space between ')' and '{' of control statements. Remove space between function name and '(' on function declaration. Collapse empty blocks between '{' and '}'. Remove newline at the end of the file. Remove newline between 'enum' and '{'. Remove newline between '}' and ')' in a function invocation. Remove newline between '}' and 'while' of 'do' statement.
* feat(treesitter): set allocator when possibleThomas Vigouroux2022-01-09
| | | | | Adds a new cmake check to keep this backwards compatible with the different versions of tree-sitter.
* refactor: saner options for uncrustify #16196dundargoc2021-10-31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * refactor: general good option changes sp_deref = remove sp_not = remove sp_inv = remove sp_inside_paren_cast = remove mod_remove_duplicate_include = true sp_after_semi = add sp_after_semi_for = force sp_sizeof_paren = remove nl_return_expr = remove nl_else_brace = remove nl_else_if = remove * refactor: mod_remove_extra_semicolon = true * refactor: nl_max = 3 * refactor: sp_bool = force * refactor: sp_compare = force * refactor: sp_inside_paren = remove * refactor: sp_paren_paren = remove * refactor: sp_inside_sparen = remove * refactor: sp_before_sparen = force * refactor: sp_sign = remove * refactor: sp_addr = remove * refactor: sp_member = remove * refactor: nl_struct_brace = remove * refactor: nl_before_if_closing_paren = remove * refactor: nl_fdef_brace = force * refactor: sp_paren_comma = force * refactor: mod_full_brace_do = add
* refactor: remove space after starDundar Göc2021-10-19
|
* fix(treesitter): run predicates more often in iter_matchesThomas Vigouroux2021-10-01
| | | | Superseedes #15126, and fixes the issue.
* refactor: reformat with uncrustify #15736dundargoc2021-09-20
| | | | * fix function parameter comments * remove space after star in function names
* refactor: format with uncrustify #15722dundargoc2021-09-19
|
* Merge pull request #15434 from Dkendal/feature-lua-treesitter-siblingThomas Vigouroux2021-08-23
|\ | | | | feat(treesitter): add next, prev sibling method
| * feat(treesitter): add next, prev sibling methodDylan Kendal2021-08-20
| | | | | | | | | | Add tsnode methods to change to the next, previous, named or unnamed nodes.
* | refactor(map): remove extra-allocating map_new/map_free functionsBjörn Linse2021-08-22
| | | | | | | | | | | | | | | | | | | | Note: the reason for removing them is not that there after this refactor is no use of them, but rather that having them available is an anti-pattern: they manange an _extra_ heap allocation which has nothing to do with the functionality of the map itself (khash manages the real buffers internally). In case there happens to be a reason to allocate the map structure itself later, this should be made explicit using xcalloc/xfree calls.
* | refactor(api): remove unneccesary indirection around handlesBjörn Linse2021-08-22
|/ | | | | These things are just maps to pointers, no need to perform a huge song and dance around it.
* chore: use codespell to spell check #15016dundargoc2021-07-07
|
* fixup(ts): put ts_query_cursor_set_match_limit behind feature guardChristian Clason2021-06-29
| | | | | | | | | | | | | | This is a fixup for #14915, which used the above-mentioned call to restore the behavior of the pre-release version of tree-sitter to that of 0.19.5. However, this function was introduced after 0.19.5, breaking distro builds that link against 0.19.5 instead of the tag specified in neovim's build script. Now the function should only be called when it is available _and_ needed. Once tree-sitter is bumped to 0.19.6 (when this is released), this guard can be removed again. Fixes #14923 (among others)
* fix(treesitter): set match limit for query cursorsChristian Clason2021-06-26
| | | | | | | | | | | | Upstream tree-sitter raised the number of pending matches for a query cursor from 32 to 64k in <https://github.com/tree-sitter/tree-sitter/commit/ 78010722a49ed6224c773c22b0d25a8c9fbde584>, which severely impacted performance for some highlighting queries. This uses the `ts_query_cursor_set_match_limit` function introduced in <https://github.com/tree-sitter/tree-sitter/commit/ cd96552448a6e0d4eb27fc54b27cb5130c4b6f76> to manually set this back to the old default of 32. Fixes #14897
* Merge pull request #14200 from teto/treesitter-checkhealthMarco Hinz2021-04-07
|\ | | | | feat: treesitter checkhealth
| * feat(ts): include parser ABI version in checkhealthThomas Vigouroux2021-04-06
| |
* | Merge pull request #14039 from theHamsta/fix-field-introspectionThomas Vigouroux2021-04-02
|\ \ | |/ |/| Fix(treesitter): Make treesitter.inspect_lang include last field name
| * Fix(treesitter): Make treesitter.inspect_lang include last field nameStephan Seitz2021-03-23
| |
* | ts: Add language version to vim.treesitter (#14255)TJ DeVries2021-03-30
|/