95 lines
2.6 KiB
Lua
95 lines
2.6 KiB
Lua
-- Plugin management via built-in vim.pack (Neovim 0.12+)
|
|
-- Lockfile: nvim-pack-lock.json (commit it). Update: :lua vim.pack.update()
|
|
-- Treesitter parsers are updated manually with :TSUpdate
|
|
|
|
local gh = function(repo) return "https://github.com/" .. repo end
|
|
|
|
-- Build hooks. Must be registered BEFORE vim.pack.add()
|
|
vim.api.nvim_create_autocmd("PackChanged", {
|
|
callback = function(ev)
|
|
local data = ev.data
|
|
if data.spec.name == "markdown-preview.nvim" and data.kind ~= "delete" then
|
|
-- Downloads the pre-built preview server
|
|
local cmd = vim.fn.has("win32") == 1 and { "cmd.exe", "/c", "install.cmd" } or { "./install.sh" }
|
|
vim.system(cmd, { cwd = data.path .. "/app" }):wait()
|
|
end
|
|
end,
|
|
})
|
|
|
|
-- Used by which-key
|
|
vim.o.timeout = true
|
|
vim.o.timeoutlen = 500
|
|
|
|
vim.pack.add({
|
|
-- Libraries
|
|
gh("nvim-lua/plenary.nvim"),
|
|
gh("nvim-tree/nvim-web-devicons"),
|
|
gh("echasnovski/mini.icons"),
|
|
|
|
-- Colorschemes
|
|
gh("folke/tokyonight.nvim"),
|
|
gh("ellisonleao/gruvbox.nvim"),
|
|
gh("sainnhe/everforest"),
|
|
gh("sainnhe/gruvbox-material"),
|
|
gh("rebelot/kanagawa.nvim"),
|
|
{ src = gh("catppuccin/nvim"), name = "catppuccin" },
|
|
gh("luisiacc/gruvbox-baby"),
|
|
|
|
-- Treesitter
|
|
gh("nvim-treesitter/nvim-treesitter"),
|
|
|
|
-- Completion & snippets
|
|
{ src = gh("L3MON4D3/LuaSnip"), version = vim.version.range("2.*") },
|
|
gh("onsails/lspkind.nvim"),
|
|
gh("hrsh7th/nvim-cmp"),
|
|
gh("hrsh7th/cmp-buffer"),
|
|
gh("hrsh7th/cmp-path"),
|
|
gh("hrsh7th/cmp-nvim-lsp"),
|
|
gh("saadparwaiz1/cmp_luasnip"),
|
|
|
|
-- LSP
|
|
gh("neovim/nvim-lspconfig"),
|
|
gh("folke/lazydev.nvim"),
|
|
gh("mason-org/mason.nvim"),
|
|
gh("mason-org/mason-lspconfig.nvim"),
|
|
gh("WhoIsSethDaniel/mason-tool-installer.nvim"),
|
|
gh("j-hui/fidget.nvim"),
|
|
gh("stevearc/conform.nvim"),
|
|
|
|
-- UI / navigation
|
|
gh("nvim-lualine/lualine.nvim"),
|
|
gh("ibhagwan/fzf-lua"),
|
|
gh("stevearc/oil.nvim"),
|
|
gh("stevearc/dressing.nvim"),
|
|
gh("folke/which-key.nvim"),
|
|
gh("folke/trouble.nvim"),
|
|
gh("folke/todo-comments.nvim"),
|
|
gh("christoomey/vim-tmux-navigator"),
|
|
|
|
-- Tools
|
|
{ src = gh("danymat/neogen"), version = vim.version.range("*") },
|
|
gh("sammaji/markdown-preview.nvim"),
|
|
})
|
|
|
|
-- Plugins configured with defaults only
|
|
require("mini.icons").setup()
|
|
require("fidget").setup()
|
|
require("which-key").setup()
|
|
require("lazydev").setup({
|
|
library = {
|
|
-- luv (vim.uv) types
|
|
{ path = "${3rd}/luv/library", words = { "vim%.uv" } },
|
|
},
|
|
})
|
|
|
|
-- Plugins with custom configuration
|
|
require "custom.colorschemes"
|
|
require "custom.treesitter"
|
|
require "custom.completion"
|
|
require "custom.lsp"
|
|
require "custom.lualine"
|
|
require "custom.fzf_lua"
|
|
require "custom.oil"
|
|
require "custom.trouble"
|
|
require "custom.todo"
|
|
require "custom.neogen"
|