Initial convert nvim to use lazy instead of packer
This commit is contained in:
parent
418e0370a5
commit
9784fe15c6
1
.gitignore
vendored
1
.gitignore
vendored
|
@ -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
|
||||||
|
|
8
Makefile
8
Makefile
|
@ -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) $@
|
||||||
|
|
||||||
|
|
|
@ -1,31 +1,37 @@
|
||||||
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")
|
|
||||||
use("stevearc/dressing.nvim")
|
|
||||||
use({
|
|
||||||
"catppuccin/nvim",
|
"catppuccin/nvim",
|
||||||
as = "catppuccin",
|
name = "catppuccin",
|
||||||
config = function()
|
config = function()
|
||||||
require("colours")
|
require("colours")
|
||||||
end,
|
end,
|
||||||
})
|
priority = 1000,
|
||||||
use({
|
},
|
||||||
|
"stevearc/dressing.nvim",
|
||||||
|
{
|
||||||
"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({
|
||||||
|
@ -33,12 +39,11 @@ require("packer").startup({
|
||||||
})
|
})
|
||||||
vim.notify = require("notify")
|
vim.notify = require("notify")
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
use("kyazdani42/nvim-web-devicons")
|
"nvim-lua/plenary.nvim",
|
||||||
use("nvim-lua/plenary.nvim")
|
{
|
||||||
use({
|
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
requires = {
|
dependencies = {
|
||||||
{ "hrsh7th/nvim-cmp" },
|
{ "hrsh7th/nvim-cmp" },
|
||||||
{ "hrsh7th/cmp-nvim-lsp" },
|
{ "hrsh7th/cmp-nvim-lsp" },
|
||||||
{ "hrsh7th/cmp-buffer" },
|
{ "hrsh7th/cmp-buffer" },
|
||||||
|
@ -58,23 +63,23 @@ require("packer").startup({
|
||||||
require("config.lsp")
|
require("config.lsp")
|
||||||
require("config.cmp")
|
require("config.cmp")
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
use({
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
config = function()
|
config = function()
|
||||||
require("config.treesitter")
|
require("config.treesitter")
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
use({
|
{
|
||||||
"lewis6991/gitsigns.nvim",
|
"lewis6991/gitsigns.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("config.gitsigns")
|
require("config.gitsigns")
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
use({
|
{
|
||||||
"nvim-neo-tree/neo-tree.nvim",
|
"nvim-neo-tree/neo-tree.nvim",
|
||||||
branch = "v2.x",
|
branch = "v2.x",
|
||||||
requires = {
|
dependencies = {
|
||||||
"nvim-lua/plenary.nvim",
|
"nvim-lua/plenary.nvim",
|
||||||
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
"nvim-tree/nvim-web-devicons", -- not strictly required, but recommended
|
||||||
"MunifTanjim/nui.nvim",
|
"MunifTanjim/nui.nvim",
|
||||||
|
@ -82,52 +87,44 @@ require("packer").startup({
|
||||||
config = function()
|
config = function()
|
||||||
require("config.neotree")
|
require("config.neotree")
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
use({
|
{
|
||||||
"nvim-telescope/telescope.nvim",
|
"nvim-telescope/telescope.nvim",
|
||||||
branch = "0.1.x",
|
branch = "0.1.x",
|
||||||
requires = {
|
dependencies = {
|
||||||
{ "nvim-lua/plenary.nvim" },
|
{ "nvim-lua/plenary.nvim" },
|
||||||
{
|
{
|
||||||
"nvim-telescope/telescope-fzf-native.nvim",
|
"nvim-telescope/telescope-fzf-native.nvim",
|
||||||
run = "make",
|
build = "make",
|
||||||
},
|
},
|
||||||
},
|
},
|
||||||
config = function()
|
config = function()
|
||||||
require("config.telescope")
|
require("config.telescope")
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
use({
|
{
|
||||||
"folke/trouble.nvim",
|
"folke/trouble.nvim",
|
||||||
requires = "nvim-tree/nvim-web-devicons",
|
dependencies = "nvim-tree/nvim-web-devicons",
|
||||||
config = function()
|
config = function()
|
||||||
require("config.trouble")
|
require("config.trouble")
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
use({
|
{
|
||||||
"lukas-reineke/indent-blankline.nvim",
|
"lukas-reineke/indent-blankline.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("config.indent_blankline")
|
require("config.indent_blankline")
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
use({
|
{
|
||||||
"numToStr/Navigator.nvim",
|
"numToStr/Navigator.nvim",
|
||||||
config = function()
|
config = function()
|
||||||
require("Navigator").setup()
|
require("Navigator").setup()
|
||||||
end,
|
end,
|
||||||
})
|
},
|
||||||
use({
|
{
|
||||||
"klen/nvim-test",
|
"klen/nvim-test",
|
||||||
config = function()
|
config = function()
|
||||||
require("config.nvim-test")
|
require("config.nvim-test")
|
||||||
end,
|
end,
|
||||||
})
|
|
||||||
end,
|
|
||||||
config = {
|
|
||||||
display = {
|
|
||||||
open_fn = function()
|
|
||||||
return require("packer.util").float({ border = "single" })
|
|
||||||
end,
|
|
||||||
},
|
|
||||||
},
|
},
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue