nvim-treesitter / nvim-treesitter-textobjects

Apache License 2.0
2.2k stars 200 forks source link

[C#] class.outer should support classes, structs, records, and enums #636

Closed marcinjahn closed 3 months ago

marcinjahn commented 5 months ago

Describe the bug Currently, the class.outer query supports only classes, while it seems that it should support all entities that represent "types":

To Reproduce Open any C# file where classes, structs, records, and enums are defined. Try to jump to the next class.outer. Only classes are supported.

Expected behavior Structs, records and enums should be considered when invoking class.outer query.

Output of :checkhealth nvim-treesitter

nvim-treesitter: require("nvim-treesitter.health").check() Installation ~ - OK `tree-sitter` found 0.22.5 (parser generator, only needed for :TSInstallFromGrammar) - OK `node` found v18.19.0 (only needed for :TSInstallFromGrammar) - OK `git` executable found. - OK `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" } Version: cc (GCC) 14.1.1 20240522 (Red Hat 14.1.1-4) - 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 = "6.8.11-300.fc40.x86_64", sysname = "Linux", version = "#1 SMP PREEMPT_DYNAMIC Mon May 27 14:53:33 UTC 2024" } ~ Parser/Features H L F I J - angular ✓ ✓ ✓ ✓ ✓ - astro ✓ ✓ ✓ ✓ ✓ - bash ✓ ✓ ✓ . ✓ - c ✓ ✓ ✓ ✓ ✓ - c_sharp ✓ ✓ ✓ . ✓ - cpp ✓ ✓ ✓ ✓ ✓ - diff ✓ . . . . - dockerfile ✓ . . . ✓ - fish ✓ ✓ ✓ ✓ ✓ - git_config ✓ . ✓ . ✓ - hcl ✓ . ✓ ✓ ✓ - helm ✓ . . . ✓ - html ✓ ✓ ✓ ✓ ✓ - javascript ✓ ✓ ✓ ✓ ✓ - jsdoc ✓ . . . . - json ✓ ✓ ✓ ✓ . - json5 ✓ . . . ✓ - jsonc ✓ ✓ ✓ ✓ ✓ - lua ✓ ✓ ✓ ✓ ✓ - luadoc ✓ . . . . - luap ✓ . . . . - markdown ✓ . ✓ ✓ ✓ - markdown_inline ✓ . . . ✓ - printf ✓ . . . . - python ✓ ✓ ✓ ✓ ✓ - query ✓ ✓ ✓ ✓ ✓ - regex ✓ . . . . - ron ✓ ✓ ✓ ✓ ✓ - rust ✓ ✓ ✓ ✓ ✓ - scss ✓ . ✓ ✓ ✓ - sql ✓ . . ✓ ✓ - terraform ✓ . ✓ ✓ ✓ - toml ✓ ✓ ✓ ✓ ✓ - tsx ✓ ✓ ✓ ✓ ✓ - 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
Build type: RelWithDebInfo
LuaJIT 2.1.1713773202
Run "nvim -V1 -v" for more info