aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGabriel A. Giovanini <g.giovanini@gridx.de>2024-07-31 11:15:52 +0200
committerGabriel A. Giovanini <g.giovanini@gridx.de>2024-07-31 11:15:52 +0200
commite5266e16333da78937e853638e2ae87089a39c4a (patch)
tree83b4d31ff420aa216d48cd8d17a1a0e25ee9780f
parent4b3b73416cf95c42a0fc16d6530baa4ca75bd1db (diff)
downloadgabrielgio.lua-e5266e16333da78937e853638e2ae87089a39c4a.tar.gz
gabrielgio.lua-e5266e16333da78937e853638e2ae87089a39c4a.tar.bz2
gabrielgio.lua-e5266e16333da78937e853638e2ae87089a39c4a.zip
feat: Move from packer to mini.deps
-rw-r--r--init.lua34
-rw-r--r--lua/gabrielgio/init.lua28
2 files changed, 42 insertions, 20 deletions
diff --git a/init.lua b/init.lua
index d06a37f..c4df3b3 100644
--- a/init.lua
+++ b/init.lua
@@ -1,7 +1,22 @@
-local packer = require("packer")
+local path_package = vim.fn.stdpath('data') .. '/site/'
+local mini_path = path_package .. 'pack/deps/start/mini.nvim'
+if not vim.loop.fs_stat(mini_path) then
+ vim.cmd('echo "Installing `mini.nvim`" | redraw')
+ local clone_cmd = {
+ 'git', 'clone', '--filter=blob:none',
+ 'https://github.com/echasnovski/mini.nvim', mini_path
+ }
+ vim.fn.system(clone_cmd)
+ vim.cmd('packadd mini.nvim | helptags ALL')
+ vim.cmd('echo "Installed `mini.nvim`" | redraw')
+end
+
+local mini_deps = require('mini.deps')
+local add = mini_deps.add
+
+mini_deps.setup({ path = { package = path_package } })
local pkgs = {
- "wbthomason/packer.nvim", -- packer manager
"folke/trouble.nvim", -- diagnostics
"mfussenegger/nvim-dap", -- add dap support
"leoluz/nvim-dap-go", -- add some utilites to go
@@ -22,13 +37,16 @@ local pkgs = {
"neovim/nvim-lspconfig", -- lsp support
}
-local function startup(use)
- use("nvim-treesitter/nvim-treesitter", {run = ":TSUpdate"})
- use("fatih/vim-go", {run = ":GoUpdateBinaries"})
- for _, value in ipairs(pkgs) do use(value) end
-end
+add({
+ source = "nvim-treesitter/nvim-treesitter",
+ hooks = { post_checkout = function() vim.cmd('TSUpdate') end },
+})
+add({
+ source = "fatih/vim-go",
+ hooks = { post_checkout = function() vim.cmd('GoUpdateBinaries') end },
+})
+for _, value in ipairs(pkgs) do add({source = value}) end
-packer.startup(startup)
local neogit = require("neogit")
local null_ls = require("null-ls")
diff --git a/lua/gabrielgio/init.lua b/lua/gabrielgio/init.lua
index a00b425..590aa13 100644
--- a/lua/gabrielgio/init.lua
+++ b/lua/gabrielgio/init.lua
@@ -1,12 +1,16 @@
-require("gabrielgio.lsp")
-require("gabrielgio.settable")
-require("gabrielgio.mini")
-require("gabrielgio.go")
-require("gabrielgio.telescope")
-require("gabrielgio.treesitter")
-require("gabrielgio.undotree")
-require("gabrielgio.so")
-require("gabrielgio.trouble")
-require("gabrielgio.dap")
-require("gabrielgio.term")
-require("gabrielgio.neovide")
+local mini_deps = require('mini.deps')
+local now, later = mini_deps.now, mini_deps.later
+
+now(function() require("gabrielgio.settable") end)
+now(function() require("gabrielgio.treesitter") end)
+
+later(function() require("gabrielgio.lsp") end)
+later(function() require("gabrielgio.mini") end)
+later(function() require("gabrielgio.go") end)
+later(function() require("gabrielgio.telescope") end)
+later(function() require("gabrielgio.undotree") end)
+later(function() require("gabrielgio.so") end)
+later(function() require("gabrielgio.trouble") end)
+later(function() require("gabrielgio.dap") end)
+later(function() require("gabrielgio.term") end)
+later(function() require("gabrielgio.neovide") end)