Skip to content

Conversation

@mezdelex
Copy link

Should fix #775

2025-08-27.19-14-14.mp4

Not sure if this fix is already being addressed in another way or refactor process, but just in case, the move_repeatable function was failing when no string was being returned (nil in this case) due to { expr = true } keymap options.

mezdelex added a commit to mezdelex/NeovimConfig that referenced this pull request Aug 27, 2025
…s since the { expr = true } throws on repeatable non builtin returns; fixed selection mode on selection textobjects; see nvim-treesitter/nvim-treesitter-textobjects#795
@mezdelex
Copy link
Author

I don't have a clue about Fennel, but it looks like there's a bug in the Fennel textobject parser
image
as I'm getting this error indicator (probably didn't install Fennel right...) but it's exactly at line 105 as the pipeline indicates
image
it looks like set_form text object doesn't have binding_pair

Anybody with more experience with Fennel I could ping? this looks like an existing bug

README.md Outdated
-- vim.keymap.set({ "n", "x", "o" }, ";", ts_repeat_move.repeat_last_move)
-- vim.keymap.set({ "n", "x", "o" }, ",", ts_repeat_move.repeat_last_move_opposite)
vim.keymap.set({ "n", "x", "o" }, ";", ts_repeat_move.repeat_last_move)
vim.keymap.set({ "n", "x", "o" }, ",", ts_repeat_move.repeat_last_move_opposite)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

you can keep it commented so people don't set both keymaps by accident

@kiyoon
Copy link
Collaborator

kiyoon commented Aug 28, 2025

Can you keep the change minimal, like get rid of the fennel textobject changes?

Also, you can just paste the snippet from the master branch because it's been working without issues. Introducing a new logic can introduce another bug.

…fied the README to address the change; no longer requires { expr = true }
@mezdelex
Copy link
Author

@kiyoon oh yeah my apologies.

Discarded the mentioned textobject change and kept one of the both suggested keymaps options for repeatable_move commented as you suggested.

@kiyoon
Copy link
Collaborator

kiyoon commented Aug 28, 2025

For example, the master has this snippet.

if M.last_move.func == "f" or M.last_move.func == "t" then
if opts.forward then
vim.cmd([[normal! ]] .. vim.v.count1 .. ";")
else
vim.cmd([[normal! ]] .. vim.v.count1 .. ",")
end
elseif M.last_move.func == "F" or M.last_move.func == "T" then
if opts.forward then
vim.cmd([[normal! ]] .. vim.v.count1 .. ",")
else
vim.cmd([[normal! ]] .. vim.v.count1 .. ";")
end
else
M.last_move.func(opts, unpack(M.last_move.additional_args))
end

Is there any reason why you would change it to feedkeys? If not, I'd prefer to stick to the same logic.

@mezdelex
Copy link
Author

No particular reason really, I just searched for a way to feed keys to the input, but the master branch snippet should in fact be more performant. Changed as suggested.

@kiyoon kiyoon changed the title fix(repeatable_move): fix repeatable_move when nil was returned; modified the README to address the change; no longer requires { expr = true } fix(repeatable_move): bug when nil was returned or normal command used; no longer requires { expr = true } Aug 28, 2025
@kiyoon kiyoon merged commit 1b2d85d into nvim-treesitter:main Aug 28, 2025
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants