diff --git a/.gitignore b/.gitignore index c7030422..393a7cdd 100644 --- a/.gitignore +++ b/.gitignore @@ -5,3 +5,4 @@ config/nvim/plugin config/lazygit/state.yml config/tmux/plugins +config/nvim/lazy-lock.json diff --git a/Makefile b/Makefile index 0e4c4762..7524e2dc 100644 --- a/Makefile +++ b/Makefile @@ -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) $@ diff --git a/config/nvim/lua/plugins.lua b/config/nvim/lua/plugins.lua index b82d9ddc..c7576559 100644 --- a/config/nvim/lua/plugins.lua +++ b/config/nvim/lua/plugins.lua @@ -1,133 +1,130 @@ -vim.cmd([[ - augroup packer_user_config - autocmd! - autocmd BufWritePost plugins.lua source | 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({ - "catppuccin/nvim", - as = "catppuccin", - config = function() - require("colours") - end, - }) - use({ - "feline-nvim/feline.nvim", - config = function() - require("config.feline") - end, - }) - use({ - "rcarriga/nvim-notify", - config = function() - require("notify").setup({ - background_colour = "#000000", - }) - vim.notify = require("notify") - end, - }) - use("kyazdani42/nvim-web-devicons") - use("nvim-lua/plenary.nvim") - use({ - "neovim/nvim-lspconfig", - requires = { - { "hrsh7th/nvim-cmp" }, - { "hrsh7th/cmp-nvim-lsp" }, - { "hrsh7th/cmp-buffer" }, - { "hrsh7th/cmp-path" }, - { "hrsh7th/cmp-cmdline" }, - { "f3fora/cmp-spell" }, - { "petertriho/cmp-git" }, - { "Dosx001/cmp-commit" }, - { "kdheepak/cmp-latex-symbols" }, - { "L3MON4D3/LuaSnip" }, - { "saadparwaiz1/cmp_luasnip" }, - { "rafamadriz/friendly-snippets" }, - { "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, +require("lazy").setup({ + "folke/lazy.nvim", + { + "catppuccin/nvim", + name = "catppuccin", + config = function() + require("colours") + end, + priority = 1000, + }, + "stevearc/dressing.nvim", + { + "feline-nvim/feline.nvim", + config = function() + require("config.feline") + end, + }, + { + "rcarriga/nvim-notify", + config = function() + require("notify").setup({ + background_colour = "#000000", + }) + vim.notify = require("notify") + end, + }, + "nvim-lua/plenary.nvim", + { + "neovim/nvim-lspconfig", + dependencies = { + { "hrsh7th/nvim-cmp" }, + { "hrsh7th/cmp-nvim-lsp" }, + { "hrsh7th/cmp-buffer" }, + { "hrsh7th/cmp-path" }, + { "hrsh7th/cmp-cmdline" }, + { "f3fora/cmp-spell" }, + { "petertriho/cmp-git" }, + { "Dosx001/cmp-commit" }, + { "kdheepak/cmp-latex-symbols" }, + { "L3MON4D3/LuaSnip" }, + { "saadparwaiz1/cmp_luasnip" }, + { "rafamadriz/friendly-snippets" }, + { "windwp/nvim-autopairs" }, + { "jose-elias-alvarez/null-ls.nvim" }, }, + 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, }, })