-
Notifications
You must be signed in to change notification settings - Fork 201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
@inner.block @outer.block makes no sense in C I believe #589
Comments
block.inner is kind of random everytime it selects a unexpected thing sometimes even outside the block |
inner.block does not seem defined for C I tried
Ideally I want
Outer
I don't think it's possible because of how C is represented in Treesitter. So at the very least it could do like Javascript
Outer
|
There are multiple problems:
Selecting inner/outer block is a common use case I hope this issue will get some attention because right now there are way too many problems for me alone to fix easily. |
I think in the printf case, it might be selecting inside the parentheses because it can't find an inner block so it falls back to the default |
To Reproduce
open a c file
select inner block
select outer block
Expected behavior
expected inner block
expected outer block
Output of
:checkhealth nvim-treesitter
==============================================================================
nvim-treesitter: require("nvim-treesitter.health").check()
Installation ~
tree-sitter
executable not found (parser generator, only needed for :TSInstallFromGrammar, not required for :TSInstall)node
found v18.19.1 (only needed for :TSInstallFromGrammar)git
executable found.cc
executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }Version: cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
OS Info:
{
machine = "x86_64",
release = "5.15.146.1-microsoft-standard-WSL2",
sysname = "Linux",
version = "#1 SMP Thu Jan 11 04:09:03 UTC 2024"
} ~
Parser/Features H L F I J
Legend: H[ighlight], L[ocals], F[olds], I[ndents], In[j]ections
+) multiple parsers found, only one will be used
x) errors found in the query, try to run :TSUpdate {lang} ~
Output of
nvim --version
The text was updated successfully, but these errors were encountered: