Skip to content
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

PaqClean removes itself #3

Closed
lunjon opened this issue Dec 16, 2020 · 5 comments
Closed

PaqClean removes itself #3

lunjon opened this issue Dec 16, 2020 · 5 comments

Comments

@lunjon
Copy link

lunjon commented Dec 16, 2020

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!

savq added a commit that referenced this issue Dec 16, 2020
The readme didn't mention that Paq should manage itself (issue #3).
@savq
Copy link
Owner

savq commented Dec 16, 2020

Hi,

You should add Paq itself to the list of packages like so:

paq{'savq/paq-nvim', opt=true}

I think this was in the readme before, or maybe I just forgot to add it. Sorry for the inconvenience 😞


Since Paq is installed in the same directory as any other package, it also manages itself. This allows it to update itself without additional mechanisms.

savq added a commit that referenced this issue Dec 16, 2020
Related to issue #3
@lunjon
Copy link
Author

lunjon commented Dec 17, 2020

Alright, that fixes it!

Thank you for the help.

@lunjon lunjon closed this as completed Dec 17, 2020
@alxndr
Copy link

alxndr commented Jun 10, 2021

I have listed savq/paq-nvim in my config, however it still removes itself when running PaqClean. Has something changed?

https://github.com/alxndr/dotfiles/blob/8d3344765cd4ac2c2712ed8ad9c12979e5df9a12/nvim/init.lua#L13

@savq
Copy link
Owner

savq commented Jun 10, 2021

Hey @alxndr, how long have you been using Paq? If you began to use it recently (in the last week or so), you might not need the opt option.

require 'paq-nvim' {
    'savq/paq-nvim';
    -- etc.
}

If you want to keep using paq as optional, make sure you clone it to an opt directory, instead of a start directory:

git clone --depth=1 https://github.com/savq/paq-nvim.git \
    "${XDG_DATA_HOME:-$HOME/.local/share}"/nvim/site/pack/paqs/opt/paq-nvim

@alxndr
Copy link

alxndr commented Jun 10, 2021

@savq ah yes, just began using it yesterday! I'll give that a try, thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants