Comments (5)
The problem here is not that paq downloads packages asynchronously but rather that vim packages doesn't cope well with loading at runtime things from the start directory. Even if you force it with rtp. So for this reason the most manageble solution is to use the opt directory by default and then load the packages in bulk.
from paq-nvim.
Can you provide the error that it gives you and the config where you call paq?
from paq-nvim.
When ever I add a new plugin, in my case it is a colorscheme called cyberdream.nvim and reopen neovim this error popups up and once i press enter, then the plugin is installed. But the require function is called before the plugin is installed sync paq.install() method runs asynchronously I guess.
Also below is my config
https://github.com/231tr0n/config/blob/main/nvim/init.lua
from paq-nvim.
Currently the best way to get this behavior in paq is using the setup option opt
to set the default install directory to the opt directory (see :h packages
) and then load the plugins using packadd.
I took the liberty to refactor your bootstrap_paq
function, which is now the only function you need (you can remove clone_paq
and paq_path
)
local function bootstrap_paq(packages)
local path = vim.fn.stdpath("data") .. "/site/pack/paqs/start/paq-nvim"
if not vim.uv.fs_stat(path) then
local url = "https://github.com/savq/paq-nvim.git"
vim.fn.system({ "git", "clone", "--depth=1", url, path })
vim.cmd.packadd("paq-nvim")
vim.notify("Installing plugins")
end
local paq = require("paq"):setup({ opt = true })(packages)
local to_install = paq.query("to_install")
if not vim.tbl_isempty(to_install) then
paq.install()
end
for _, p in pairs(packages) do
if type(p) == "table" then
p = p[1]
end
p = {vim.fs.basename(p)}
vim.cmd.packadd({ args = p, bang = true })
end
end
This should solve the problem.
from paq-nvim.
Yup! thank you for helping me out
from paq-nvim.
Related Issues (20)
- `opt = true` not respected HOT 2
- [Feature] custom commands for updating/installing HOT 3
- bug in bootstrapping docs HOT 1
- Repo owner not taken under consideration when trying to install plugin with same name
- [Feature Discussion] shorten way to call a `:Command` on `run`
- Unable to run setup hook for gitsigns HOT 3
- [Feature Request] Support for tagging certain versions HOT 1
- Synchronous plugins installation HOT 1
- What neovim version is paq trying to target? HOT 3
- Tracking issue for Paq 2.0 HOT 9
- Error when using extra parameters with plugins. HOT 2
- I can't get paq-nvim to work after following all the instructions. HOT 1
- Docs improvement ideas
- errors on first installation of `nvim-treesitter` HOT 5
- cur_hash is always euqal prev_hash, even if a package got updated, leaving the log file empty HOT 3
- question: how do i make a package require another package? HOT 2
- cannot use paq at all HOT 2
- Hide "Nothing to install" message on startup HOT 5
- PaqInstall get error message, but install success
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from paq-nvim.