@inner.block @outer.block makes no sense in C I believe

Open
#589 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
c
Domain
tooling

Research direction

Reproduce the behavior in a C file using @inner.block and @outer.block, then compare the current selections with the expected screenshots. The issue is resolved when both text objects select the intended inner and outer blocks.

Written by the indexing model from the issue text.

Description

bug

To Reproduce
open a c file

Capture d'écran 2024-04-02 021921

select inner block
Capture d'écran 2024-04-02 021932

select outer block
Capture d'écran 2024-04-02 021947

Expected behavior
expected inner block
Capture d'écran 2024-04-02 021955

expected outer block

Capture d'écran 2024-04-02 022003

Output of :checkhealth nvim-treesitter

==============================================================================
nvim-treesitter: require("nvim-treesitter.health").check()

Installation ~

  • WARNING tree-sitter executable not found (parser generator, only needed for :TSInstallFromGrammar, not required for :TSInstall)
  • OK node found v18.19.1 (only needed for :TSInstallFromGrammar)
  • OK git executable found.
  • OK cc executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" }
    Version: cc (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
  • OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.

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

  • bash ✓ ✓ ✓ . ✓
  • c ✓ ✓ ✓ ✓ ✓
  • cpp ✓ ✓ ✓ ✓ ✓
  • css ✓ . ✓ ✓ ✓
  • diff ✓ . . . .
  • fish ✓ ✓ ✓ ✓ ✓
  • git_config ✓ . ✓ . ✓
  • git_rebase ✓ . . . ✓
  • gitcommit ✓ . . . ✓
  • gitignore ✓ . . . .
  • json ✓ ✓ ✓ ✓ .
  • lua ✓ ✓ ✓ ✓ ✓
  • markdown ✓ . ✓ ✓ ✓
  • markdown_inline ✓ . . . ✓
  • nix ✓ ✓ ✓ . ✓
  • norg . . . . .
  • python ✓ ✓ ✓ ✓ ✓
  • query ✓ ✓ ✓ ✓ ✓
  • regex ✓ . . . .
  • rust ✓ ✓ ✓ ✓ ✓
  • toml ✓ ✓ ✓ ✓ ✓
  • typescript ✓ ✓ ✓ ✓ ✓
  • vim ✓ ✓ ✓ . ✓
  • vimdoc ✓ . . . ✓
  • xml ✓ ✓ ✓ ✓ ✓
  • yaml ✓ ✓ ✓ ✓ ✓

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

NVIM v0.10.0-dev-2765+gb8858dddb
Build type: RelWithDebInfo
LuaJIT 2.1.1710088188
Run ":verbose version" for more info

Dominant language
Tree-sitter Query
Stars
2.8k
Forks
271
Avg merge
8d 8h
Merged PRs (30d)
1

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from nvim-treesitter/nvim-treesitter-textobjects

All issues in nvim-treesitter/nvim-treesitter-textobjects

Similar issues

More DevTools issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.