2022-01-12 21:36:47 -06:00
|
|
|
local fn = vim.fn
|
2022-01-15 22:07:21 -06:00
|
|
|
|
|
|
|
-- Packer strap, install packer automatically and configure plugins
|
|
|
|
-- See the end of this file for how the variable `packer_strap` gets used
|
2022-01-12 21:36:47 -06:00
|
|
|
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
|
|
|
|
if fn.empty(fn.glob(install_path)) > 0 then
|
2022-01-15 22:07:21 -06:00
|
|
|
PACKER_STRAP = fn.system({
|
2022-01-12 21:36:47 -06:00
|
|
|
"git",
|
|
|
|
"clone",
|
|
|
|
"--depth",
|
|
|
|
"1",
|
|
|
|
"https://github.com/wbthomason/packer.nvim",
|
|
|
|
install_path,
|
|
|
|
})
|
2022-01-12 22:27:35 -06:00
|
|
|
-- Update the runtime so packer can be used
|
2022-01-12 22:13:47 -06:00
|
|
|
vim.o.runtimepath = vim.fn.stdpath("data") .. "/site/pack/*/start/*," .. vim.o.runtimepath
|
2022-01-12 21:36:47 -06:00
|
|
|
end
|
|
|
|
|
2022-01-10 09:55:15 -06:00
|
|
|
return require("packer").startup({
|
|
|
|
function(use)
|
|
|
|
-- Performance boost on startup
|
|
|
|
-- keep at top of plugins
|
|
|
|
use({ "lewis6991/impatient.nvim" })
|
|
|
|
|
2022-01-15 08:21:42 -06:00
|
|
|
-- Packer Itself
|
2022-01-15 07:54:02 -06:00
|
|
|
use({ "wbthomason/packer.nvim" })
|
|
|
|
|
2022-01-10 09:55:15 -06:00
|
|
|
-- Commonly used library
|
|
|
|
use({
|
|
|
|
"nvim-lua/plenary.nvim",
|
|
|
|
})
|
|
|
|
|
2022-01-15 21:15:52 -06:00
|
|
|
-- Nvim Notify
|
|
|
|
use({
|
|
|
|
"rcarriga/nvim-notify",
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.nvim-notify")
|
|
|
|
end,
|
|
|
|
})
|
2022-01-15 19:15:09 -06:00
|
|
|
|
2022-01-10 09:55:15 -06:00
|
|
|
-- Color schemes
|
|
|
|
use({ "folke/tokyonight.nvim" })
|
|
|
|
|
|
|
|
-- Icons for folders, files, etc.
|
|
|
|
use({
|
|
|
|
"kyazdani42/nvim-web-devicons",
|
|
|
|
event = "BufEnter",
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Tab Line at top of editor
|
|
|
|
use({
|
|
|
|
"akinsho/nvim-bufferline.lua",
|
|
|
|
after = "nvim-web-devicons",
|
|
|
|
requires = { "nvim-web-devicons" },
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.bufferline")
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Statusline.
|
|
|
|
use({
|
|
|
|
"nvim-lualine/lualine.nvim",
|
2022-01-15 07:54:02 -06:00
|
|
|
after = {
|
2022-01-15 08:21:42 -06:00
|
|
|
"nvim-bufferline.lua",
|
|
|
|
"tokyonight.nvim",
|
|
|
|
},
|
2022-01-10 09:55:15 -06:00
|
|
|
config = function()
|
|
|
|
require("plugins.configs.statusline")
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Indentation Guides
|
|
|
|
use({
|
|
|
|
"lukas-reineke/indent-blankline.nvim",
|
|
|
|
event = "BufEnter",
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.indent-blankline")
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Treesitter
|
|
|
|
use({
|
|
|
|
"nvim-treesitter/nvim-treesitter",
|
|
|
|
run = ":TSUpdate",
|
2022-02-04 08:49:41 -06:00
|
|
|
event = "BufRead",
|
2022-01-10 09:55:15 -06:00
|
|
|
config = function()
|
|
|
|
require("plugins.configs.treesitter")
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Highlight given color codes
|
|
|
|
use({
|
|
|
|
"norcalli/nvim-colorizer.lua",
|
|
|
|
event = "BufEnter",
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.nvim-colorizer")
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Dashboard when no file is given to nvim
|
|
|
|
use({
|
|
|
|
"glepnir/dashboard-nvim",
|
|
|
|
setup = function()
|
|
|
|
require("plugins.configs.dashboard-nvim")
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
2022-01-14 01:41:10 -06:00
|
|
|
-- Telescope Extensions
|
2022-01-10 09:55:15 -06:00
|
|
|
use({
|
|
|
|
"nvim-telescope/telescope-fzf-native.nvim",
|
|
|
|
run = "make",
|
|
|
|
})
|
|
|
|
|
|
|
|
use({
|
|
|
|
"nvim-telescope/telescope-media-files.nvim",
|
2022-01-14 01:41:10 -06:00
|
|
|
"nvim-telescope/telescope-file-browser.nvim",
|
|
|
|
"artart222/telescope_find_directories",
|
|
|
|
})
|
|
|
|
-- Telescope
|
|
|
|
use({
|
2022-01-10 09:55:15 -06:00
|
|
|
"nvim-telescope/telescope.nvim",
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.telescope-nvim")
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
-- LSP, LSP Installer
|
|
|
|
use({
|
|
|
|
"neovim/nvim-lspconfig",
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.lspconfig")
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
use({
|
|
|
|
"williamboman/nvim-lsp-installer",
|
|
|
|
after = "nvim-lspconfig",
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.lsp")
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
2022-02-04 20:54:08 -06:00
|
|
|
-- Display LSP Progress
|
|
|
|
use({
|
|
|
|
"j-hui/fidget.nvim",
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.fidget-spinner")
|
|
|
|
end,
|
|
|
|
-- after = "nvim-lspconfig"
|
|
|
|
})
|
|
|
|
|
2022-01-21 06:52:10 -06:00
|
|
|
-- Code Action Menu, prettier ui for LSP code actions
|
|
|
|
require("packer").use({
|
|
|
|
"weilbith/nvim-code-action-menu",
|
|
|
|
cmd = "CodeActionMenu",
|
|
|
|
})
|
|
|
|
|
2022-01-15 21:15:52 -06:00
|
|
|
-- Lsp From Null LS
|
|
|
|
use({
|
|
|
|
"jose-elias-alvarez/null-ls.nvim",
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.null_ls")
|
|
|
|
end,
|
|
|
|
})
|
2022-01-15 19:15:09 -06:00
|
|
|
|
2022-01-10 09:55:15 -06:00
|
|
|
-- Better LSP Handling for Rust
|
|
|
|
use({
|
|
|
|
"simrat39/rust-tools.nvim",
|
|
|
|
after = "nvim-lspconfig",
|
2022-01-15 08:21:42 -06:00
|
|
|
ft = "rust",
|
2022-01-10 09:55:15 -06:00
|
|
|
config = function()
|
|
|
|
require("rust-tools").setup({})
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Autopairs
|
|
|
|
use({
|
|
|
|
"windwp/nvim-autopairs",
|
|
|
|
config = function()
|
|
|
|
require("nvim-autopairs").setup()
|
|
|
|
end,
|
|
|
|
})
|
2022-01-19 16:36:39 -06:00
|
|
|
|
|
|
|
-- use({
|
|
|
|
-- "ms-jpq/coq_nvim",
|
|
|
|
-- config = function()
|
|
|
|
-- require("plugins.configs.coq")
|
|
|
|
-- end,
|
|
|
|
-- requires = {
|
|
|
|
-- "ms-jpq/coq.artifacts",
|
|
|
|
-- "ms-jpq/coq.thirdparty",
|
|
|
|
-- },
|
|
|
|
-- })
|
|
|
|
|
2022-02-04 08:49:41 -06:00
|
|
|
-- Snippets
|
|
|
|
use({
|
|
|
|
"L3MON4D3/LuaSnip",
|
|
|
|
"https://github.com/saadparwaiz1/cmp_luasnip",
|
|
|
|
})
|
2022-01-12 21:36:47 -06:00
|
|
|
use({
|
2022-01-19 16:36:39 -06:00
|
|
|
"rafamadriz/friendly-snippets",
|
2022-02-04 08:49:41 -06:00
|
|
|
config = function()
|
|
|
|
require("luasnip.loaders.from_vscode").load()
|
|
|
|
end,
|
|
|
|
requires = {
|
|
|
|
"L3MON4D3/LuaSnip",
|
|
|
|
"https://github.com/saadparwaiz1/cmp_luasnip",
|
|
|
|
},
|
|
|
|
after = "LuaSnip"
|
2022-01-19 16:36:39 -06:00
|
|
|
})
|
|
|
|
|
|
|
|
-- Code completion
|
|
|
|
use({
|
|
|
|
"hrsh7th/nvim-cmp",
|
2022-01-18 12:51:06 -06:00
|
|
|
requires = {
|
2022-01-19 16:36:39 -06:00
|
|
|
"hrsh7th/cmp-nvim-lsp",
|
|
|
|
"hrsh7th/cmp-buffer",
|
|
|
|
"hrsh7th/cmp-path",
|
|
|
|
"hrsh7th/cmp-cmdline",
|
2022-01-21 06:52:10 -06:00
|
|
|
"hrsh7th/cmp-emoji",
|
2022-02-04 08:49:41 -06:00
|
|
|
"hrsh7th/vim-vsnip",
|
2022-01-18 12:51:06 -06:00
|
|
|
},
|
2022-01-19 16:36:39 -06:00
|
|
|
config = function()
|
2022-01-21 00:46:33 -06:00
|
|
|
require("plugins.configs._cmp")
|
2022-01-19 16:36:39 -06:00
|
|
|
end,
|
2022-01-12 21:36:47 -06:00
|
|
|
})
|
2022-01-10 17:23:58 -06:00
|
|
|
|
2022-01-10 09:55:15 -06:00
|
|
|
-- Show code outline
|
|
|
|
use({
|
|
|
|
"simrat39/symbols-outline.nvim",
|
|
|
|
cmd = { "SymbolsOutline", "SymbolsOutlineOpen", "SymbolsOutlineClose" },
|
|
|
|
})
|
|
|
|
|
|
|
|
-- DAP, debugger
|
|
|
|
use({
|
|
|
|
"mfussenegger/nvim-dap",
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Allows more Dap providers to be installed easily
|
|
|
|
use({
|
|
|
|
"Pocco81/DAPInstall.nvim",
|
|
|
|
after = "nvim-dap",
|
|
|
|
})
|
|
|
|
|
2022-01-25 20:38:59 -06:00
|
|
|
-- Python debugger, dapinstall does not play nice with debugpy
|
|
|
|
use({
|
2022-01-27 23:53:45 -06:00
|
|
|
"mfussenegger/nvim-dap-python",
|
|
|
|
after = "nvim-dap",
|
|
|
|
config = function()
|
|
|
|
require("dap-python").setup("~/.venvs/debugpy/bin/python")
|
|
|
|
end,
|
2022-01-25 20:38:59 -06:00
|
|
|
})
|
|
|
|
|
2022-01-10 09:55:15 -06:00
|
|
|
-- Fancy ui for dap
|
|
|
|
use({
|
|
|
|
"rcarriga/nvim-dap-ui",
|
2022-01-27 23:53:45 -06:00
|
|
|
after = "nvim-dap",
|
2022-01-10 09:55:15 -06:00
|
|
|
config = function()
|
2022-01-27 23:53:45 -06:00
|
|
|
require("plugins.configs.dap-ui")
|
2022-01-10 09:55:15 -06:00
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Easy align, better than piping out to !column -t
|
|
|
|
use({
|
|
|
|
"junegunn/vim-easy-align",
|
|
|
|
cmd = { "EasyAlign" },
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Code formatting
|
|
|
|
use({
|
|
|
|
"sbdchd/neoformat",
|
|
|
|
cmd = "Neoformat",
|
|
|
|
})
|
|
|
|
|
2022-01-10 10:40:48 -06:00
|
|
|
use({
|
|
|
|
"anuvyklack/pretty-fold.nvim",
|
|
|
|
config = function()
|
2022-01-27 23:53:45 -06:00
|
|
|
require("pretty-fold").setup({
|
2022-02-04 08:49:41 -06:00
|
|
|
fill_char = " ",
|
|
|
|
})
|
2022-01-10 10:40:48 -06:00
|
|
|
require("pretty-fold.preview").setup_keybinding()
|
|
|
|
end,
|
|
|
|
})
|
2022-01-10 09:55:15 -06:00
|
|
|
|
|
|
|
-- Stabalize closing buffers
|
|
|
|
use({
|
|
|
|
"luukvbaal/stabilize.nvim",
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs._stabilize")
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Git signs
|
|
|
|
use({
|
|
|
|
"lewis6991/gitsigns.nvim",
|
|
|
|
event = "BufRead",
|
|
|
|
config = function()
|
|
|
|
require("gitsigns").setup({})
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Highlight certain comments, TODO, BUG, etc.
|
|
|
|
use({
|
|
|
|
"folke/todo-comments.nvim",
|
|
|
|
event = "BufEnter",
|
|
|
|
config = function()
|
|
|
|
require("todo-comments").setup({})
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Show possible key bindings during typing
|
|
|
|
use({
|
|
|
|
"folke/which-key.nvim",
|
|
|
|
config = function()
|
|
|
|
require("which-key").setup()
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Create full path if not existing on write
|
|
|
|
use({
|
|
|
|
"jghauser/mkdir.nvim",
|
|
|
|
cmd = "new",
|
|
|
|
config = function()
|
|
|
|
require("mkdir")
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Text commenting
|
|
|
|
use({
|
|
|
|
"terrortylor/nvim-comment",
|
|
|
|
cmd = "CommentToggle",
|
|
|
|
config = function()
|
|
|
|
require("nvim_comment").setup()
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Move selections with alt+movement key
|
|
|
|
use({
|
|
|
|
"matze/vim-move",
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Register support in telescope with persistent save
|
|
|
|
use({
|
|
|
|
"AckslD/nvim-neoclip.lua",
|
|
|
|
requires = {
|
|
|
|
{ "tami5/sqlite.lua", module = "sqlite" },
|
|
|
|
{ "nvim-telescope/telescope.nvim" },
|
|
|
|
},
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs._neoclip")
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Markdown Previewer
|
|
|
|
use({
|
|
|
|
"iamcco/markdown-preview.nvim",
|
|
|
|
run = "cd app && npm install",
|
|
|
|
ft = { "markdown" },
|
|
|
|
cmd = "MardownPreview",
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Allows manipulation of surrounding characters
|
|
|
|
use({
|
|
|
|
"tpope/vim-surround",
|
|
|
|
})
|
|
|
|
|
2022-02-04 08:49:41 -06:00
|
|
|
-- Better Git integration on the command line
|
|
|
|
use({
|
|
|
|
"tpope/vim-fugitive",
|
|
|
|
})
|
|
|
|
|
2022-01-10 09:55:15 -06:00
|
|
|
-- Ansible Syntax Highlighting
|
|
|
|
use({
|
|
|
|
"pearofducks/ansible-vim",
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Better search display
|
|
|
|
use({
|
|
|
|
"kevinhwang91/nvim-hlslens",
|
|
|
|
module = "hlslens",
|
|
|
|
keys = "/",
|
|
|
|
})
|
|
|
|
|
|
|
|
-- Lsp Diags on scrollbar
|
|
|
|
use({
|
2022-01-10 10:40:48 -06:00
|
|
|
"petertriho/nvim-scrollbar",
|
2022-01-10 09:55:15 -06:00
|
|
|
requires = {
|
|
|
|
"kevinhwang91/nvim-hlslens",
|
|
|
|
"folke/tokyonight.nvim",
|
|
|
|
},
|
|
|
|
after = "nvim-hlslens",
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs.diag-scrollbar")
|
|
|
|
end,
|
|
|
|
})
|
2022-01-10 10:40:48 -06:00
|
|
|
|
2022-01-27 01:38:19 -06:00
|
|
|
-- Better in-line Lsp Diags
|
2022-02-04 08:49:41 -06:00
|
|
|
-- use({
|
|
|
|
-- "https://git.sr.ht/~whynothugo/lsp_lines.nvim",
|
|
|
|
-- config = function()
|
|
|
|
-- require("lsp_lines").register_lsp_virtual_lines()
|
|
|
|
-- end,
|
|
|
|
-- })
|
2022-01-10 10:40:48 -06:00
|
|
|
|
2022-01-12 21:36:47 -06:00
|
|
|
-- Discord Rich Presence
|
|
|
|
use({
|
|
|
|
"andweeb/presence.nvim",
|
|
|
|
config = function()
|
|
|
|
require("presence"):setup({})
|
|
|
|
end,
|
|
|
|
})
|
2022-01-15 07:21:42 -06:00
|
|
|
|
|
|
|
-- Note Taking
|
|
|
|
use({
|
|
|
|
"nvim-neorg/neorg",
|
|
|
|
config = function()
|
|
|
|
require("plugins.configs._neorg")
|
|
|
|
end,
|
|
|
|
requires = {
|
|
|
|
"nvim-lua/plenary.nvim",
|
|
|
|
"nvim-neorg/neorg-telescope",
|
|
|
|
},
|
2022-02-04 08:49:41 -06:00
|
|
|
after = "nvim-treesitter",
|
2022-01-15 07:21:42 -06:00
|
|
|
})
|
|
|
|
|
2022-02-04 20:54:08 -06:00
|
|
|
|
2022-01-18 12:51:06 -06:00
|
|
|
-- Completions for /, :, ?
|
2022-01-18 15:46:03 -06:00
|
|
|
-- use({
|
|
|
|
-- "gelguy/wilder.nvim",
|
|
|
|
-- event = "BufEnter",
|
|
|
|
-- config = function()
|
|
|
|
-- require("plugins.configs.wilder")
|
|
|
|
-- end
|
|
|
|
-- })
|
2022-01-18 12:51:06 -06:00
|
|
|
|
2022-01-12 22:13:47 -06:00
|
|
|
-- Leave at end!!!
|
2022-01-15 22:07:21 -06:00
|
|
|
-- Install and deploy packer plugins
|
|
|
|
-- automatically
|
|
|
|
if PACKER_STRAP then
|
2022-01-15 21:15:52 -06:00
|
|
|
vim.notify("Syncing packer from bootstrap")
|
|
|
|
|
|
|
|
function _G.NotifyRestartNeeded()
|
|
|
|
local notify_available, _ = require("notify")
|
|
|
|
local message = "Neovim Restart Required to Finish Installation!"
|
|
|
|
if notify_available then
|
2022-01-15 22:07:21 -06:00
|
|
|
vim.notify(message, vim.lsp.log_levels.WARN, {
|
|
|
|
title = "Packer Strap",
|
|
|
|
keep = function()
|
|
|
|
return true
|
|
|
|
end,
|
|
|
|
})
|
2022-01-15 21:15:52 -06:00
|
|
|
else
|
|
|
|
vim.notify(message)
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
vim.api.nvim_exec(
|
|
|
|
[[
|
|
|
|
autocmd User PackerCompileDone lua NotifyRestartNeeded()
|
|
|
|
]],
|
|
|
|
false
|
|
|
|
)
|
2022-01-12 21:36:47 -06:00
|
|
|
require("packer").sync()
|
|
|
|
end
|
2022-01-10 09:55:15 -06:00
|
|
|
end,
|
|
|
|
config = {
|
|
|
|
display = {
|
|
|
|
open_fn = function()
|
|
|
|
return require("packer.util").float({ border = "double" })
|
|
|
|
end,
|
|
|
|
},
|
2022-01-15 08:21:42 -06:00
|
|
|
compile_path = vim.fn.stdpath("config") .. "/lua/packer_compiled.lua",
|
2022-01-10 09:55:15 -06:00
|
|
|
},
|
|
|
|
})
|