-
Notifications
You must be signed in to change notification settings - Fork 202
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
Selections are one character short with set selection=exclusive
#488
Comments
It may be a bug on nvim-treesitter's Check if incremental selection of nvim treesitter have the same problem. If so, then that function should be the problem. |
Sorry for the very late reply. I stopped using neovim, but I started again recently (🎉). I've been doing some tests today with this. The incremental selection of There was an attempt to fix it in nvim-treesitter/nvim-treesitter#5724. However as per this comment, the module will be deprecated soon and the I wonder what's the best solution here. This (nvim-treesitter-textobjects) plugin still has the same problem. Since apparently there are intentions to remove If so I can give it a shot |
the function is already in this plugin in the |
I mean just make a fix for the master branch, and make it so that it is easy to be rebased to main. |
Describe the bug
The
textobjects
don't work properly withset selection=exclusive
.To Reproduce
I have setup the following keymaps:
set selection=inclusive
,vaa
selects the whole parameterset selection=exclusice
,vaa
selection is one character short.vaa.mov
For comparison, this is what happens with
va"
. The whole string is selected with bothinclusive
orexclusive
. The difference is where the cursor is placed in the second case.vaquote.mov
Expected 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 14.0.3 (clang-1403.0.22.14.1)
OS Info:
{
machine = "arm64",
release = "22.5.0",
sysname = "Darwin",
version = "Darwin Kernel Version 22.5.0: Thu Jun 8 22:22:20 PDT 2023; root:xnu-8796.121.3~7/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
The text was updated successfully, but these errors were encountered: