166 lines
4.1 KiB
Lua
166 lines
4.1 KiB
Lua
local fn = vim.fn
|
|
|
|
-- Automatically install packer
|
|
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
|
|
if fn.empty(fn.glob(install_path)) > 0 then
|
|
PACKER_BOOTSTRAP = fn.system({
|
|
"git",
|
|
"clone",
|
|
"--depth",
|
|
"1",
|
|
"https://github.com/wbthomason/packer.nvim",
|
|
install_path,
|
|
})
|
|
print("Installing packer, please close and reopen Neovim...")
|
|
vim.cmd([[packadd packer.nvim]])
|
|
end
|
|
|
|
-- Autocommand to reload neovime whenever this file is saved.
|
|
vim.cmd([[
|
|
augroup packer_user_config
|
|
autocmd!
|
|
autocmd BufWritePost plugins.lua source <afile> | PackerSync
|
|
augroup end
|
|
]])
|
|
|
|
-- use a protected call so there's no error on first use
|
|
local s_ok, packer = pcall(require, "packer")
|
|
if not s_ok then
|
|
return
|
|
end
|
|
|
|
-- Have packer use a popup
|
|
packer.init({
|
|
max_jobs = 50,
|
|
display = {
|
|
open_fn = function()
|
|
return require("packer.util").float({ border = "rounded" })
|
|
end,
|
|
prompt_border = "rounded",
|
|
},
|
|
})
|
|
|
|
-- Add plugins from here
|
|
return packer.startup(function(use)
|
|
-- Plugin manager
|
|
use("wbthomason/packer.nvim") -- Have packer manage inself
|
|
|
|
-- Lua Development
|
|
--use("nvim-lua/plenary.nvim") -- useful lua functions
|
|
--use("nvim-lua/popup.nvim")
|
|
--use("folke/neodev.nvim")
|
|
|
|
-- LSP
|
|
use("neovim/nvim-lspconfig") -- enable LSP
|
|
use("williamboman/mason.nvim") -- language server manager/installer
|
|
use("williamboman/mason-lspconfig.nvim")
|
|
use("j-hui/fidget.nvim") -- displays lsp progress in bottom right
|
|
use("SmiteshP/nvim-navic") -- integrates with winbar to show location in program e.g.: MyClass > MyFunc > MyProperty
|
|
use("simrat39/symbols-outline.nvim") -- class explorer for nvim
|
|
use("folke/trouble.nvim") -- view lsp diagnostics
|
|
use("https://git.sr.ht/~whynothugo/lsp_lines.nvim")
|
|
use({ -- I'm currently just using this for a functional code action menu for omnisharp, I want to look further into its functions though.
|
|
"glepnir/lspsaga.nvim",
|
|
branch = "main",
|
|
})
|
|
use("jose-elias-alvarez/null-ls.nvim")
|
|
|
|
-- Completion
|
|
use("hrsh7th/nvim-cmp") -- completion engine
|
|
use("hrsh7th/cmp-buffer") -- buffer completions
|
|
use("hrsh7th/cmp-path") -- path completions
|
|
use("saadparwaiz1/cmp_luasnip") -- snippet completions
|
|
use("hrsh7th/cmp-nvim-lsp") -- lsp completions
|
|
use("hrsh7th/cmp-nvim-lua")
|
|
|
|
-- Snippet {
|
|
--use("L3MON4D3/LuaSnip") -- snippet engine
|
|
--use("rafamadriz/friendly-snippets") -- a collection of useful snippets
|
|
|
|
-- Syntax/Treesitter
|
|
use("nvim-treesitter/nvim-treesitter")
|
|
use("nvim-treesitter/playground")
|
|
|
|
-- CEO of The Startup
|
|
use("ThePrimeagen/harpoon")
|
|
|
|
-- Telescopic Johnston
|
|
use("nvim-telescope/telescope.nvim")
|
|
use("nvim-telescope/telescope-media-files.nvim")
|
|
|
|
-- Colour
|
|
use("NvChad/nvim-colorizer.lua")
|
|
|
|
-- Colorschemes
|
|
use("sainnhe/gruvbox-material")
|
|
use("sainnhe/sonokai")
|
|
use("dracula/vim")
|
|
use("RRethy/nvim-base16")
|
|
|
|
-- Utility
|
|
--use("rcarriga/nvim-notify")
|
|
use("stevearc/dressing.nvim")
|
|
--use("moll/vim-bbye")
|
|
--use("lewis6991/impatient.nvim")
|
|
--use("ghillb/cybu.nvim")
|
|
--use("mbbill/undotree")
|
|
--use("MunifTanjim/nui.nvim")
|
|
-- noice
|
|
|
|
-- Icons
|
|
--use("kyazdani42/nvim-web-devicons")
|
|
|
|
-- Debugging
|
|
use("mfussenegger/nvim-dap")
|
|
use("rcarriga/nvim-dap-ui")
|
|
|
|
-- Tabline
|
|
-- use("fgheng/winbar.nvim")
|
|
-- bufferline
|
|
|
|
-- Statusline
|
|
--use("nvim-lualine/lualine.nvim")
|
|
|
|
-- Startup
|
|
--use("goolord/alpha-nvim")
|
|
|
|
-- Indent
|
|
use("lukas-reineke/indent-blankline.nvim")
|
|
|
|
-- File Explorer
|
|
use("kyazdani42/nvim-tree.lua")
|
|
|
|
-- Comments
|
|
use("numToStr/Comment.nvim")
|
|
use("folke/todo-comments.nvim")
|
|
|
|
-- Git
|
|
use("lewis6991/gitsigns.nvim")
|
|
use("f-person/git-blame.nvim")
|
|
use("tpope/vim-fugitive")
|
|
|
|
-- Editing Support
|
|
use("windwp/nvim-autopairs")
|
|
use("preservim/vim-markdown")
|
|
use("folke/zen-mode.nvim")
|
|
use("junegunn/vim-slash")
|
|
use("andymass/vim-matchup")
|
|
use("nacro90/numb.nvim")
|
|
use("monaqa/dial.nvim")
|
|
use({
|
|
"abecodes/tabout.nvim",
|
|
wants = { "nvim-treesitter" },
|
|
})
|
|
use("windwp/nvim-spectre")
|
|
use("tpope/vim-surround")
|
|
use("danymat/neogen")
|
|
|
|
-- Keybinding
|
|
use("folke/which-key.nvim")
|
|
|
|
-- Automatically setup after cloning packer.nvim
|
|
if PACKER_BOOTSTRAP then
|
|
require("packer").sync()
|
|
end
|
|
end)
|