Open Drew-Daniels opened 10 months ago
I encountered the same issue and resolved it by updating nvim-treesitter
to the latest commit aa31b8d
.
You could give it a try today if the issue is still relevant. If not, you should consider closing it.
Yeah, still getting the same behavior. Even updated to the the latest release after aa31b8d
, 1c3fb9eac2a04230e4af23715fa2c190cbeacd70
.
Can you try to reproduce to issue using a minimal setup, with only nvim-treesitter
as installed plugin if possible
The easiest way is too make a backup of your current config ex. mv .config/nvim .config/nvim.old
and remove all related files
.local/share/nvim
.local/state/nvim
.cache/nvim
Describe the bug I have updated my
nvim/init.lua
config such that I should be able to use the swapping functionality withnvim-treesitter-textobjects
, however, when I try using these keybindings,<Leader>a
or<Leader>A
, the normal appends command are executed, instead of the swapping functionality:nvim/lua/plugins/init.lua
nvim/init.lua
To Reproduce Steps to reproduce the behavior:
neovim
usingbrew
(brew install neovim
)neovim
(nvim <a typescript file>
)<space>a
or<space>A
to see if the arguments/parameters get swappedExpected behavior A clear and concise description of what you expected to happen.
Output of
:checkhealth nvim-treesitter
============================================================================== nvim-treesitter: require("nvim-treesitter.health").check() Installation ~ - OK `tree-sitter` found 0.20.8 (parser generator, only needed for :TSInstallFromGrammar) - OK `node` found v20.5.0 (only needed for :TSInstallFromGrammar) - OK `git` executable found. - OK `cc` executable found. Selected from { vim.NIL, "cc", "gcc", "clang", "cl", "zig" } Version: Apple clang version 15.0.0 (clang-1500.1.0.2.5) - OK Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI. OS Info: { machine = "arm64", release = "23.2.0", sysname = "Darwin", version = "Darwin Kernel Version 23.2.0: Wed Nov 15 21:53:18 PST 2023; root:xnu-10002.61.3~2/RELEASE_ARM64_T6000" } ~ Parser/Features H L F I J - bash ✓ ✓ ✓ . ✓ - c ✓ ✓ ✓ ✓ ✓ - css ✓ . ✓ ✓ ✓ - dockerfile ✓ . . . ✓ - fish ✓ ✓ ✓ ✓ ✓ - html ✓ ✓ ✓ ✓ ✓ - http ✓ . . . ✓ - javascript ✓ ✓ ✓ ✓ ✓ - jq ✓ ✓ . . ✓ - json ✓ ✓ ✓ ✓ . - lua ✓ ✓ ✓ ✓ ✓ - markdown ✓ . ✓ ✓ ✓ - markdown_inline ✓ . . . ✓ - norg ✓ . ✓ . ✓ - norg_meta ✓ . . ✓ . - python ✓ ✓ ✓ ✓ ✓ - query ✓ ✓ ✓ ✓ ✓ - ruby ✓ ✓ ✓ ✓ ✓ - scss ✓ . ✓ ✓ . - sql ✓ . . ✓ ✓ - toml ✓ ✓ ✓ ✓ ✓ - tsx ✓ ✓ ✓ ✓ ✓ - typescript ✓ ✓ ✓ ✓ ✓ - vim ✓ ✓ ✓ . ✓ - vimdoc ✓ . . . ✓ - 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
Additional context Other keybinds, like
ip
work as expected, so I know that the@parameter.inner
query is working as expected on these files, it just appears that the swapping functionality specifically doesn't run for these text objects for some reason.<space>a
to swap the parameter with the next parameter (sent into insert mode):