chore(nvim): switch to folke/lazy.nvim

main
sudo pacman -Syu 2023-06-17 11:20:37 +07:00
parent 5301438b1d
commit 4458311eb6
1 changed files with 47 additions and 40 deletions

View File

@ -91,16 +91,26 @@ vim.g.copilot_filetypes = {
yaml = true, yaml = true,
} }
-- https://github.com/wbthomason/packer.nvim -- https://github.com/folke/lazy.nvim
require("packer").startup(function() local lazypath = vim.fn.stdpath("data") .. "/lazy/lazy.nvim"
-- Manage itself if not vim.loop.fs_stat(lazypath) then
use("wbthomason/packer.nvim") 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)
require("lazy").setup({
-- https://github.com/junegunn/fzf.vim -- https://github.com/junegunn/fzf.vim
use("junegunn/fzf.vim") "junegunn/fzf.vim",
-- https://github.com/nvim-lualine/lualine.nvim -- https://github.com/nvim-lualine/lualine.nvim
use({ {
"nvim-lualine/lualine.nvim", "nvim-lualine/lualine.nvim",
config = function() config = function()
require("lualine").setup({ require("lualine").setup({
@ -118,10 +128,10 @@ require("packer").startup(function()
-- Disable showmode when use lualine -- Disable showmode when use lualine
vim.opt.showmode = false vim.opt.showmode = false
end, end,
}) },
-- https://github.com/nvim-tree/nvim-tree.lua -- https://github.com/nvim-tree/nvim-tree.lua
use({ {
"nvim-tree/nvim-tree.lua", "nvim-tree/nvim-tree.lua",
config = function() config = function()
require("nvim-tree").setup({ require("nvim-tree").setup({
@ -142,97 +152,94 @@ require("packer").startup(function()
}, },
}) })
end, end,
}) },
-- https://github.com/lukas-reineke/indent-blankline.nvim -- https://github.com/lukas-reineke/indent-blankline.nvim
use({ {
"lukas-reineke/indent-blankline.nvim", "lukas-reineke/indent-blankline.nvim",
config = function() config = function()
require("indent_blankline").setup() require("indent_blankline").setup()
end, end,
}) },
-- https://github.com/airblade/vim-gitgutter -- https://github.com/airblade/vim-gitgutter
use("airblade/vim-gitgutter") "airblade/vim-gitgutter",
-- https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-bracketed.md -- https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-bracketed.md
use({ {
"echasnovski/mini.bracketed", "echasnovski/mini.bracketed",
config = function() config = function()
require("mini.bracketed").setup() require("mini.bracketed").setup()
end, end,
}) },
-- https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-comment.md -- https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-comment.md
use({ {
"echasnovski/mini.comment", "echasnovski/mini.comment",
config = function() config = function()
require("mini.comment").setup({ require("mini.comment").setup({
comment = { suffix = "", options = {} }, comment = { suffix = "", options = {} },
}) })
end, end,
}) },
-- https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-cursorword.md -- https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-cursorword.md
use({ {
"echasnovski/mini.cursorword", "echasnovski/mini.cursorword",
config = function() config = function()
require("mini.cursorword").setup() require("mini.cursorword").setup()
end, end,
}) },
-- https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-surround.md -- https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-surround.md
use({ {
"echasnovski/mini.surround", "echasnovski/mini.surround",
config = function() config = function()
require("mini.surround").setup() require("mini.surround").setup()
end, end,
}) },
-- https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-trailspace.md -- https://github.com/echasnovski/mini.nvim/blob/main/readmes/mini-trailspace.md
use({ {
"echasnovski/mini.trailspace", "echasnovski/mini.trailspace",
config = function() config = function()
require("mini.trailspace").setup() require("mini.trailspace").setup()
end, end,
}) },
-- Colorschemes -- Colorschemes
-- https://github.com/cocopon/iceberg.vim -- https://github.com/cocopon/iceberg.vim
use("cocopon/iceberg.vim") "cocopon/iceberg.vim",
-- https://github.com/projekt0n/github-nvim-theme -- https://github.com/projekt0n/github-nvim-theme
use("projekt0n/github-nvim-theme") "projekt0n/github-nvim-theme",
-- https://github.com/nyoom-engineering/oxocarbon.nvim -- https://github.com/nyoom-engineering/oxocarbon.nvim
use("nyoom-engineering/oxocarbon.nvim") "nyoom-engineering/oxocarbon.nvim",
-- https://github.com/catppuccin/nvim -- https://github.com/catppuccin/nvim
use({ {
"catppuccin/nvim", "catppuccin/nvim",
as = "catppuccin", name = "catppuccin",
config = function() config = function()
require("catppuccin").setup({ require("catppuccin").setup({
flavour = "mocha", flavour = "mocha",
}) })
end, end,
}) },
-- Programming languages -- Programming languages
-- https://github.com/sbdchd/neoformat -- https://github.com/sbdchd/neoformat
use("sbdchd/neoformat") "sbdchd/neoformat",
-- https://github.com/nvim-treesitter/nvim-treesitter -- https://github.com/nvim-treesitter/nvim-treesitter
use({ {
"nvim-treesitter/nvim-treesitter", "nvim-treesitter/nvim-treesitter",
run = function() build = ":TSUpdate",
local ts_update = require("nvim-treesitter.install").update({ with_sync = true }) },
ts_update()
end,
})
-- https://github.com/nvim-treesitter/nvim-treesitter-context -- https://github.com/nvim-treesitter/nvim-treesitter-context
use({ {
"nvim-treesitter/nvim-treesitter-context", "nvim-treesitter/nvim-treesitter-context",
config = function() config = function()
require("treesitter-context").setup({ require("treesitter-context").setup({
@ -240,14 +247,14 @@ require("packer").startup(function()
max_lines = 2, max_lines = 2,
}) })
end, end,
}) },
-- https://github.com/fatih/vim-go -- https://github.com/fatih/vim-go
use("fatih/vim-go") "fatih/vim-go",
-- https://github.com/github/copilot.vim -- https://github.com/github/copilot.vim
use("github/copilot.vim") "github/copilot.vim",
end) })
-- vim.api.nvim_command("colorscheme iceberg") -- vim.api.nvim_command("colorscheme iceberg")
vim.api.nvim_command("colorscheme oxocarbon") vim.api.nvim_command("colorscheme oxocarbon")