-
-
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
loading conditional plugins break sequencing #865
Comments
I remember that the By the way, I find that manage two runtimes in packer is way more complicated. Sometimes the logical connections between different specification is unclear (i.e when there are multiple lazy-loading arguments, especially cond + event, cond + after, etc) it is really a mess to know what on earth will be the event to trigger the plugins to be loaded. I am thinking about doing it in another way: let compile_path being not in plugin/folder, so it will be not automatically sourced, and put it into another directory and require it in init.lua. And write another config for vscode and generate another compiled file and require it depending on the condition. |
In README, |
Here's my workaround, if anybody needs it: local lsp_setup = function()
local required_plugins = { "nvim-lsp-installer", "nvim-lspconfig", }
for _, name in ipairs(required_plugins) do
local plugin = _G.packer_plugins[name]
if plugin == nil or not plugin.loaded then
return
end
end
require("nvim-lsp-installer").setup {}
local lspconfig = require("lspconfig")
-- ...
end
use {
"williamboman/nvim-lsp-installer",
cond = is_nvim,
config = lsp_setup,
}
use {
"neovim/nvim-lspconfig",
cond = is_nvim,
config = lsp_setup,
} |
nvim --version
:git --version
: git version 2.35.1Steps to reproduce
Actual behaviour
load
null-ls.nvim
afternvim-lsp-installer
, loadnvim-lspconfig
afternull-ls.nvim
.Expected behaviour
load
nvim-lspconfig
beforenull-ls.nvim
, loadnull-ls.nvim
beforenvim-lsp-installer
.packer files
Plugin specification file(s)
packer compiled file
The text was updated successfully, but these errors were encountered: