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/nvim/plugin
config/lazygit/state.yml config/lazygit/state.yml
config/tmux/plugins 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_ITEMS := $(wildcard ssh/*)
SSH_TARGETS := $(SSH_ITEMS:ssh/%=$(SSH_DIR)/%) 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_REPO := https://github.com/romkatv/powerlevel10k.git
POWERLEVEL_DIR := $(ZSH_CUSTOM_DIR)/themes/powerlevel10k POWERLEVEL_DIR := $(ZSH_CUSTOM_DIR)/themes/powerlevel10k
ZSH_SYNTAX_REPO := https://github.com/zsh-users/zsh-syntax-highlighting.git 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 for link in $(SSH_TARGETS); do rm "$$link"; done
rmdir $(HOME)/.ssh/sockets 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 list | grep -E "libtmux.*0\.16\.1" > /dev/null ||\
python3 -m pip install --user libtmux==0.16.1 python3 -m pip install --user libtmux==0.16.1
uninstall: uninstall:
rm -rf $(ZSH_DIR) rm -rf $(ZSH_DIR)
rm -rf $(PACKER_DIR)
pacman: pacman:
sort -h pkglist.txt -o pkglist.txt sort -h pkglist.txt -o pkglist.txt
@ -57,9 +54,6 @@ $(SSH_TARGETS): $(SSH_DIR)/%: ssh/%
$(HOME_TARGETS) $(CONFIG_TARGETS) $(ZSH_TARGETS) $(SSH_TARGETS): $(HOME_TARGETS) $(CONFIG_TARGETS) $(ZSH_TARGETS) $(SSH_TARGETS):
ln -s $(PWD)/$? $@ ln -s $(PWD)/$? $@
$(PACKER_DIR):
git clone --depth 1 $(PACKER_REPO) $@
$(POWERLEVEL_DIR): $(ZSH_DIR) $(POWERLEVEL_DIR): $(ZSH_DIR)
git clone --depth 1 $(POWERLEVEL_REPO) $@ git clone --depth 1 $(POWERLEVEL_REPO) $@

View file

@ -1,133 +1,130 @@
vim.cmd([[ -- bootstrap lazy.nvim
augroup packer_user_config local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
autocmd! if not vim.loop.fs_stat(lazypath) then
autocmd BufWritePost plugins.lua source <afile> | PackerCompile vim.fn.system({
augroup end "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 ]]) vim.cmd([[ let g:neo_tree_remove_legacy_commands = 1 ]])
require("packer").startup({ require("lazy").setup({
function(use) "folke/lazy.nvim",
use("wbthomason/packer.nvim") {
use("lewis6991/impatient.nvim") "catppuccin/nvim",
use("stevearc/dressing.nvim") name = "catppuccin",
use({ config = function()
"catppuccin/nvim", require("colours")
as = "catppuccin", end,
config = function() priority = 1000,
require("colours") },
end, "stevearc/dressing.nvim",
}) {
use({ "feline-nvim/feline.nvim",
"feline-nvim/feline.nvim", config = function()
config = function() require("config.feline")
require("config.feline") end,
end, },
}) {
use({ "rcarriga/nvim-notify",
"rcarriga/nvim-notify", config = function()
config = function() require("notify").setup({
require("notify").setup({ background_colour = "#000000",
background_colour = "#000000", })
}) vim.notify = require("notify")
vim.notify = require("notify") end,
end, },
}) "nvim-lua/plenary.nvim",
use("kyazdani42/nvim-web-devicons") {
use("nvim-lua/plenary.nvim") "neovim/nvim-lspconfig",
use({ dependencies = {
"neovim/nvim-lspconfig", { "hrsh7th/nvim-cmp" },
requires = { { "hrsh7th/cmp-nvim-lsp" },
{ "hrsh7th/nvim-cmp" }, { "hrsh7th/cmp-buffer" },
{ "hrsh7th/cmp-nvim-lsp" }, { "hrsh7th/cmp-path" },
{ "hrsh7th/cmp-buffer" }, { "hrsh7th/cmp-cmdline" },
{ "hrsh7th/cmp-path" }, { "f3fora/cmp-spell" },
{ "hrsh7th/cmp-cmdline" }, { "petertriho/cmp-git" },
{ "f3fora/cmp-spell" }, { "Dosx001/cmp-commit" },
{ "petertriho/cmp-git" }, { "kdheepak/cmp-latex-symbols" },
{ "Dosx001/cmp-commit" }, { "L3MON4D3/LuaSnip" },
{ "kdheepak/cmp-latex-symbols" }, { "saadparwaiz1/cmp_luasnip" },
{ "L3MON4D3/LuaSnip" }, { "rafamadriz/friendly-snippets" },
{ "saadparwaiz1/cmp_luasnip" }, { "windwp/nvim-autopairs" },
{ "rafamadriz/friendly-snippets" }, { "jose-elias-alvarez/null-ls.nvim" },
{ "windwp/nvim-autopairs" },
{ "jose-elias-alvarez/null-ls.nvim" },
},
config = function()
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 = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
},
config = function()
require("config.neotree")
end,
})
use({
"nvim-telescope/telescope.nvim",
branch = "0.1.x",
requires = {
{ "nvim-lua/plenary.nvim" },
{
"nvim-telescope/telescope-fzf-native.nvim",
run = "make",
},
},
config = function()
require("config.telescope")
end,
})
use({
"folke/trouble.nvim",
requires = "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,
}, },
config = function()
require("config.lsp")
require("config.cmp")
end,
},
{
"nvim-treesitter/nvim-treesitter",
config = function()
require("config.treesitter")
end,
},
{
"lewis6991/gitsigns.nvim",
config = function()
require("config.gitsigns")
end,
},
{
"nvim-neo-tree/neo-tree.nvim",
branch = "v2.x",
dependencies = {
"nvim-lua/plenary.nvim",
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
"MunifTanjim/nui.nvim",
},
config = function()
require("config.neotree")
end,
},
{
"nvim-telescope/telescope.nvim",
branch = "0.1.x",
dependencies = {
{ "nvim-lua/plenary.nvim" },
{
"nvim-telescope/telescope-fzf-native.nvim",
build = "make",
},
},
config = function()
require("config.telescope")
end,
},
{
"folke/trouble.nvim",
dependencies = "nvim-tree/nvim-web-devicons",
config = function()
require("config.trouble")
end,
},
{
"lukas-reineke/indent-blankline.nvim",
config = function()
require("config.indent_blankline")
end,
},
{
"numToStr/Navigator.nvim",
config = function()
require("Navigator").setup()
end,
},
{
"klen/nvim-test",
config = function()
require("config.nvim-test")
end,
}, },
}) })