fix: replace packer with lazy.nvim
This commit is contained in:
parent
7c27190ae4
commit
f1046c2a1f
5 changed files with 74 additions and 53 deletions
19
.helpers/lazy.nvim
Executable file
19
.helpers/lazy.nvim
Executable file
|
@ -0,0 +1,19 @@
|
||||||
|
#!/usr/bin/env bash
|
||||||
|
|
||||||
|
set -o errexit
|
||||||
|
set -o nounset
|
||||||
|
set -o pipefail
|
||||||
|
|
||||||
|
LAZY_NVIM_SOURCE="https://github.com/folke/lazy.nvim.git"
|
||||||
|
LAZY_NVIM_DESTINATION="${XDG_DATA_HOME}/nvim/lazy/lazy.nvim"
|
||||||
|
LAZY_STATE_DIR="${XDG_STATE_HOME}/nvim/lazy"
|
||||||
|
|
||||||
|
mkdir -p ${LAZY_STATE_DIR}
|
||||||
|
|
||||||
|
if [ -d ${LAZY_NVIM_DESTINATION}/.git ]; then
|
||||||
|
echo "INFO: lazy.nvim is already installed"
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
|
echo "INFO: Cloning ${LAZY_NVIM_SOURCE} to ${LAZY_NVIM_DESTINATION}..."
|
||||||
|
git clone --filter=blob:none --single-branch ${LAZY_NVIM_SOURCE} ${LAZY_NVIM_DESTINATION}
|
|
@ -1,14 +0,0 @@
|
||||||
#!/usr/bin/env bash
|
|
||||||
|
|
||||||
set -euo pipefail
|
|
||||||
|
|
||||||
PACKER_NVIM_SOURCE="https://github.com/wbthomason/packer.nvim"
|
|
||||||
PACKER_NVIM_DESTINATION="${XDG_DATA_HOME}/nvim/site/pack/packer/start/packer.nvim"
|
|
||||||
|
|
||||||
if [ -d ${PACKER_NVIM_DESTINATION}/.git ]; then
|
|
||||||
echo "INFO: packer.nvim is already installed."
|
|
||||||
exit 0
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo "INFO: Cloning ${PACKER_NVIM_SOURCE} to ${PACKER_NVIM_DESTINATION}..."
|
|
||||||
git clone --depth=1 ${PACKER_NVIM_SOURCE} ${PACKER_NVIM_DESTINATION}
|
|
4
Makefile
4
Makefile
|
@ -9,8 +9,8 @@ update:
|
||||||
clean: backup
|
clean: backup
|
||||||
@bash ./.helpers/config clean
|
@bash ./.helpers/config clean
|
||||||
|
|
||||||
install_packer:
|
install_lazy:
|
||||||
@bash ./.helpers/nvim-packer
|
@bash ./.helpers/lazy.nvim
|
||||||
|
|
||||||
package:
|
package:
|
||||||
@bash ./.helpers/config package
|
@bash ./.helpers/config package
|
||||||
|
|
|
@ -35,11 +35,6 @@ set.encoding = "utf-8"
|
||||||
set.fileencoding = "utf-8"
|
set.fileencoding = "utf-8"
|
||||||
set.fileencodings = "utf-8"
|
set.fileencodings = "utf-8"
|
||||||
|
|
||||||
-- Colour scheme
|
|
||||||
set.termguicolors = true
|
|
||||||
set.background = "dark"
|
|
||||||
cmd "colorscheme tokyonight-night"
|
|
||||||
|
|
||||||
-- UI and UX
|
-- UI and UX
|
||||||
set.number = true -- enable line numbers
|
set.number = true -- enable line numbers
|
||||||
set.relativenumber = true -- enable relative line numbers
|
set.relativenumber = true -- enable relative line numbers
|
||||||
|
|
|
@ -1,45 +1,66 @@
|
||||||
return require("packer").startup(function(use)
|
local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
|
||||||
-- Packer can manage itself
|
local set = vim.opt
|
||||||
use {
|
local cmd = vim.cmd
|
||||||
"wbthomason/packer.nvim",
|
|
||||||
commit = "1d0cf98a561f7fd654c970c49f917d74fafe1530", -- 2023-01-11
|
|
||||||
}
|
|
||||||
|
|
||||||
use {
|
vim.opt.runtimepath:prepend(lazypath)
|
||||||
|
|
||||||
|
local plugins = {
|
||||||
|
{
|
||||||
"folke/tokyonight.nvim",
|
"folke/tokyonight.nvim",
|
||||||
tag = "v1.10.0", -- 2023-03-23
|
tag = "v1.10.0", -- 2023-03-23
|
||||||
config = require("plugins.config.tokyonight"),
|
priority = 1000,
|
||||||
}
|
config = function()
|
||||||
|
require("plugins.config.tokyonight")
|
||||||
use {
|
set.termguicolors = true
|
||||||
|
set.background = "dark"
|
||||||
|
cmd "colorscheme tokyonight-night"
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
"neovim/nvim-lspconfig",
|
"neovim/nvim-lspconfig",
|
||||||
commit = "10fa01d553ce10646350461ac5ddc71f189e9d1a", -- 2023-04-10
|
commit = "10fa01d553ce10646350461ac5ddc71f189e9d1a", -- 2023-04-10
|
||||||
config = require("plugins.config.lsp"),
|
config = function()
|
||||||
}
|
require("plugins.config.lsp")
|
||||||
|
end,
|
||||||
use {
|
},
|
||||||
|
{
|
||||||
"nvim-treesitter/nvim-treesitter",
|
"nvim-treesitter/nvim-treesitter",
|
||||||
commit = "cc360a9beb1b30d172438f640e2c3450358c4086", -- 2023-04-10
|
commit = "cc360a9beb1b30d172438f640e2c3450358c4086", -- 2023-04-10
|
||||||
config = require("plugins.config.treesitter"),
|
config = function()
|
||||||
run = ":TSUpdate",
|
require("plugins.config.treesitter")
|
||||||
}
|
end,
|
||||||
|
build = function()
|
||||||
use {
|
require("nvim-treesitter.install").update({ with_sync = true })
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
"nvim-tree/nvim-web-devicons",
|
"nvim-tree/nvim-web-devicons",
|
||||||
commit = "f16ec8f6e5d23e4349501dae46e0a661918e086e", -- 2023-04-08
|
commit = "f16ec8f6e5d23e4349501dae46e0a661918e086e", -- 2023-04-08
|
||||||
}
|
},
|
||||||
|
{
|
||||||
use {
|
|
||||||
"akinsho/bufferline.nvim",
|
"akinsho/bufferline.nvim",
|
||||||
tag = "v3.6.0", -- 2023.03.30
|
tag = "v3.6.0", -- 2023.03.30
|
||||||
requires = "nvim-tree/nvim-web-devicons",
|
dependencies = {
|
||||||
config = require("plugins.config.bufferline"),
|
"nvim-tree/nvim-web-devicons",
|
||||||
}
|
},
|
||||||
|
config = function()
|
||||||
use {
|
require("plugins.config.bufferline")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
{
|
||||||
"is0n/tui-nvim",
|
"is0n/tui-nvim",
|
||||||
commit = "2eeff3ac921f53bdb837d23d6e4501d97807994c", -- 2022.05.07
|
commit = "2eeff3ac921f53bdb837d23d6e4501d97807994c", -- 2022.05.07
|
||||||
config = require("plugins.config.tui_nvim"),
|
config = function()
|
||||||
}
|
require("plugins.config.tui_nvim")
|
||||||
|
end,
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
end)
|
require("lazy").setup(plugins, {
|
||||||
|
lockfile = vim.fn.stdpath("state") .. "/lazy/lock.json",
|
||||||
|
performance = {
|
||||||
|
cache = {
|
||||||
|
enabled = true,
|
||||||
|
}
|
||||||
|
}
|
||||||
|
})
|
||||||
|
|
Loading…
Reference in a new issue