-
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
Installing this plugin cause misbehavior on the native "f" and "t" motions. #381
Comments
Can't reproduce. Can you share a minimal config that reproduces the problem? local root = vim.fn.fnamemodify("./.repro", ":p")
-- set stdpaths to use .repro
for _, name in ipairs { "config", "data", "state", "cache" } do
vim.env[("XDG_%s_HOME"):format(name:upper())] = root .. "/" .. name
end
-- bootstrap lazy
local lazypath = root .. "/plugins/lazy.nvim"
if not vim.loop.fs_stat(lazypath) then
vim.fn.system { "git", "clone", "--filter=blob:none", "https://github.com/folke/lazy.nvim.git", lazypath }
end
vim.opt.runtimepath:prepend(lazypath)
-- install plugins
local plugins = {
"nvim-treesitter/nvim-treesitter",
"nvim-treesitter/nvim-treesitter-textobjects",
}
require("lazy").setup(plugins, {
root = root .. "/plugins",
}) From this config I don't have any problem with them. It might be another plugin that remaps the keys when this plugin is installed. Can you check |
@kiyoon Hi! Thanks for the quick reply. I just changed from packer.nvim to lazy.nvim and the problem seems to be solved. Not sure why it didn't work as expected with packer. |
Okey, after a bit of playing, seems like the issue is caused when using the 'nvim-treesitter.textobjects.repeatable_move' extension with the builtIn 'f', 'F', 't', 'T' binded to their respective mappings |
You're right, thanks for reporting the issue. I'll work on this soon |
Describe the bug
Just by installing this plugin (it doesnt matter if you configure it or not, it will cause the bug anyway), it will make the native vim motions for "f" and "t" misbehave, leaving you just one character before where you should be.
To Reproduce
Steps to reproduce the behavior:
ct,
this should remove the param completely and leave you in insert mode with a , at the right of your cursor, but instead you have 'r,' at your right.cf,
you should be left without any comma at your right, just an space, but instead you get the comma at your right.Output of
:checkhealth nvim-treesitter
OS Info:
{
machine = "x86_64",
release = "6.1.8-200.fc37.x86_64",
sysname = "Linux",
version = "#1 SMP PREEMPT_DYNAMIC Tue Jan 24 20:32:16 UTC 2023"
}
Parser/Features H L F I J
Output of
nvim --version
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: