You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
I have updated my nvim/init.lua config such that I should be able to use the swapping functionality with nvim-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:
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
NVIM v0.9.5
Build type: Release
LuaJIT 2.1.1703358377
system vimrc file: "$VIM/sysinit.vim"
fall-back for$VIM: "/opt/homebrew/Cellar/neovim/0.9.5/share/nvim"
Run :checkhealth for more info
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.
Navigating to a function parameter:
After pressing <space>a to swap the parameter with the next parameter (sent into insert mode):
The text was updated successfully, but these errors were encountered:
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.
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 ~
tree-sitter
found 0.20.8 (parser generator, only needed for :TSInstallFromGrammar)node
found v20.5.0 (only needed for :TSInstallFromGrammar)git
executable found.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)
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
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):The text was updated successfully, but these errors were encountered: