plenary.nvim icon indicating copy to clipboard operation
plenary.nvim copied to clipboard

Failed to install plenary.nvim

Open needlesslygrim opened this issue 3 years ago • 4 comments

I can't install plenary through packer, I've copied the line from the plenary README:

use "nvim-lua/plenary.nvim"

When I try to run PackerInstall however I get the following error:

Errors:
    Cloning into '/home/$USER/.local/share/nvim/site/pack/packer/start/plenary.nvim'...
    remote: Not Found
    fatal: repository 'https://github.com/plenary.nvim.git/' not found

Have I configured something incorrectly?

needlesslygrim avatar Oct 20 '22 06:10 needlesslygrim

Please share your config. I just tested with

require('packer').startup(function(use)
    use 'nvim-lua/plenary.nvim'
end)

And it was able to successfully install plenary.

miversen33 avatar Oct 20 '22 12:10 miversen33

Sorry I forgot to reply to this, I'll upload my nvim configuration

needlesslygrim avatar Nov 03 '22 13:11 needlesslygrim

Here's $XDG_CONFIG_HOME/nvim/init.vim:

set ts=4 sw=4
set guifont=FiraCode:h100
" Important!!
if has('termguicolors')
    set termguicolors
endif
" The configuration options should be placed before `colorscheme sonokai`.
let g:sonokai_style = 'andromeda'
let g:sonokai_better_performance = 1
"colorscheme sonokai`
lua require('plugins')
lua require('feline_one_monokai')

Here's $XDG_CONFIG_HOME/nvim/lua/feline_one_monokai.lua:

local line_ok, feline = pcall(require, "feline")
if not line_ok then
	return
end

local one_monokai = {
	fg = "#abb2bf",
	bg = "#1e2024",
	green = "#98c379",
	yellow = "#e5c07b",
	purple = "#c678dd",
	orange = "#d19a66",
	peanut = "#f6d5a4",
	red = "#e06c75",
	aqua = "#61afef",
	darkblue = "#282c34",
	dark_red = "#f75f5f",
}

local vi_mode_colors = {
	NORMAL = "green",
	OP = "green",
	INSERT = "yellow",
	VISUAL = "purple",
	LINES = "orange",
	BLOCK = "dark_red",
	REPLACE = "red",
	COMMAND = "aqua",
}

local c = {
	vim_mode = {
		provider = {
			name = "vi_mode",
			opts = {
				show_mode_name = true,
				-- padding = "center", -- Uncomment for extra padding.
			},
		},
		hl = function()
			return {
				fg = require("feline.providers.vi_mode").get_mode_color(),
				bg = "darkblue",
				style = "bold",
				name = "NeovimModeHLColor",
			}
		end,
		left_sep = "block",
		right_sep = "block",
	},
	gitBranch = {
		provider = "git_branch",
		hl = {
			fg = "peanut",
			bg = "darkblue",
			style = "bold",
		},
		left_sep = "block",
		right_sep = "block",
	},
	gitDiffAdded = {
		provider = "git_diff_added",
		hl = {
			fg = "green",
			bg = "darkblue",
		},
		left_sep = "block",
		right_sep = "block",
	},
	gitDiffRemoved = {
		provider = "git_diff_removed",
		hl = {
			fg = "red",
			bg = "darkblue",
		},
		left_sep = "block",
		right_sep = "block",
	},
	gitDiffChanged = {
		provider = "git_diff_changed",
		hl = {
			fg = "fg",
			bg = "darkblue",
		},
		left_sep = "block",
		right_sep = "right_filled",
	},
	separator = {
		provider = "",
	},
	fileinfo = {
		provider = {
			name = "file_info",
			opts = {
				type = "relative-short",
			},
		},
		hl = {
			style = "bold",
		},
		left_sep = " ",
		right_sep = " ",
	},
	diagnostic_errors = {
		provider = "diagnostic_errors",
		hl = {
			fg = "red",
		},
	},
	diagnostic_warnings = {
		provider = "diagnostic_warnings",
		hl = {
			fg = "yellow",
		},
	},
	diagnostic_hints = {
		provider = "diagnostic_hints",
		hl = {
			fg = "aqua",
		},
	},
	diagnostic_info = {
		provider = "diagnostic_info",
	},
	lsp_client_names = {
		provider = "lsp_client_names",
		hl = {
			fg = "purple",
			bg = "darkblue",
			style = "bold",
		},
		left_sep = "left_filled",
		right_sep = "block",
	},
	file_type = {
		provider = {
			name = "file_type",
			opts = {
				filetype_icon = true,
				case = "titlecase",
			},
		},
		hl = {
			fg = "red",
			bg = "darkblue",
			style = "bold",
		},
		left_sep = "block",
		right_sep = "block",
	},
	file_encoding = {
		provider = "file_encoding",
		hl = {
			fg = "orange",
			bg = "darkblue",
			style = "italic",
		},
		left_sep = "block",
		right_sep = "block",
	},
	position = {
		provider = "position",
		hl = {
			fg = "green",
			bg = "darkblue",
			style = "bold",
		},
		left_sep = "block",
		right_sep = "block",
	},
	line_percentage = {
		provider = "line_percentage",
		hl = {
			fg = "aqua",
			bg = "darkblue",
			style = "bold",
		},
		left_sep = "block",
		right_sep = "block",
	},
	scroll_bar = {
		provider = "scroll_bar",
		hl = {
			fg = "yellow",
			style = "bold",
		},
	},
}

local left = {
	c.vim_mode,
	c.gitBranch,
	c.gitDiffAdded,
  c.gitDiffRemoved,
	c.gitDiffChanged,
	c.separator,
}

local middle = {
	c.fileinfo,
	c.diagnostic_errors,
	c.diagnostic_warnings,
	c.diagnostic_info,
	c.diagnostic_hints,
}

local right = {
	c.lsp_client_names,
	c.file_type,
	c.file_encoding,
	c.position,
	c.line_percentage,
	c.scroll_bar,
}

local components = {
	active = {
		left,
		middle,
		right,
	},
	inactive = {
		left,
		middle,
		right,
	},
}

feline.setup({
	components = components,
	theme = one_monokai,
	vi_mode_colors = vi_mode_colors,
})
local ctp_feline = require('catppuccin.groups.integrations.feline')

ctp_feline.setup()

require("feline").setup({
	components = ctp_feline.get(),
})

Here's $XDG_CONFIG_HOME/nvim/lua/plugins.lua:

-- This file can be loaded by calling `lua require('plugins')` from your init.vim

-- Only required if you have packer configured as `opt`
vim.cmd [[packadd packer.nvim]]

return require('packer').startup(function(use)
	use 'nvim-tree/nvim-web-devicons'
	use 'feline-nvim/feline.nvim'
	use {
	"catppuccin/nvim",
	as = "catppuccin",
	config = function()
		vim.g.catppuccin_flavour = "frappe" -- latte, frappe, macchiato, mocha
		require("catppuccin").setup()
		vim.api.nvim_command "colorscheme catppuccin"
	end
	}
	use "nvim-lua/plenary.nvim"
	
	use "MunifTanjim/nui.nvim"
	use "arsham/arshlib.nvim",

	use "rebelot/heirline.nvim"
	use "j-hui/fidget.nvim"
	use 'nanotee/sqls.nvim'
	use({
	"arsham/arshamiser.nvim",
	config = function()
		-- ignore any parts you don't want to use
		vim.cmd.colorscheme("arshamiser_light")
		require("arshamiser.feliniser")
		-- or:
		-- require("arshamiser.heirliniser")

		_G.custom_foldtext = require("arshamiser.folding").foldtext
		vim.opt.foldtext = "v:lua.custom_foldtext()"
		-- if you want to draw a tabline:
		vim.api.nvim_set_option("tabline", [[%{%v:lua.require("arshamiser.tabline").draw()%}]])
	end,
})
end)

needlesslygrim avatar Nov 03 '22 14:11 needlesslygrim

That is quite a bit of stuff and I honestly dont feel like picking through a custom config. Please try recreating your issue with a minimal configuration. Something like below

lua <<EOF
vim.cmd [[packadd packer.nvim]]
require('packer').startup(function(use)
    use "nvim-lua/plenary.nvim"
end)
EOF

To test, do the following

  • Save your minimal configuration somewhere (for this example, lets say /tmp/minimal.lua)
  • Run it with the following command
$ nvim --clean -u /tmp/minimal.lua

Report your results of this minimal attempt.

miversen33 avatar Nov 04 '22 14:11 miversen33