"vaf"/"vac" An empty line was created
mkdir700 opened this issue · comments
Describe the bug
my expect:
vaf
: select a function;vac
: select a class;
but, Their behavior became out of line with my expectations. They will cause new blank lines instead of select codes.
Their behaviors are demonstrated here.
To Reproduce
Steps to reproduce the behavior:
- Install current version
- Use the following configuration
lvim.builtin.treesitter.matchup.enable = true
lvim.builtin.treesitter.textobjects.select = {
enable = true,
lookahead = true,
keymaps = {
["ac"] = "@class.outer",
["ic"] = "@class.inner",
["af"] = "@function.outer",
["if"] = "@function.inner",
["aa"] = "@parameter.outer",
["ia"] = "@parameter.inner",
},
}
- Use
vaf/vac
This problem begins to appear here (#349). Before that, everything was normal for me, and my configuration didn't change at all.
Expected behavior
vac, vaf, vic, vif
, I hope they can choose the right code.
I'm still a rookie when it comes to using neovim. Please ask me if the description is unclear. I will try to describe it in more detail. thanks.
Output of :checkhealth nvim-treesitter
nvim-treesitter: require("nvim-treesitter.health").check()
-
Installation
- OK:
tree-sitter
found 0.20.7 (parser generator, only needed for :TSInstallFromGrammar)
- OK:
node
found v16.14.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 14.0.0 (clang-1400.0.29.202)
- OK: Neovim was compiled with tree-sitter runtime ABI version 14 (required >=13). Parsers must be compatible with runtime ABI.
-
Parser/Features H L F I J
- gomod ✓ . . . ✓
- python ✓ ✓ ✓ ✓ ✓
- yaml ✓ ✓ ✓ ✓ ✓
- rust ✓ ✓ ✓ ✓ ✓
- jsonc ✓ ✓ ✓ ✓ ✓
- dockerfile ✓ . . . ✓
- cpp ✓ ✓ ✓ ✓ ✓
- toml ✓ ✓ ✓ ✓ ✓
- markdown ✓ . ✓ . ✓
- tsx ✓ ✓ ✓ ✓ ✓
- typescript ✓ ✓ ✓ ✓ ✓
- go ✓ ✓ ✓ ✓ ✓
- html ✓ ✓ ✓ ✓ ✓
- java ✓ ✓ . ✓ ✓
- c ✓ ✓ ✓ ✓ ✓
- make ✓ . ✓ . ✓
- http ✓ . . . ✓
- cmake ✓ . ✓ . .
- vim ✓ ✓ ✓ . ✓
- help ✓ . . . .
- lua ✓ ✓ ✓ ✓ ✓
- css ✓ . ✓ ✓ ✓
- javascript ✓ ✓ ✓ ✓ ✓
- comment ✓ . . . .
- regex ✓ . . . .
- json ✓ ✓ ✓ ✓ .
- bash ✓ ✓ ✓ . ✓
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.8.1
Build type: Release
LuaJIT 2.1.0-beta3
编译者 brew@Ventura-arm64.local
Features: +acl +iconv +tui
See ":help feature-compile"
系统 vimrc 文件: "$VIM/sysinit.vim"
$VIM 预设值: "/opt/homebrew/Cellar/neovim/0.8.1/share/nvim"
Run :checkhealth for more info```
**Additional context**
Add any other context about the problem here.
Sorry for the change in compatibility. From #349 you need to use an up-to-date nvin-treesitter as well. Can you update the plugin and test again?
thanks! They can work normally now.
I use packer to update all plugins, but treesitter is still the old version.I'm not sure what's going on, but after I update it manually, it's ok.
Thank you for reminding me.