Initial convert nvim to use lazy instead of packer

This commit is contained in:
Evie Litherland-Smith 2023-02-17 08:51:09 +00:00
parent 418e0370a5
commit 9784fe15c6
3 changed files with 126 additions and 134 deletions

1
.gitignore vendored
View file

@ -5,3 +5,4 @@
config/nvim/plugin
config/lazygit/state.yml
config/tmux/plugins
config/nvim/lazy-lock.json

View file

@ -14,8 +14,6 @@ ZSH_TARGETS := $(ZSH_ITEMS:ohmyzsh/%.zsh=$(ZSH_CUSTOM_DIR)/%.zsh)
SSH_ITEMS := $(wildcard ssh/*)
SSH_TARGETS := $(SSH_ITEMS:ssh/%=$(SSH_DIR)/%)
PACKER_REPO := https://github.com/wbthomason/packer.nvim
PACKER_DIR := $(HOME)/.local/share/nvim/site/pack/packer/start/packer.nvim
POWERLEVEL_REPO := https://github.com/romkatv/powerlevel10k.git
POWERLEVEL_DIR := $(ZSH_CUSTOM_DIR)/themes/powerlevel10k
ZSH_SYNTAX_REPO := https://github.com/zsh-users/zsh-syntax-highlighting.git
@ -37,13 +35,12 @@ unlink:
for link in $(SSH_TARGETS); do rm "$$link"; done
rmdir $(HOME)/.ssh/sockets
install: $(ZSH_DIR) $(POWERLEVEL_DIR) $(ZSH_SYNTAX_DIR) $(ZSH_TARGETS) $(PACKER_DIR) $(TPM_DIR)
install: $(ZSH_DIR) $(POWERLEVEL_DIR) $(ZSH_SYNTAX_DIR) $(ZSH_TARGETS) $(TPM_DIR)
python3 -m pip list | grep -E "libtmux.*0\.16\.1" > /dev/null ||\
python3 -m pip install --user libtmux==0.16.1
uninstall:
rm -rf $(ZSH_DIR)
rm -rf $(PACKER_DIR)
pacman:
sort -h pkglist.txt -o pkglist.txt
@ -57,9 +54,6 @@ $(SSH_TARGETS): $(SSH_DIR)/%: ssh/%
$(HOME_TARGETS) $(CONFIG_TARGETS) $(ZSH_TARGETS) $(SSH_TARGETS):
ln -s $(PWD)/$? $@
$(PACKER_DIR):
git clone --depth 1 $(PACKER_REPO) $@
$(POWERLEVEL_DIR): $(ZSH_DIR)
git clone --depth 1 $(POWERLEVEL_REPO) $@

View file

@ -1,31 +1,37 @@
vim.cmd([[
augroup packer_user_config
autocmd!
autocmd BufWritePost plugins.lua source <afile> | PackerCompile
augroup end
]])
-- bootstrap lazy.nvim
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
if not 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)
vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
require("packer").startup({
function(use)
use("wbthomason/packer.nvim")
use("lewis6991/impatient.nvim")
use("stevearc/dressing.nvim")
use({
require("lazy").setup({
"folke/lazy.nvim",
{
"catppuccin/nvim",
as = "catppuccin",
name = "catppuccin",
config = function()
require("colours")
end,
})
use({
priority = 1000,
},
"stevearc/dressing.nvim",
{
"feline-nvim/feline.nvim",
config = function()
require("config.feline")
end,
})
use({
},
{
"rcarriga/nvim-notify",
config = function()
require("notify").setup({
@ -33,12 +39,11 @@ require("packer").startup({
})
vim.notify = require("notify")
end,
})
use("kyazdani42/nvim-web-devicons")
use("nvim-lua/plenary.nvim")
use({
},
"nvim-lua/plenary.nvim",
{
"neovim/nvim-lspconfig",
requires = {
dependencies = {
{ "hrsh7th/nvim-cmp" },
{ "hrsh7th/cmp-nvim-lsp" },
{ "hrsh7th/cmp-buffer" },
@ -58,23 +63,23 @@ require("packer").startup({
require("config.lsp")
require("config.cmp")
end,
})
use({
},
{
"nvim-treesitter/nvim-treesitter",
config = function()
require("config.treesitter")
end,
})
use({
},
{
"lewis6991/gitsigns.nvim",
config = function()
require("config.gitsigns")
end,
})
use({
},
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v2.x",
requires = {
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
@ -82,52 +87,44 @@ require("packer").startup({
config = function()
require("config.neotree")
end,
})
use({
},
{
"nvim-telescope/telescope.nvim",
branch = "0.1.x",
requires = {
dependencies = {
{ "nvim-lua/plenary.nvim" },
{
"nvim-telescope/telescope-fzf-native.nvim",
run = "make",
build = "make",
},
},
config = function()
require("config.telescope")
end,
})
use({
},
{
"folke/trouble.nvim",
requires = "nvim-tree/nvim-web-devicons",
dependencies = "nvim-tree/nvim-web-devicons",
config = function()
require("config.trouble")
end,
})
use({
},
{
"lukas-reineke/indent-blankline.nvim",
config = function()
require("config.indent_blankline")
end,
})
use({
},
{
"numToStr/Navigator.nvim",
config = function()
require("Navigator").setup()
end,
})
use({
},
{
"klen/nvim-test",
config = function()
require("config.nvim-test")
end,
})
end,
config = {
display = {
open_fn = function()
return require("packer.util").float({ border = "single" })
end,
},
},
})