Open mjlbach opened 2 years ago
Thanks for the report! I wonder if this is related to a bug I saw recently wherein even start
plugins had to be packadd
ed before they could be require
d (or Neovim had to be restarted). I don't recall that being the case previously, so I should check if something changed upstream. Regardless, I think a fix should be to packadd
in the install logic.
Ah, nevermind. I know what causes this.
We explicitly source
files for start
plugins after installation, but this is interacting in a weird way with how Neovim refreshes its package.path
, causing the module to not be found. The fix is still the same, I believe.
As discussed in #786, my guess was wrong. I now think this has to do with install order. If we ensure that nvim-treesitter
is installed first, then nvim-treesitter-textobjects
installs just fine. The problem is that nvim-treesitter-textobjects
tends to finish downloading first, and packer
currently does not constrain dependencies to be loaded for the first time before plugins that depend on them.
This is a clearer fix (in that it's an issue with packer
and not upstream), but a more involved fix. We'll need to add logic for ordering post-install loads/hooks.
Yeah, I had initially assumed that "requires" were loaded before the requirer, but I see now that does not seem to be the case.
It should be, though.
I don't have time to fix this today, but it's on my radar now.
No worries :) Thanks for looking into it!
Hello, sorry for bumping this issue, however, I am facing the same issue. Is there now a way to bypass this behaviour, or to atleast get some human readable warning that nvim-treesitter will work as expected once neovim is restarted?
I dug into this a bit but ran out of time before solving it. It's been bothering me for awhile (as this is the only plugin that "fails" installing (although in reality it works fine).
nvim --version
: NVIM v0.7.0-dev+893-gb455e0179git --version
: git version 2.34.1Steps to reproduce
call
:PackerInstall
Actual behaviour
Expected behaviour
nvim-treesitter-textobjects
installs without errorpacker files
Plugin specification file(s)
Post or link your plugin specification files here, if you aren't able to provide a minimal reproducerpacker log file
Post the contents of ~/.cache/nvim/packer.nvim.log here