165 lines
4.3 KiB
Lua
165 lines
4.3 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/lua-dev.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 "OmniSharp/omnisharp-vim"
|
|
use "https://git.sr.ht/~whynothugo/lsp_lines.nvim"
|
|
require('packer').use({
|
|
'weilbith/nvim-code-action-menu',
|
|
cmd = 'CodeActionMenu',
|
|
})
|
|
|
|
-- Completion
|
|
use "hrsh7th/nvim-cmp" -- completion engine
|
|
use "hrsh7th/cmp-buffer" -- buffer completions
|
|
use "hrsh7th/cmp-path" -- path completions
|
|
use "hrsh7th/cmp-nvim-lsp" -- lsp completions
|
|
use "hrsh7th/cmp-nvim-lua"
|
|
use "saadparwaiz1/cmp_luasnip" -- snippet completions
|
|
|
|
-- 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"
|
|
|
|
-- Note Taking
|
|
use "mickael-menu/zk-nvim"
|
|
|
|
-- Colour
|
|
use "NvChad/nvim-colorizer.lua"
|
|
|
|
-- Colorschemes
|
|
use "folke/tokyonight.nvim"
|
|
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"
|
|
|
|
-- Icons
|
|
use "kyazdani42/nvim-web-devicons"
|
|
|
|
-- Debugging
|
|
-- Also add later.
|
|
|
|
-- Tabline
|
|
use "akinsho/bufferline.nvim"
|
|
use "fgheng/winbar.nvim"
|
|
|
|
-- 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"
|
|
|
|
-- Terminal
|
|
use "akinsho/toggleterm.nvim"
|
|
|
|
-- Git
|
|
use "lewis6991/gitsigns.nvim"
|
|
use "f-person/git-blame.nvim"
|
|
|
|
-- Editing Support
|
|
use "windwp/nvim-autopairs"
|
|
use "vimwiki/vimwiki"
|
|
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"
|
|
|
|
-- Keybinding
|
|
use "folke/which-key.nvim"
|
|
|
|
-- Automatically setup after cloning packer.nvim
|
|
if PACKER_BOOTSTRAP then
|
|
require("packer").sync()
|
|
end
|
|
end)
|