Skip to content

Commit 004c226

Browse files
committed
💡 some comments and structure
1 parent cc9c7d8 commit 004c226

File tree

4 files changed

+29
-43
lines changed

4 files changed

+29
-43
lines changed

lua/packer/config/packer.lua

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
-- Description : A use-package inspired plugin manager for Neovim. Uses native packages, supports Luarocks dependencies, written in Lua, allows for expressive config
2+
-- Link : https://github.com/wbthomason/packer.nvim
3+
4+
local M = {
5+
"wbthomason/packer.nvim",
6+
}
7+
8+
return M

lua/packer/config/plenary.lua

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
-- Description : plenary: full; complete; entire; absolute; unqualified. All the lua functions I don't want to write twice.
2+
-- Link : https://github.com/nvim-lua/plenary.nvim
3+
4+
local M = {
5+
"nvim-lua/plenary.nvim",
6+
}
7+
8+
return M

lua/packer/config/popup.lua

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
-- Description : [WIP] An implementation of the Popup API from vim in Neovim. Hope to upstream when complete
2+
-- Link : https://github.com/nvim-lua/popup.nvim
3+
4+
local M = {
5+
"nvim-lua/popup.nvim",
6+
}
7+
8+
return M

lua/packer/plugins.lua

+5-43
Original file line numberDiff line numberDiff line change
@@ -1,49 +1,11 @@
1-
local fn = vim.fn
1+
local packer = require("packer.loader")
22

3-
-- Automatically install packer
4-
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
5-
if fn.empty(fn.glob(install_path)) > 0 then
6-
PACKER_BOOTSTRAP = fn.system({
7-
"git",
8-
"clone",
9-
"--depth",
10-
"1",
11-
"https://github.com/wbthomason/packer.nvim",
12-
install_path,
13-
})
14-
print("Installing packer close and reopen Neovim...")
15-
vim.cmd([[packadd packer.nvim]])
16-
end
17-
18-
-- Autocommand that reloads neovim whenever you save the plugins.lua file
19-
vim.cmd([[
20-
augroup packer_user_config
21-
autocmd!
22-
autocmd BufWritePost plugins.lua source <afile> | PackerSync
23-
augroup end
24-
]])
25-
26-
-- Use a protected call so we don't error out on first use
27-
local status_ok, packer = pcall(require, "packer")
28-
if not status_ok then
29-
return
30-
end
31-
32-
-- Have packer use a popup window
33-
packer.init({
34-
display = {
35-
open_fn = function()
36-
return require("packer.util").float({ border = "rounded" })
37-
end,
38-
},
39-
})
40-
41-
-- Install your plugins here
423
return packer.startup(function(use)
434
-- TODO should put every plugin config inside packer.config file and for every one I should put readme on it
44-
use("wbthomason/packer.nvim")
45-
use("nvim-lua/plenary.nvim")
46-
use("nvim-lua/popup.nvim")
5+
-- fixed until popup plugin
6+
use(require("packer.config.packer"))
7+
use(require("packer.config.plenary"))
8+
use(require("packer.config.popup"))
479
use("tpope/vim-fugitive")
4810
use("yamatsum/nvim-cursorline")
4911
use({ "turbio/bracey.vim", run = "npm install --prefix server" })

0 commit comments

Comments
 (0)