savq / paq-nvim Goto Github PK
View Code? Open in Web Editor NEW🌚 Neovim package manager
License: MIT License
🌚 Neovim package manager
License: MIT License
Some plugins are not in the root of the repository they come from, e.g. a colour scheme for many applications might organise them by application name (https://github.com/sonph/onehalf), or the plugin might not be the main focus of the project (https://github.com/psf/black/tree/master/plugin).
vim-plug has the rtp
option to specify the subirectory.
Is this a feature you would implement?
Thank you :)
Maybe it makes sense to generate helptags after each :PaqInstall
or :PaqUpdate
? I do not see any case when one would not want that. Or am I missing something?
As suggested here, let the user add a hook to the install function. Similar to Vim-Plug's do
option.
Notes:
output_result('parse', args[1])
'parse' is not in ops, so paq fails when trying to access a nil value
error text:
Error executing lua .../share/nvim/site/pack/paqs/opt/paq-nvim/lua/paq-nvim.lua:58: attempt to index local 'c' (a nil value)
After installing paq or paq-nvim it seems to work. However opening up a new editor and typing
:PaqList
I get "E492: Not an editor command: PaqList" error in nvim.
Here is the contents of my init.lua
local fn = vim.fn
local install_path = fn.stdpath('data') .. '/site/pack/paqs/start/paq-nvim'
if fn.empty(fn.glob(install_path)) > 0 then
fn.system({'git', 'clone', '--depth=1', 'https://github.com/savq/paq-nvim.git', install_path})
end
-- :PaqSync and all paq commands are not found when you load this file into nvim. Don't know why
-- It makes paq unusable imo. 9-23-2021
local paq = require("paq")
paq {
'savq/paq-nvim';
'tpope/vim-sensible';
'tpope/vim-fugitive';
'tpope/vim-scriptease';
'mkitt/tabline.vim';
'nelstrom/vim-markdown-folding';
'plasticboy/vim-markdown';
}
-- require('vgit').setup()
-- require('telescope').setup {
-- extensions = {
-- fzy_native = {
-- override_generic_sorter = false,
-- override_file_sorter = true,
-- }
-- }
-- }
-- require('telescope').load_extension('fzy')
-- require('telescope').load_extension('fzy_native')
-- require('telescope').load_extension('z')
To explain it a different way: If I load ~/.config/nvim/lua/init.lua into nvim and type :source %
and then :PaqList
I get this output
Installed packages:
paq-nvim
tabline.vim
vim-fugitive
vim-markdown
vim-markdown-folding
vim-scriptease
vim-sensible
Press ENTER or type command to continue
But if editing any other file and then just typing :PaqList
I get the error.
This must mean my paq or init.lua is not installed correctly???
Any help or suggestions appreciated.
Current paq implementation has no option to run hook if there's no update.
vim-plug has option to execute post hook with PlugInstall!
, PlugUpdate!
.
It's useful when you have error while running hook and want to re-run hook.
Maybe we can add <bang>
option to PaqInstall
, PaqUpdate
, PaqSync
or introduce new command.
Thanks for the great plugin, learned lot from your source code.
Currently, paq-nvim
doesn't show any errors if something wrong happen.
For example, with a wrong repo name (e.g: paq 'neovim/nvim-lspconfg'
), I had three differents behavior when trying other and other (until I figure it.. ^^' ):
Username for 'https://github.com':
at the top of my current window (and freeze neovim)It can be a bit confusing.
Also, it could be great to habe a message at the end of installation/update saying something like '15 packages was installed/updated !'
Thank's for this plugin btw, really appreciate it in my new nvim config :]
For heavy plugins like tpope/vim-rails it would be lovely to have a lazy option like plug
. Any interest in this feature? Thanks!
Hi,
I was wondering if we can have GIT_TERMINAL_PROMPT=0
by default to prevent hanging by mistyped git repository?
Usually if you type the repo names wrong, the nvim will hang by requesting you to typing username and password
Sometimes when testing out different plugins it's useful to disable them without having to uninstall them (PaqClean
).
If it's possible to actually check which plugins are listed in my init.lua
and use that to load them instead of just load what's in the pack/
directory I think that would be more clear for users as well as not having to redownload when you want to re-enable the plugin.
Just installed and run :PaqInstall
for the first time.
E5108: Error executing lua .../share/nvim/site/pack/paqs/opt/paq-nvim/lua/paq-nvim.lua:82: bad argument #1 to 'open' (number expected, got nil)
Ever since upgrading to the last version calling Paq'some/plugin-here'
doesn't work. I've seen the README.md and that this syntax is deprecated
In my dotfiles I expose Paq=require 'paq-nvim'.paq
as a global variable (notice how it's not local Paq
but just Paq
) - https://github.com/3nuc/dotfiles/blob/master/.config/nvim/init.lua#L6
Then, thanks to the new neovim 0.5 "runtime files" feature: https://github.com/nanotee/nvim-lua-guide/blob/master/README.md#runtime-files, I can put plugin-related files in eg. plugin/telescope.lua
then register all the telescope-related plugins using Paq there:
https://github.com/3nuc/dotfiles/blob/master/.config/nvim/plugin/telescope.lua#L2-L7
The problem is that with the newest version of paq this is not supported, as I get a bunch of errors when launching recently (but it works with v7) and the only way to register plugins is registering them all at once in a big dictionary? As seen in the maintainer's config: https://github.com/savq/dotfiles/blob/master/nvim/init.lua#L16
Wasn't paq unique in the regard that you could register a plugin anywhere? I see Vundle, packer etc. all have a
packer#begin
packer'someplugin'
packer'someplugin'
packer'someplugin'
packer#end
syntax
I forked and reverted to v7 here: https://github.com/3nuc/paq-nvim. I could probably use the paq branch= command but I wasn't really sure if it supports tags (releases)
Hey there @savq!
I was wondering if it was possible to point to local filesystem for in-development plugins?
Thanks!
-- paq.nvim automatic install
local install_path = vim.fn.stdpath("data") .. "/site/pack/paq/opt/paq-nvim"
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
vim.cmd("!git clone https://github.com/savq/paq-nvim " .. install_path)
end
-- plugins
vim.cmd "packadd paq-nvim"
local paq = require "paq-nvim".paq
paq {"savq/paq-nvim", opt = true}
paq "junegunn/fzf"
paq "vimwiki/vimwiki"
paq "romainl/vim-cool"
paq "junegunn/fzf.vim"
paq "t9md/vim-choosewin"
paq "qpkorr/vim-bufkill"
paq "dense-analysis/ale"
paq "airblade/vim-rooter"
paq "jiangmiao/auto-pairs"
paq "itchyny/lightline.vim"
paq "lifepillar/vim-solarized8"
paq "norcalli/nvim-colorizer.lua"
paq "junegunn/rainbow_parentheses.vim"
paq "mengelbrecht/lightline-bufferline"
paq "nvim-treesitter/nvim-treesitter"
paq {"neoclide/coc.nvim", branch = "release"}
local plugin_path = vim.fn.stdpath("data") .. "/site/pack/paqs"
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
vim.cmd[[ PaqInstall ]]
end
vim.cmd "source /home/pun/.bio/conf/vim/conf.vim"
-- nvim-colorizer
require "colorizer".setup()
-- nvim-treesitter
require "nvim-treesitter.configs".setup {
ensure_installed = {"bash", "json", "lua", "python"},
highlight = {
enable = true
}
}
I'm trying to automatically install all the plugins before sourcing my remaining vimscript. Is this the right way of going at it ?
Also is there a way I can get the location of the init.lua file so I don't have to use the full path in that source vim.cmd ?
When you run PaqClean it deletes paq-nvim
Comment out one plugin and to PaqClean
message reads Paq [1/28] removed
.
Either it needs to say Paq [1/1] removed
or it needs to say when it's completed. Something like Paq [1/28] removed. Operation completed.
Personally I prefer if it said [1/1]
.
Command :PaqInstall failed on config:
require 'paq' {
{'junegunn/fzf', run = '/bin/true'};
}
Error message:
Error executing vim.schedule lua callback: ...-nvim/nvim/site/pack/paqs/start/paq-nvim/lua/paq.lua:54: bad argument #4 to 'format' (string expected, got nil)
Neovim 0.5.0
paq-nvim 0.9.2
This sound strange, but paq breaks my highlighting configs.
I don't like how floating windows are highlighted by default in my theme (and in most themes I tried, really): NormalFloat
defaults to a link to PMenu
, which is usually not the best for floats.
So I added two lines in my init.vim:
hi link NormalFloat Normal
hi link FloatBorder Normal
This was working, I got less frightening colors for floats.
Then one day I decided I want to give paq a try and replaced vim-plug with it.
Then I noticed that when I open a new nvim instance, all the colors are default from my colorscheme, without the additional configurations I made. But when I run :so ~/.config/nvim/init.vim
, then everything becomes normal.
In a freshly open nvim:
After manually sourcing init.vim (and in a freshly open nvim before switching to paq)
I'm pretty sure this started after switching to paq. I even used git bisect
in my dotfiles repo to track down the commit where it all started.
I can only guess that this could be connected to the loading order of scripts.
It's interesting that I didn't notice any other group of settings to be ignored, only these visual things.
Is it an issue with paq? Or is it something that everyone but me knows like "You don't configure visuals with vimscript if you load pluigns with lua"? Should I wait for a fix or I can do some hacky trick?
I found this issue by accident. If I add a package, that does not exist on GitHub, to be installed by paq
the current line of the buffer will be replaced with a Username for https://github.com':
text.
Illustrated on line 28 of the screenshot.
I intended to install the package kjssad/quantum
but it was actually kjssad/quantum.vim
. Attempting to install the former is what caused this issue. It also locks up user input taking a while to exit.
The solution here is obviously to install packages that exist but gracefully failing when the package doesn't exist would be nice.
I just installed some packages with paq-nvim on Windows. It seems to work so far. Could probably could do to add the following to the README for Windows users. Happy to open a PR if that's preferable.
git clone https://github.com/savq/paq-nvim.git "$env:LOCALAPPDATA\nvim-data\site\pack\paqs\opt\paq-nvim"
Hi!
I'm currently using vim-plug and wanted a more minimal package manager and found your plugin. Going through the installation instructions, I cloned the repo to ~/.local/share/nvim
and subsequently wrote in my init.vim
(as an example):
lua <<EOF
require 'paq-nvim' {
'paq-nvim';
{'neoclide/coc.nvim', branch='release'};
}
EOF
However, on running :PaqInstall
, I get the error message as Not an editor command: PaqInstall
.
Not sure what I'm doing wrong.
The modification of the environment of spawned process in 8377e9b actually replaces the environment that is normally inherited from the parent process with the one that contains only GIT_TERMINAL_PROMPT=0
. Such a replacement can be source of different problems. For example, in my case spawned git process is not aware that it must use proxy (environment variables HTTP_PROXY/HTTPS_PROXY
) to clone repos.
As far as I understand it is sort of "limitation" of underlying libuv uv_spawn
function, there is no way to extend the parent process environment, only inherit or replace it.
Possible fix is to temporarily modify vim.env.GIT_TERMINAL_PROMPT
before spawning a process and then to reset it back to the original value. Although it feels too much dirty for me.
The log file should record failures for all operations.
There should be a command to open the log file, and another to clean/remove it.
Consider adding a setup option to open the log automatically.
Continuation of #2 .
The compat file seems to override vim variable and them vim.treesitter doesn't exist
Besides listing the packages, it should have a marker to indicate if an
operation has performed. +
for installs, and *
for updates.
Packages that fail to parse should not be listed.
Still undecided on whether uninstalled packages should not be listed,
or if the should have a marker like -
.
This doesn't substitute the existing prompt messages.
Adding this plugin to paq installs it and it loads normally after install. After restarting neovim the plugin doesn't load anymore.
The easiest way of testing this is to install the plugin and type nim in command mode and then press tab for command completions. Right after plugin install there are multiple commands provided by the plugin, but after restarting neovim and looking for commands that start with nim, there are none.
For now I worked around this by installing all my other plugins with paq and installing this one plugin with vim-plug. Its weird that all the other plugins I have work with paq, but this one doesn't.
require("paq")({
{"junegunn/fzf", run = "./install --all"}
})
output message
Paq [] failed to run hook for fzf
It could be awesome to have a notification when adding a package or update it, through https://github.com/rcarriga/nvim-notify.
As far as I understand, you can use vim.notify
to handle it.
I'm trying to figure out how to replicate, but every once in a while, I'll run :PaqClean
, and it'll delete a ton of plugins that are still declared in my init.lua. Sometimes it'll even delete paq.nvim.
When this happens… :PaqInstall
won't install everything either… I have to keep closing vim and re-running the install command until everything is installed.
I'll keep working on replicating it reliably.
Firstly, thanks for this great simple plugin. This was exactly what I was looking for in a nvim package manager.
I'm curious what your thoughts are on displaying the output of :paqUpdate
a bit differently. Now it just seems to run through all of your plugins, and show a brief message that Paq [10/10] pull changes for plugin
. It doesn't really give any indication tot he user what was actually updated. I noticed that the :paqClean
actually tracks which plugins were removed and lists them. Would you be open to having something similar for :paqUpdate
?
Hello!
I love your plugin so far, exactly what I needed.
I'd like to suggest some improvements about installation messages. When I see Paq: install xyz
I am never sure when the plugin has finished being installed or if it's stuck. Looking at the code it seems that it's printed after installation but maybe it'd be better to have a message like Paq: installing xyz...
so that in the event the installation is stuck we know which plugin is concerned.
Also a success message after the full installation process is done would be very helpful. Something like Paq: 12/12 plugins installed
maybe?
Hi, Was just wanting to try this out and followed the readme config. I do have a long list of plugins, but it seems that paq must be prompting me for most/all of them as they fill the screen. I'm not sure if its hanging or installing. In any case not sure why since normally you don't need an account for an https download. I just put a sample of my init here.
paq{'gvim-airline/vim-airline-themes', opt=true } paq{'lervag/vimtex', opt=true } paq{'boydkelly/vim-mutton', url = 'https://gitlab.com/boydkelly/vim-mutton' } paq 'gairblade/vim-rooter' paq 'gandymass/vim-matchup'
And the results of Paqinstall:
or 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com': Username for 'https://github.com':
Some plugins like telescope-fzy-native comes with submodules which paq-nvim fails download when cloning.
To fix I can manually cd
to the plugins git repository and do
git submoidule init
git submoduile update
But it would be better if paq-nvim could figure this out and do it automatically
Hello! Always happy to see more Neovim package development. However, I am curious how this differs from Packer.nvim. I suspect that many other users have this same curiosity, and it might help increase adoption if users can easily make an informed decision about which package manager to use.
good day,
is there a way to specify dependencies between packages, if not then what is the recommendation for that use case?
thank you
I ran a :PaqUpdate
today, and since have been unable to successfully run :PaqInstall
. Error shown in screenshot reads:
E5108: Error executing lua .../share/nvim/site/pack/paqs/opt/paq-nvim/lua/paq-nvim.lua:52: attempt to index upvalue 'ops' (a function value)
After reading through the code, I think it's related to the bodge here:
Line 49 in e127a28
I would give fixing it myself a go, but I'm neither familiar with Neovim's Lua API nor particularly familiar with Lua itself.
paq-nvim is almost everything I've been looking for: an easy to use, fast and simple package manager. I was wondering if you'd take a pull request that adds a custom user autocmd that's invoked at the end of operations?
Basically thinking of bootstrap here: if I wanted invoke something like paq:sync() and then exit neovim once it's done. I'd need a way to exist for the async processes to finish before quitting.
When I called :PaqClean
it removed itself from ~/.local/share/nvim/site/pack/paqs/opt/
. That is, the plugin basically uninstalled itself.
Here's my lua code that load plugins using paq:
vim.cmd("packadd paq-nvim")
local paq = require("paq-nvim").paq
local function setup()
paq('neovim/nvim-lspconfig')
paq('nvim-treesitter/nvim-treesitter')
paq('nvim-treesitter/playground')
-- More plugins
end
return {
setup = setup
}
As you can see there's nothing strange, and everything else works fine.
Thank you for this awesome and minimalistic plugin manager!
Attempting to install several packages and I am getting the following printed into the main buffer:
Username for 'https://github.com': Username for 'https://github.com':
The current behavior is that if :PaqClean
is invoked with some plugins listed with opt=true
, and they exist in the start
dir, they are just deleted. I think it would be better if paq just moved the plugins to the opt
dir in that case and also the converse. That would also help on testing some plugins like mentioned in #20, without having to navigate to the pack
dir and moving them manually.
Some color schemes have their vim plugins within a subdirectory of the repo. For instance, vim plug has the rtp option, which allows you to specify the subdirectory containing the vim plugin.
It would be great to have a PaqSync
command just like PackerSync
as described here: https://github.com/wbthomason/packer.nvim#quickstart
This command would be equivalent to first running PaqInstall
, the PaqClean
and then PaqUpdate
.
Furthermore, it would be nice to have a PaqSync!
command that runs the whole thing non-interactively to make it easier to use in automation scripts.
Hi !
Is there a way to update git submodules during installation and on updates?
I ran into an issue whith https://github.com/nvim-telescope/telescope-fzy-native.nvim. I work my way around it by going into the ".../paqs/start/telescope-fzy-native.nvim" folder and running git submodule update --init --recursive
but it would be great to have it automatically done.
Thanks for all your work !
Not sure if that happens to everyone, bu when trying to run :PaqInstall
with a mispelled plugin name, the terminal just completely freezes with the git clone
prompt asking for your username, the only way out is to close the whole terminal, not even Ctrl+C
works
:PaqClean
does nothing in windows 10 neovim 5.0
This issue is not necessarily paq's fault.
Some plugins sometimes have duplicate help tags in their documentation. Thus, when installing or updating plugins the Duplicate help tag in ...
is generated and the user has to press enter for the messages.
To fix this issue, it would be better to do silent! helptags ALL
, instead of helptags ALL
. I don't think silencing the errors are a bad idea since the end user cannot do anything about them.
One example of such a plugin is hop.nvim.
@savq thank you so much for this plugin. it works incredibly well! the post-install hook is brilliant.
one question though; just something i noticed in your own dotfiles and it got me wondering about some of the mechanics of how these plugin managers work (in a lua world?)..
i noticed you don't ever actually source/require/load your packages.lua in your dotfiles; i'm assuming you open them once; packadd call in there loads packer from runtimepath where you cloned it, then you can run PaqInstall or whatever you need, and that's it. You don't ever need to source your packages again.. How do we know a plugin that is installed with paq is sourced/loaded to then set their config via lua too?
Is is possible to do something like:
paq {'nvim-treesitter/nvim-treesitter', run = ':TSUpdate'}
As recommended in the treesitter documentation? I know you can run vim functions in the run
option, but this command doesn't seem to work for me. Sorry if I'm missing something obvious!
I have been trying to use paq since it works better on windows than packer, but haven't been able to install gitsigns, it say that it did but when I launch gitsings next time it shows me this error: Error executing luv callback: ...pack\paqs\start\plenary.nvim\lua\plenary\async\async.lua:14: The coroutine failed with this message: ...site\pack\paqs\start\gitsigns.nvim\lua\gitsigns\diff.lua:141: cannot resolve symbol 'xdl_diff': The specified procedure could not be found.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.