Skip to content

vim-debugstring does not repeat with NeoVim and packer.nvim #16

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

Open
andrewferrier opened this issue Jun 28, 2022 · 1 comment
Open

Comments

@andrewferrier
Copy link

andrewferrier commented Jun 28, 2022

Hi - I've been using vim-debugstring for some years now (we actually met at VimConf in London!) with Vim and more recently NeoVim.

I use vim-debugstring fairly regularly. However, fairly recently I've noticed that dot-repeat (.) has stopped working with vim-debugstring.

To be clear, vim-repeat is installed. For reference, this is how the relevant section of my packer.nvim config looks:

use({
    "bergercookie/vim-debugstring",
    requires = { "tpope/vim-repeat" },
    config = function()
        require("plugins.debugstring")
    end,
}) -- dq

I think I understand the issue though. These lines:

... specifically look for vim-repeat in the runtimepath variable. However, they aren't there, because they are implicitly there through the use of wildcards:

runtimepath=~/.config/nvim,~/.config/nvim/pack/*/start/*,/etc/xdg/nvim,~/.local/share/nvim/site,~/.local/share/nvim/site/pack/packer/o
pt/packer.nvim,~/.local/share/nvim/site/pack/*/start/*,/usr/local/share/nvim/site,/usr/share/nvim/site,~/.local/share/nvenv/versions/nig
htly/share/nvim/runtime,~/.local/share/nvenv/versions/nightly/share/nvim/runtime/pack/dist/opt/matchit,~/.local/share/nvenv/versions/nig
htly/lib/nvim,~/.local/share/nvim/site/pack/*/start/*/after,/usr/share/nvim/site/after,/usr/local/share/nvim/site/after,~/.local/share/n
vim/site/after,/etc/xdg/nvim/after,~/.config/nvim/after

In my case, vim-repeat ends up in ~/.local/share/nvim/site/pack/packer/start/vim-repeat/. It's there, but vim-debugstring doesn't detect it. If I comment out the if guards that check for its existence, repeat goes back to working.

I'm not sure of the right way to fix this, but it seems like the check for vim-repeat is too naive. I assume this problem could/would occur with Vim as well as NeoVim, maybe it just depends how a plugin manager populates runtimepath. I don't think packer.nvim touches it, so it's just the default value.

@andrewferrier
Copy link
Author

For anyone else with the same problem, as a temporary workaround I am explicitly adding vim-repeat to my runtimepath for vim-debugstring to find:

vim.opt.runtimepath:append(
    vim.fn.stdpath("data") .. "/site/pack/packer/start/vim-repeat"
)

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

No branches or pull requests

1 participant