chore(nvim): switch to numToStr/Comment.nvim

This commit is contained in:
Oliver Davies 2021-12-04 01:30:38 +00:00
parent 141e4f7310
commit 2d9f2a995e
3 changed files with 21 additions and 13 deletions

View file

@ -57,7 +57,7 @@ end
time([[Luarocks path setup]], false)
time([[try_loadstring definition]], true)
local function try_loadstring(s, component, name)
local success, result = pcall(loadstring(s))
local success, result = pcall(loadstring(s), name, _G.packer_plugins[name])
if not success then
vim.schedule(function()
vim.api.nvim_notify('packer.nvim: Error running ' .. component .. ' for ' .. name .. ': ' .. result, vim.log.levels.ERROR, {})
@ -69,6 +69,11 @@ end
time([[try_loadstring definition]], false)
time([[Defining packer_plugins]], true)
_G.packer_plugins = {
["Comment.nvim"] = {
loaded = true,
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/Comment.nvim",
url = "https://github.com/numToStr/Comment.nvim"
},
LuaSnip = {
loaded = true,
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/LuaSnip",
@ -134,11 +139,6 @@ _G.packer_plugins = {
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/lspkind-nvim",
url = "https://github.com/onsails/lspkind-nvim"
},
nerdcommenter = {
loaded = true,
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/nerdcommenter",
url = "https://github.com/preservim/nerdcommenter"
},
["nvim-cmp"] = {
loaded = true,
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/nvim-cmp",
@ -159,11 +159,6 @@ _G.packer_plugins = {
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/nvim-treesitter",
url = "https://github.com/nvim-treesitter/nvim-treesitter"
},
["nvim-ts-context-commentstring"] = {
loaded = true,
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/nvim-ts-context-commentstring",
url = "https://github.com/JoosepAlviste/nvim-ts-context-commentstring"
},
["nvim-web-devicons"] = {
loaded = true,
path = "/home/opdavies/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",