| Commit message (Collapse) | Author | Age |
... | |
| |
|
|\
| |
| | |
perf(treesitter): use a reuse list for query cursors
|
| | |
|
|/
|
|
|
| |
This avoids ignoring too many match results, and avoid highlighting
being blank in some files.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Adds a new cmake check to keep this backwards compatible with the
different versions of tree-sitter.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* 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
|
| |
|
|
|
|
| |
Superseedes #15126, and fixes the issue.
|
|
|
|
| |
* fix function parameter comments
* remove space after star in function names
|
| |
|
|\
| |
| | |
feat(treesitter): add next, prev sibling method
|
| |
| |
| |
| |
| | |
Add tsnode methods to change to the next, previous, named or unnamed
nodes.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
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.
|
|/
|
|
|
| |
These things are just maps to pointers, no need to perform
a huge song and dance around it.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|\
| |
| | |
feat: treesitter checkhealth
|
| | |
|
|\ \
| |/
|/| |
Fix(treesitter): Make treesitter.inspect_lang include last field name
|
| | |
|
|/ |
|
|
|
|
| |
to help debugging
|
| |
|
| |
|
| |
|
|
|
|
| |
While this might sound silly, it is needed for further improvements.
|
|\
| |
| | |
] treesitter: add node:id()
|
| | |
|
| | |
|
|/
|
|
|
| |
This can happen when there is ABI mismatches, and removes the assumption
parsing alwasy succeeds (which is wrong).
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
This is will avoid some issues at runtime.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
| |
fixup! treesitter: fix lint
|
| |
|
| |
|
|
|
|
| |
Also fixes some mismatches on the name of the function
|
| |
|
|
|
|
| |
This is the first step towards language injection using treesitter.
|
| |
|
|
|
|
|
|
|
| |
Sometimes treesitter calls for an invalid column within a line, checking
that the column is actually valid and forcing the value avoids an
integer overflow and an infinite sequence of invalid reads.
Fixes #12131
|
| |
|
| |
|
|
|
|
| |
[skip.lint]
|