wbthomason / packer.nvim

A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config
MIT License
7.9k stars 263 forks source link

PackerSync Issue #597

Open Trid-collab opened 3 years ago

Trid-collab commented 3 years ago

Using latest Neovim nightly along with Packer, : getting the following error while using the PackerSync

image

My packer setup in my init.vim

-- Auto install packer.nvim if not exists local install_path = fn.stdpath('data') .. '/site/pack/packer/opt/packer.nvim' if fn.empty(fn.glob(install_path)) > 0 then execute('!git clone https://github.com/wbthomason/packer.nvim ' .. install_path) end vim.cmd [[packadd packer.nvim]] vim.cmd 'autocmd BufWritePost plugins.lua PackerCompile' -- Auto compile when there are changes in plugins.lua

have this in my plugins.lua file as well use({ "wbthomason/packer.nvim", opt = true })

reference : https://github.com/wbthomason/packer.nvim/issues/589

wbthomason commented 3 years ago

Thanks! Could you please share your plugin config? Or do you mean that you see this issue with packer itself as your only plugin?

Trid-collab commented 3 years ago

Is this what we want. Pardon my ignorance as I am new to this. This is my plugin setup and is not very clean.

return require("packer").startup(function() -- Packer can manage itself as an optional plugin use({ "wbthomason/packer.nvim", opt = true })

use({ "folke/lsp-colors.nvim" }) -- creates missing LSP diagnostics highlight groups for color schemes

use({
    "folke/trouble.nvim",
    requires = "kyazdani42/nvim-web-devicons",
    config = function()
        require("trouble").setup({

        })
    end,
})

-- Development
-- use({ "tpope/vim-dispatch" })
use({ "tpope/vim-fugitive" })
use({ "tpope/vim-surround" })
use({ "tpope/vim-commentary" })
use({ "tpope/vim-rhubarb" })
use({ "tpope/vim-obsession" })
use({ "tpope/vim-abolish" })
-- use({ "tpope/vim-unimpaired" })
use({ "tpope/vim-vinegar" })
use({ "tpope/vim-sleuth" })
use({ "tpope/vim-repeat" })
-- use({ "wellle/targets.vim" })
use({ "kyazdani42/nvim-tree.lua" })
-- use({ "Shougo/deol.nvim" })
-- use({ "easymotion/vim-easymotion" })
use({ "christoomey/vim-tmux-navigator" })
-- use {'itchyny/lightline.vim'}       -- Fancier statusline
-- use({ "liuchengxu/vim-which-key" })
-- use({ "blackCauldron7/surround.nvim" })
-- use({ "ms-jpq/chadtree" })
use({ "folke/which-key.nvim" })
use({ "jremmen/vim-ripgrep" })
use({ "BurntSushi/ripgrep" })

-- use({ "samoshkin/vim-find-files" })
use({ "wincent/scalpel" })
use({ "wincent/ferret" })
-- use({ "mhinz/vim-grepper" })
-- use({ "stefandtw/quickfix-reflector.vim" })

-- use({ "ludovicchabant/vim-gutentags" })
use({ "nikvdp/neomux" })

use({ "ggandor/lightspeed.nvim" })
use({ "andymass/vim-matchup" })

-- use({ "ygm2/rooter.nvim" })

use({ "airblade/vim-rooter" })
-- use({ "ahmedkhalf/project.nvim" })
-- use({ "justinmk/vim-dirvish" })

--fern plugins
-- use({ "lambdalisue/fern.vim" })
-- use({ "lambdalisue/fern-renderer-nerdfont.vim" })
-- use({ "lambdalisue/fern-renderer-devicons.vim" })
-- use({ "lambdalisue/fern-git-status.vim" })
-- use({ "lambdalisue/fern-mapping-mark-children.vim" })
-- use({ "lambdalisue/fern-bookmark.vim" })

use({ "windwp/nvim-autopairs" })
use({ "kyazdani42/nvim-web-devicons" })
-- use {'machakann/vim-sandwich'}
use({ "Yggdroot/indentLine" })
use({ "mhinz/vim-signify" })
use({ "akinsho/nvim-bufferline.lua" })
use({ "mbbill/undotree" }) -- Helps vim undotree

-- use({ "junegunn/fzf" })
-- use({ "junegunn/fzf", run = "./install --bin" })
use({ "junegunn/fzf", run = ":call fzf#install()" })
use({ "junegunn/fzf.vim" })

use({
    "hoob3rt/lualine.nvim",
    requires = { "kyazdani42/nvim-web-devicons", opt = true },
})

-- use {'tami5/sql.nvim'}

use({ "unblevable/quick-scope" })

use({ "gruvbox-community/gruvbox" })
use({ "fenetikm/falcon" })
use({ "folke/tokyonight.nvim" })
-- Telescope
use({ "nvim-lua/plenary.nvim" })
use({ "nvim-lua/popup.nvim" })
use({ "nvim-telescope/telescope.nvim" })
use({ "nvim-telescope/telescope-symbols.nvim" })
use({ "nvim-telescope/telescope-github.nvim" })
use({ "nvim-telescope/telescope-fzf-native.nvim", run = "make" })
-- Project
use({ "nvim-telescope/telescope-project.nvim" })
use({
    "nvim-telescope/telescope-arecibo.nvim",
    rocks = { "openssl", "lua-http-parser" },
})

-- LSP config
use({ "neovim/nvim-lspconfig" })
use({ "kabouzeid/nvim-lspinstall" })

-- Autocomplete plugins
use({
    "hrsh7th/nvim-cmp",
    requires = {
        use({ "hrsh7th/cmp-buffer" }),
        use({ "hrsh7th/cmp-nvim-lsp" }),
        use({ "saadparwaiz1/cmp_luasnip" }),
        use({ "hrsh7th/cmp-path" }),
        use({ "hrsh7th/cmp-calc" }),
        use({ "hrsh7th/cmp-nvim-lua" }),
    },
})
-- Better LSP experience
use({ "glepnir/lspsaga.nvim" })
use({ "onsails/lspkind-nvim" }) -- adds vscode-like pictograms in lsp
use({ "sbdchd/neoformat" })
use({ "p00f/nvim-ts-rainbow" })
use({ "ray-x/lsp_signature.nvim" })
use({ "kevinhwang91/nvim-bqf" }) -- quickfix list fzf sezrch

-- Snippets
use({ "hrsh7th/vim-vsnip" })
-- use({ "SirVer/ultisnips" })
use({ "cstrap/python-snippets" })
use({ "ylcnfrht/vscode-python-snippet-pack" })
use({ "xabikos/vscode-javascript" })

use({ "L3MON4D3/LuaSnip", requires = {
    use({ "rafamadriz/friendly-snippets" }),
} })

-- Better syntax
use({ "nvim-treesitter/nvim-treesitter", run = ":TSUpdate" })
use({ "nvim-treesitter/playground" })

-- for lua development
use({ "folke/lua-dev.nvim" })

end)

wbthomason commented 3 years ago

I think the problem is this:

use({ "L3MON4D3/LuaSnip", requires = {
    use({ "rafamadriz/friendly-snippets" }),
} })

In a requires list, you just provide plugin specs, not calls to use. Try changing this to the following and seeing if you still encounter errors:

use { "L3MON4D3/LuaSnip", requires = { "rafamadriz/friendly-snippets" } }
Trid-collab commented 3 years ago

I have commented out that the issue still persists However, I think I have found the problem. It's the https://github.com/jremmen/vim-ripgrep plugin. It's not being maintained and recently I noticed an error while using it . On raising an issue on the forum I was informed that there was a PR which fixed this issue. But however since the plugin is not actively maintained I need to install the plugins and then do the following:

cd ~/.vim//vim-ripgrep hub checkout https://github.com/jremmen/vim-ripgrep/pull/56

which I was doing after installing after vim-ripgrep plugin using packer. Now I have noticed after I removing it solved the packer sync error which I was receiving . It would be nice to have a solution to this. Perhaps Packer can ignore this giving a more verbose response about ignoring this such cases during update or sync

akinsho commented 3 years ago

@Trid-collab you can just set packer to use that fork of the plugin instead, ie.

use {'new-author/vim-ripgrep', branch = 'pr-branch-name' }