-
-
Notifications
You must be signed in to change notification settings - Fork 263
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
Plugins load ahead of dependency plugins #557
Comments
I can confirm the same behavior for type http.
I see neither the printed message, nor is the lua file loaded. If I remove the |
Hi, sorry for my very delayed response! I'm still catching up on issues that came in during my time away (#562). @Avimitin: In trying to reproduce your example, I see that the I'm trying to figure out why this would be (since it runs for other lazy-load events correctly). |
In fact none of the |
This might be an upstream bug - when I remove the |
A bit more information: this seems to be related to this difference between Neovim and Vim: https://github.com/neovim/neovim/wiki/FAQ#calling-inputlist-echomsg-etc-in-filetype-plugins-and-autocmd-does-not-work Can I ask how you were verifying that the |
Yes, I put the print line inside the require Lua file. But the Lua file contains some settings which is not activated. So I think the require step is not called. I will try to test option |
Ok - if you can let me know what your testing shows, that would be helpful to determine if this is a real problem (i.e. configs aren't running) or an annoyance with Neovim differing from Vim (i.e. configs are running but prints don't show during this particular autocommand). |
After setting the
But it still reporting errors that lspconfig does not exist. And it works fine if I deleted the |
Also, this reminds me that why I can't get the plugin set up. I write if statement to handle error message: local ok, error = pcall(require, 'rust-tools')
if not ok then
print(error)
return
end And after I unset the option |
Ah - if you want sequencing, then you should use the You probably want something like use {
'simrat39/rust-tools.nvim',
ft = {"rust"},
requires = {{"nvim-lspconfig"}, {"telescope.nvim"}},
wants = 'nvim-lspconfig',
config = function()
print("loading")
require("plugins.rust")
end
} |
I don't see use {
'simrat39/rust-tools.nvim',
ft = {"rust"},
requires = {{"nvim-lspconfig"}, {"telescope.nvim"}},
after = {'nvim-lspconfig'},
config = function()
require("plugins.rust")
end
} Above snip is not working. But if I removed the lazy loading, the after fields works as expected. |
I've tried And below is what happen when try to sequence with Maybe you should add the |
Documentation of For the problem with |
After |
I'm not 100% certain, but from the docs ( |
How to check the sequence between these auto commands? I want to have a test on them. |
With a try that set nvim-lspconfig with With a try that set nvim-lspconfig to keep the So this maybe can prove that your guess is right. But I only know that |
Another detail: if the rust-tools.nvim and nvim-lspconfig are all set to |
This seems more like an issue with autocommands events and ordering than a specific packer bug at this point (sorry for weighing in pretty late). @Avimitin you can find all the available autocommands and when they all run using As for Lastly lspconfig's maintainer has on many occasions warned users against trying to lazy load the plugin since it already handles its setup lazily, so lazy loading it isn't advised/useful (except in the case where it's setup calls another expensive plugin and you are trying to avoid that) |
My current workaround is to set Thx for your help! |
nvim --version
: NVIM v0.6.0-dev+132-g7d2233fadgit --version
: git version 2.32.0Steps to reproduce
Using configuration:
Actual behaviour
Use the command
:messages
after opening themain.rs
file, there is no line printed. Also, the require plugin is not loaded too.Expected behaviour
The config should be loaded after I open the rust file.
packer files
Plugin specification file(s)
https://github.com/Avimitin/nvim/blob/master/lua/plug.lua#L305
packer log file
Post the contents of ~/.cache/nvim/packer.nvim.log here
packer compiled file
http://fars.ee/sAl9
The text was updated successfully, but these errors were encountered: