switched from packer to lazy

This commit is contained in:
2024-04-08 17:11:11 +02:00
parent 4b73b8bbe6
commit 84963d5026
11 changed files with 150 additions and 404 deletions

View File

@@ -0,0 +1 @@
require("barbecue").setup()

1
after/plugin/comment.lua Normal file
View File

@@ -0,0 +1 @@
require("Comment").setup()

2
after/plugin/init.lua Normal file
View File

@@ -0,0 +1,2 @@
print('Test')

View File

@@ -1,2 +1,2 @@
local todo = require('todo-comments') -- local todo = require('todo-comments')
todo.setup() -- todo.setup()

3
init.lua Executable file → Normal file
View File

@@ -1 +1,2 @@
require('409') require("409").setup()

37
lazy-lock.json Normal file
View File

@@ -0,0 +1,37 @@
{
"Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
"LuaSnip": { "branch": "master", "commit": "be7be2ca7f55bb881a7ffc16b2efa5af034ab06b" },
"barbecue.nvim": { "branch": "main", "commit": "cd7e7da622d68136e13721865b4d919efd6325ed" },
"catppuccin": { "branch": "main", "commit": "02bdd749931a5d739063562e57531c118e081882" },
"cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
"cmp-cmdline": { "branch": "main", "commit": "d250c63aa13ead745e3a40f61fdd3470efde3923" },
"cmp-nvim-lsp": { "branch": "main", "commit": "5af77f54de1b16c34b23cba810150689a3a90312" },
"cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "3d8912ebeb56e5ae08ef0906e3a54de1c66b92f1" },
"cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
"cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
"conform.nvim": { "branch": "master", "commit": "9d5ba06d6ee7418c674f498634617416d15b6239" },
"dressing.nvim": { "branch": "master", "commit": "18e5beb3845f085b6a33c24112b37988f3f93c06" },
"flutter-tools.nvim": { "branch": "main", "commit": "4f18033c3b78aa5450e538d81dfbbb3e67aeadec" },
"harpoon": { "branch": "harpoon2", "commit": "da326d0438ac68dee9b6b62a734be940a8bd8405" },
"lazy.nvim": { "branch": "main", "commit": "31ddbea7c10b6920c9077b66c97951ca8682d5c8" },
"lspkind.nvim": { "branch": "master", "commit": "1735dd5a5054c1fb7feaf8e8658dbab925f4f0cf" },
"lualine.nvim": { "branch": "master", "commit": "0a5a66803c7407767b799067986b4dc3036e1983" },
"mason-lspconfig.nvim": { "branch": "main", "commit": "44509689b9bf3984d729cc264aacb31cb7f41668" },
"mason.nvim": { "branch": "main", "commit": "751b1fcbf3d3b783fcf8d48865264a9bcd8f9b10" },
"neogen": { "branch": "main", "commit": "0daffcec249bf42275e322361fe55b89a05ff278" },
"nvim-cmp": { "branch": "main", "commit": "ce16de5665c766f39c271705b17fff06f7bcb84f" },
"nvim-lspconfig": { "branch": "master", "commit": "9619e53d3f99f0ca4ea3b88f5d97fce703131820" },
"nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" },
"nvim-tree-docs": { "branch": "master", "commit": "5db023d783da1e55339e5e25caaf72a59597e626" },
"nvim-treesitter": { "branch": "master", "commit": "11a3584b81c3249d2b6279305aee1c7ad273985a" },
"nvim-ts-context-commentstring": { "branch": "main", "commit": "734ebad31c81c6198dfe102aa23280937c937c42" },
"nvim-web-devicons": { "branch": "master", "commit": "20921d33c605ba24c8d0b76b379a54a9c83ba170" },
"plenary.nvim": { "branch": "master", "commit": "8aad4396840be7fc42896e3011751b7609ca4119" },
"telescope.nvim": { "branch": "master", "commit": "d26b666b45e5dde23332e4bde1227677f2d92e31" },
"todo-comments.nvim": { "branch": "main", "commit": "a7e39ae9e74f2c8c6dc4eea6d40c3971ae84752d" },
"trouble.nvim": { "branch": "main", "commit": "b9cf677f20bb2faa2dacfa870b084e568dca9572" },
"undotree": { "branch": "master", "commit": "aa93a7e5890dbbebbc064cd22260721a6db1a196" },
"vim-fugitive": { "branch": "master", "commit": "dac8e5c2d85926df92672bf2afb4fc48656d96c7" },
"vim-illuminate": { "branch": "master", "commit": "305bf07b919ac526deb5193280379e2f8b599926" },
"vim-tmux-navigator": { "branch": "master", "commit": "38b1d0402c4600543281dc85b3f51884205674b6" }
}

View File

@@ -1,3 +1,10 @@
require('409.remap') local M = {}
require('409.set')
require('409.autocmd') function M.setup()
require("409.set")
require("409.remap")
require("409.lazy")
require("409.autocmd")
end
return M

95
lua/409/lazy.lua Normal file
View File

@@ -0,0 +1,95 @@
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not (vim.uv or vim.loop).fs_stat(lazypath) then
vim.fn.system({
"git",
"clone",
"--filter=blob:none",
"https://github.com/folke/lazy.nvim.git",
"--branch=stable", -- latest stable release
lazypath,
})
end
vim.opt.rtp:prepend(lazypath)
require("lazy").setup({
{ "nvim-lua/plenary.nvim", priority = 100 },
{
"christoomey/vim-tmux-navigator",
lazy = false,
},
{
"nvim-telescope/telescope.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
},
{
"catppuccin/nvim",
name = "catppuccin",
priority = 90
},
{
"nvim-treesitter/nvim-treesitter",
dependencies = {
"nvim-treesitter/nvim-tree-docs",
"JoosepAlviste/nvim-ts-context-commentstring",
}
},
{
"ThePrimeagen/harpoon",
branch = "harpoon2",
dependencies = { "nvim-lua/plenary.nvim" },
},
"onsails/lspkind.nvim",
"mbbill/undotree",
"tpope/vim-fugitive",
{
"nvim-lualine/lualine.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
},
{ "williamboman/mason.nvim" },
"williamboman/mason-lspconfig.nvim",
-- LSP Support
"neovim/nvim-lspconfig",
-- Autocompletion
"hrsh7th/nvim-cmp",
"hrsh7th/cmp-nvim-lsp",
"hrsh7th/cmp-nvim-lsp-signature-help",
"hrsh7th/cmp-nvim-lua",
"hrsh7th/cmp-buffer",
"hrsh7th/cmp-path",
"hrsh7th/cmp-cmdline",
"L3MON4D3/LuaSnip",
"nvim-tree/nvim-web-devicons",
{
"danymat/neogen",
dependencies = { "nvim-treesitter/nvim-treesitter" },
},
{
"folke/todo-comments.nvim",
dependencies = { "nvim-lua/plenary.nvim" },
},
{
"folke/trouble.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
},
{
"stevearc/conform.nvim",
},
{
"akinsho/flutter-tools.nvim",
dependencies = {
"nvim-lua/plenary.nvim",
"stevearc/dressing.nvim", -- optional for vim.ui.select
},
},
"RRethy/vim-illuminate",
"numToStr/Comment.nvim",
{
"utilyre/barbecue.nvim",
version = "*",
dependencies = {
"SmiteshP/nvim-navic",
"nvim-tree/nvim-web-devicons", -- optional dependency
},
},
})

View File

@@ -1,118 +0,0 @@
vim.cmd.packadd("packer.nvim")
return require("packer").startup(function(use)
use("wbthomason/packer.nvim")
use("nvim-lua/plenary.nvim")
use({
"christoomey/vim-tmux-navigator",
lazy = false,
})
use({
"nvim-telescope/telescope.nvim",
requires = { { "nvim-lua/plenary.nvim" } },
})
use({
"catppuccin/nvim",
as = "catppuccin",
})
use("nvim-treesitter/nvim-treesitter", { run = ":TSUpdate" })
use("nvim-treesitter/nvim-tree-docs")
use({
"ThePrimeagen/harpoon",
branch = "harpoon2",
requires = { { "nvim-lua/plenary.nvim" } },
})
use("onsails/lspkind.nvim")
use("mbbill/undotree")
use("tpope/vim-fugitive")
use({
"nvim-lualine/lualine.nvim",
requires = { "nvim-tree/nvim-web-devicons", opt = true },
})
use("williamboman/mason.nvim")
use("williamboman/mason-lspconfig.nvim")
-- LSP Support
use("neovim/nvim-lspconfig")
-- Autocompletion
use("hrsh7th/nvim-cmp")
use("hrsh7th/cmp-nvim-lsp")
use("hrsh7th/cmp-nvim-lsp-signature-help")
use("hrsh7th/cmp-nvim-lua")
use("hrsh7th/cmp-buffer")
use("hrsh7th/cmp-path")
use("hrsh7th/cmp-cmdline")
use("L3MON4D3/LuaSnip")
use("nvim-tree/nvim-web-devicons")
use({
"danymat/neogen",
requires = { "nvim-treesitter/nvim-treesitter" },
})
use({
"folke/todo-comments.nvim",
dependencies = { "nvim-lua/plenary" },
})
use({
"folke/trouble.nvim",
dependencies = { "nvim-tree/nvim-web-devicons" },
})
use({
"stevearc/conform.nvim",
})
use({
"akinsho/flutter-tools.nvim",
requires = {
"nvim-lua/plenary.nvim",
"stevearc/dressing.nvim", -- optional for vim.ui.select
},
})
use("RRethy/vim-illuminate")
use({
"numToStr/Comment.nvim",
config = function()
require("Comment").setup()
end,
})
--[[
use({
"lukas-reineke/headlines.nvim",
after = "nvim-treesitter",
config = function()
require("headlines").setup()
end,
})
]]
use("JoosepAlviste/nvim-ts-context-commentstring")
use({
"utilyre/barbecue.nvim",
tag = "*",
requires = {
"SmiteshP/nvim-navic",
"nvim-tree/nvim-web-devicons", -- optional dependency
},
config = function()
require("barbecue").setup()
end,
})
end)

View File

@@ -1,4 +1,3 @@
vim.g.mapleader = " "
vim.keymap.set("n", "<leader>pv", vim.cmd.Ex) vim.keymap.set("n", "<leader>pv", vim.cmd.Ex)
vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv") vim.keymap.set("v", "J", ":m '>+1<CR>gv=gv")

View File

@@ -1,279 +0,0 @@
-- Automatically generated packer.nvim plugin loader code
if vim.api.nvim_call_function('has', {'nvim-0.5'}) ~= 1 then
vim.api.nvim_command('echohl WarningMsg | echom "Invalid Neovim version for packer.nvim! | echohl None"')
return
end
vim.api.nvim_command('packadd packer.nvim')
local no_errors, error_msg = pcall(function()
_G._packer = _G._packer or {}
_G._packer.inside_compile = true
local time
local profile_info
local should_profile = false
if should_profile then
local hrtime = vim.loop.hrtime
profile_info = {}
time = function(chunk, start)
if start then
profile_info[chunk] = hrtime()
else
profile_info[chunk] = (hrtime() - profile_info[chunk]) / 1e6
end
end
else
time = function(chunk, start) end
end
local function save_profiles(threshold)
local sorted_times = {}
for chunk_name, time_taken in pairs(profile_info) do
sorted_times[#sorted_times + 1] = {chunk_name, time_taken}
end
table.sort(sorted_times, function(a, b) return a[2] > b[2] end)
local results = {}
for i, elem in ipairs(sorted_times) do
if not threshold or threshold and elem[2] > threshold then
results[i] = elem[1] .. ' took ' .. elem[2] .. 'ms'
end
end
if threshold then
table.insert(results, '(Only showing plugins that took longer than ' .. threshold .. ' ms ' .. 'to load)')
end
_G._packer.profile_output = results
end
time([[Luarocks path setup]], true)
local package_path_str = "/home/j409/.cache/nvim/packer_hererocks/2.1.1702233742/share/lua/5.1/?.lua;/home/j409/.cache/nvim/packer_hererocks/2.1.1702233742/share/lua/5.1/?/init.lua;/home/j409/.cache/nvim/packer_hererocks/2.1.1702233742/lib/luarocks/rocks-5.1/?.lua;/home/j409/.cache/nvim/packer_hererocks/2.1.1702233742/lib/luarocks/rocks-5.1/?/init.lua"
local install_cpath_pattern = "/home/j409/.cache/nvim/packer_hererocks/2.1.1702233742/lib/lua/5.1/?.so"
if not string.find(package.path, package_path_str, 1, true) then
package.path = package.path .. ';' .. package_path_str
end
if not string.find(package.cpath, install_cpath_pattern, 1, true) then
package.cpath = package.cpath .. ';' .. install_cpath_pattern
end
time([[Luarocks path setup]], false)
time([[try_loadstring definition]], true)
local function try_loadstring(s, component, name)
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, {})
end)
end
return result
end
time([[try_loadstring definition]], false)
time([[Defining packer_plugins]], true)
_G.packer_plugins = {
["Comment.nvim"] = {
config = { "\27LJ\2\n5\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\fComment\frequire\0" },
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/Comment.nvim",
url = "https://github.com/numToStr/Comment.nvim"
},
LuaSnip = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/LuaSnip",
url = "https://github.com/L3MON4D3/LuaSnip"
},
["barbecue.nvim"] = {
config = { "\27LJ\2\n6\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\rbarbecue\frequire\0" },
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/barbecue.nvim",
url = "https://github.com/utilyre/barbecue.nvim"
},
catppuccin = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/catppuccin",
url = "https://github.com/catppuccin/nvim"
},
["cmp-buffer"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/cmp-buffer",
url = "https://github.com/hrsh7th/cmp-buffer"
},
["cmp-cmdline"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/cmp-cmdline",
url = "https://github.com/hrsh7th/cmp-cmdline"
},
["cmp-nvim-lsp"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp",
url = "https://github.com/hrsh7th/cmp-nvim-lsp"
},
["cmp-nvim-lsp-signature-help"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/cmp-nvim-lsp-signature-help",
url = "https://github.com/hrsh7th/cmp-nvim-lsp-signature-help"
},
["cmp-nvim-lua"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/cmp-nvim-lua",
url = "https://github.com/hrsh7th/cmp-nvim-lua"
},
["cmp-path"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/cmp-path",
url = "https://github.com/hrsh7th/cmp-path"
},
["conform.nvim"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/conform.nvim",
url = "https://github.com/stevearc/conform.nvim"
},
["dressing.nvim"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/dressing.nvim",
url = "https://github.com/stevearc/dressing.nvim"
},
["flutter-tools.nvim"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/flutter-tools.nvim",
url = "https://github.com/akinsho/flutter-tools.nvim"
},
harpoon = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/harpoon",
url = "https://github.com/ThePrimeagen/harpoon"
},
["lspkind.nvim"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/lspkind.nvim",
url = "https://github.com/onsails/lspkind.nvim"
},
["lualine.nvim"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/lualine.nvim",
url = "https://github.com/nvim-lualine/lualine.nvim"
},
["mason-lspconfig.nvim"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/mason-lspconfig.nvim",
url = "https://github.com/williamboman/mason-lspconfig.nvim"
},
["mason.nvim"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/mason.nvim",
url = "https://github.com/williamboman/mason.nvim"
},
neogen = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/neogen",
url = "https://github.com/danymat/neogen"
},
["nvim-cmp"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/nvim-cmp",
url = "https://github.com/hrsh7th/nvim-cmp"
},
["nvim-lspconfig"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/nvim-lspconfig",
url = "https://github.com/neovim/nvim-lspconfig"
},
["nvim-navic"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/nvim-navic",
url = "https://github.com/SmiteshP/nvim-navic"
},
["nvim-tree-docs"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/nvim-tree-docs",
url = "https://github.com/nvim-treesitter/nvim-tree-docs"
},
["nvim-treesitter"] = {
loaded = true,
path = "/home/j409/.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/j409/.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/j409/.local/share/nvim/site/pack/packer/start/nvim-web-devicons",
url = "https://github.com/nvim-tree/nvim-web-devicons"
},
["packer.nvim"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/packer.nvim",
url = "https://github.com/wbthomason/packer.nvim"
},
["plenary.nvim"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/plenary.nvim",
url = "https://github.com/nvim-lua/plenary.nvim"
},
["telescope.nvim"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/telescope.nvim",
url = "https://github.com/nvim-telescope/telescope.nvim"
},
["todo-comments.nvim"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/todo-comments.nvim",
url = "https://github.com/folke/todo-comments.nvim"
},
["trouble.nvim"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/trouble.nvim",
url = "https://github.com/folke/trouble.nvim"
},
undotree = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/undotree",
url = "https://github.com/mbbill/undotree"
},
["vim-fugitive"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/vim-fugitive",
url = "https://github.com/tpope/vim-fugitive"
},
["vim-illuminate"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/vim-illuminate",
url = "https://github.com/RRethy/vim-illuminate"
},
["vim-tmux-navigator"] = {
loaded = true,
path = "/home/j409/.local/share/nvim/site/pack/packer/start/vim-tmux-navigator",
url = "https://github.com/christoomey/vim-tmux-navigator"
}
}
time([[Defining packer_plugins]], false)
-- Config for: Comment.nvim
time([[Config for Comment.nvim]], true)
try_loadstring("\27LJ\2\n5\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\fComment\frequire\0", "config", "Comment.nvim")
time([[Config for Comment.nvim]], false)
-- Config for: barbecue.nvim
time([[Config for barbecue.nvim]], true)
try_loadstring("\27LJ\2\n6\0\0\3\0\3\0\0066\0\0\0'\2\1\0B\0\2\0029\0\2\0B\0\1\1K\0\1\0\nsetup\rbarbecue\frequire\0", "config", "barbecue.nvim")
time([[Config for barbecue.nvim]], false)
_G._packer.inside_compile = false
if _G._packer.needs_bufread == true then
vim.cmd("doautocmd BufRead")
end
_G._packer.needs_bufread = false
if should_profile then save_profiles() end
end)
if not no_errors then
error_msg = error_msg:gsub('"', '\\"')
vim.api.nvim_command('echohl ErrorMsg | echom "Error in packer_compiled: '..error_msg..'" | echom "Please check your config for correctness" | echohl None')
end