diff --git a/.gitignore b/.gitignore index f7db4a7..342f63f 100644 --- a/.gitignore +++ b/.gitignore @@ -2,4 +2,4 @@ cli/.config/zsh/env.zsh cli/.config/zsh/local.zsh cli/.config/fish/conf.d/local.fish cli/.config/fish/fish_variables -cli/.config/nvim/plugin/packer_compiled.lua +cli/.config/nvim/lazy-lock.json diff --git a/cli/.config/nvim/lua/packer_init.lua b/cli/.config/nvim/lua/packer_init.lua deleted file mode 100644 index 9552f8e..0000000 --- a/cli/.config/nvim/lua/packer_init.lua +++ /dev/null @@ -1,23 +0,0 @@ -local packer_init = {} - -packer_init.init = function(plugins) - local ensure_packer = function() - local install_path = vim.fn.stdpath('data')..'/site/pack/packer/start/packer.nvim' - if vim.fn.empty(vim.fn.glob(install_path)) > 0 then - vim.fn.system {'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path} - vim.cmd [[packadd packer.nvim]] - return true - end - return false - end - - local packer_bootstrap = ensure_packer() - require('packer').startup(plugins) - if packer_bootstrap then - require('packer').sync() - return true - end - return false -end - -return packer_init diff --git a/cli/.config/nvim/lua/plugins.lua b/cli/.config/nvim/lua/plugins.lua index 259cd4a..5a33d9f 100644 --- a/cli/.config/nvim/lua/plugins.lua +++ b/cli/.config/nvim/lua/plugins.lua @@ -1,28 +1,34 @@ --- [[ plugins list ]] -local function plugins(use) - use 'wbthomason/packer.nvim' - - use { - 'lifepillar/vim-solarized8', - branch = 'neovim' - } - use 'lifepillar/vim-cheat40' - use 'hashivim/vim-terraform' - use 'khaveesh/vim-fish-syntax' - use 'lewis6991/gitsigns.nvim' - use 'tpope/vim-rsi' - use 'tpope/vim-vinegar' - use { - 'nvim-telescope/telescope.nvim', - requires = 'nvim-lua/plenary.nvim' - } - use { - 'w0rp/ale', - ft = { 'bash', 'sh', 'zsh', 'lua', 'python' }, - cmd = 'ALEEnable' +-- [[ plugins bootstrap ]] +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", lazypath } end -if require('packer_init').init(plugins) then return end +vim.opt.rtp:prepend(lazypath) + +--[[ plugins list ]] +require('lazy').setup { + {'lifepillar/vim-solarized8', branch = 'neovim'}, + 'lewis6991/gitsigns.nvim', + 'lifepillar/vim-cheat40', + 'hashivim/vim-terraform', + 'khaveesh/vim-fish-syntax', + 'lewis6991/gitsigns.nvim', + 'tpope/vim-rsi', + 'tpope/vim-vinegar', + { + 'nvim-telescope/telescope.nvim', + dependencies = {'nvim-lua/plenary.nvim'} + }, + { + 'w0rp/ale', + cmd = 'ALEEnable', + ft = {'bash', 'sh', 'zsh', 'lua', 'python'} + } +} --[[ plugin configs and maps ]] require('gitsigns').setup()