2023-01-03 14:13:09 -05:00
|
|
|
local ok, packer = pcall(require,"packer")
|
2022-10-21 06:15:28 -04:00
|
|
|
if not ok then
|
2023-03-12 16:09:11 -04:00
|
|
|
vim.notify("Failed to load packer\n\n")
|
|
|
|
return
|
2022-10-21 06:15:28 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
vim.api.nvim_create_autocmd("BufWritePost", {
|
2023-03-12 16:09:11 -04:00
|
|
|
pattern = "*/core/plugins.lua",
|
|
|
|
callback = function(arg)
|
|
|
|
vim.cmd("source "..arg.file)
|
|
|
|
vim.cmd("PackerInstall")
|
|
|
|
end,
|
2022-10-21 06:15:28 -04:00
|
|
|
})
|
|
|
|
|
|
|
|
packer.startup{
|
2023-03-12 16:09:11 -04:00
|
|
|
function(use)
|
|
|
|
use {"wbthomason/packer.nvim"}
|
|
|
|
|
|
|
|
use {
|
|
|
|
"lewis6991/impatient.nvim",
|
|
|
|
config = function() require('impatient') end
|
|
|
|
}
|
2022-12-24 12:33:46 -05:00
|
|
|
|
2023-03-12 16:09:11 -04:00
|
|
|
-- Colorchemes
|
|
|
|
use 'gbprod/nord.nvim'
|
|
|
|
-- use {"catppuccin/nvim", as = "catppuccin"}
|
|
|
|
-- use {"tiagovla/tokyodark.nvim"}
|
|
|
|
-- use {'Everblush/everblush.nvim',as = 'everblush'}
|
|
|
|
-- use {"frenzyexists/aquarium-vim"}
|
|
|
|
-- use {"rebelot/kanagawa.nvim"}
|
|
|
|
-- use {"projekt0n/github-nvim-theme"}
|
|
|
|
-- use {"Mofiqul/vscode.nvim"}
|
|
|
|
|
|
|
|
use {"dstein64/vim-startuptime"}
|
2022-12-24 12:33:46 -05:00
|
|
|
|
2023-03-12 16:09:11 -04:00
|
|
|
use {
|
|
|
|
"kyazdani42/nvim-tree.lua",
|
|
|
|
requires = { "kyazdani42/nvim-web-devicons" },
|
|
|
|
config = function() require("plugins.nvim-tree") end
|
|
|
|
}
|
|
|
|
|
|
|
|
use {
|
|
|
|
"rcarriga/nvim-notify",
|
|
|
|
config = function()
|
|
|
|
require("notify").setup({
|
|
|
|
on_open = function(win)
|
|
|
|
vim.api.nvim_win_set_config(win,{focusable = false})
|
|
|
|
end,
|
|
|
|
})
|
|
|
|
end,
|
|
|
|
}
|
2022-12-24 12:33:46 -05:00
|
|
|
|
2023-03-12 16:09:11 -04:00
|
|
|
use {
|
|
|
|
"lewis6991/gitsigns.nvim",
|
|
|
|
config = function() require("gitsigns").setup{keymaps = {}} end
|
|
|
|
}
|
2022-10-21 06:15:28 -04:00
|
|
|
|
2022-12-24 12:33:46 -05:00
|
|
|
|
2023-03-12 16:09:11 -04:00
|
|
|
use {
|
|
|
|
"akinsho/toggleterm.nvim", tag = 'v2.*',
|
|
|
|
config = function() require("toggleterm").setup() end
|
|
|
|
}
|
|
|
|
|
|
|
|
use {
|
|
|
|
"windwp/nvim-autopairs",
|
|
|
|
config = function() require("nvim-autopairs").setup() end
|
|
|
|
}
|
|
|
|
|
|
|
|
use {
|
|
|
|
"lukas-reineke/indent-blankline.nvim",
|
|
|
|
config = function()
|
|
|
|
require("indent_blankline").setup{
|
|
|
|
show_end_of_line = true,
|
|
|
|
space_char_blankline = " ",
|
2022-12-24 12:33:46 -05:00
|
|
|
}
|
2023-03-12 16:09:11 -04:00
|
|
|
end
|
|
|
|
}
|
|
|
|
|
|
|
|
use {
|
|
|
|
"numToStr/Comment.nvim",
|
|
|
|
config = function() require('Comment').setup() end
|
|
|
|
}
|
|
|
|
|
|
|
|
use {
|
|
|
|
"folke/todo-comments.nvim",
|
|
|
|
requires = "nvim-lua/plenary.nvim",
|
|
|
|
config = function() require("todo-comments").setup() end
|
|
|
|
}
|
|
|
|
|
|
|
|
use {
|
|
|
|
"nvim-treesitter/nvim-treesitter",
|
|
|
|
requires = {
|
|
|
|
"nvim-treesitter/playground",
|
|
|
|
"nvim-treesitter/nvim-treesitter-textobjects",
|
|
|
|
},
|
|
|
|
run = function() vim.cmd("TSUpdate") end,
|
|
|
|
config = function() require("plugins.treesitter") end
|
|
|
|
}
|
2022-10-21 06:15:28 -04:00
|
|
|
|
2023-03-12 16:09:11 -04:00
|
|
|
use {
|
|
|
|
"nvim-telescope/telescope.nvim",
|
|
|
|
requires = {"nvim-lua/plenary.nvim"},
|
|
|
|
config = function() require("plugins.telescope") end
|
|
|
|
}
|
|
|
|
|
|
|
|
-- Language Server Protocol
|
|
|
|
use {
|
|
|
|
"neovim/nvim-lspconfig",
|
|
|
|
requires = { "williamboman/mason.nvim", "williamboman/mason-lspconfig.nvim" },
|
|
|
|
config = function()
|
|
|
|
require("lsp")
|
|
|
|
require("mason").setup()
|
|
|
|
end
|
|
|
|
}
|
|
|
|
|
|
|
|
use {
|
|
|
|
"hrsh7th/nvim-cmp",
|
|
|
|
requires = {
|
|
|
|
"hrsh7th/cmp-nvim-lsp",
|
|
|
|
"hrsh7th/cmp-path",
|
|
|
|
"hrsh7th/cmp-buffer",
|
|
|
|
"saadparwaiz1/cmp_luasnip",
|
|
|
|
"hrsh7th/cmp-calc",
|
|
|
|
"hrsh7th/cmp-emoji",
|
|
|
|
"hrsh7th/cmp-cmdline",
|
|
|
|
},
|
|
|
|
config = function() require("plugins.cmp") end
|
|
|
|
}
|
|
|
|
|
|
|
|
use {
|
|
|
|
"onsails/lspkind-nvim",
|
|
|
|
config = function()
|
|
|
|
local lspkind = require("lspkind")
|
|
|
|
lspkind.init{
|
|
|
|
mode = 'symbol_text',
|
|
|
|
preset = 'codicons',
|
|
|
|
|
|
|
|
symbol_map = {
|
|
|
|
Text = "",
|
|
|
|
Method = "",
|
|
|
|
Function = "",
|
|
|
|
Constructor = "",
|
|
|
|
Field = "ﰠ",
|
|
|
|
Variable = "",
|
|
|
|
Class = "ﴯ",
|
|
|
|
Interface = "",
|
|
|
|
Module = "",
|
|
|
|
Property = "ﰠ",
|
|
|
|
Unit = "塞",
|
|
|
|
Value = "",
|
|
|
|
Enum = "",
|
|
|
|
Keyword = "",
|
|
|
|
Snippet = "",
|
|
|
|
Color = "",
|
|
|
|
File = "",
|
|
|
|
Reference = "",
|
|
|
|
Folder = "",
|
|
|
|
EnumMember = "",
|
|
|
|
Constant = "",
|
|
|
|
Struct = "פּ",
|
|
|
|
Event = "",
|
|
|
|
Operator = "",
|
|
|
|
TypeParameter = ""
|
|
|
|
}
|
2022-12-24 12:33:46 -05:00
|
|
|
}
|
2023-03-12 16:09:11 -04:00
|
|
|
end
|
|
|
|
}
|
|
|
|
|
|
|
|
use {
|
|
|
|
"L3MON4D3/LuaSnip",
|
|
|
|
requires = {"rafamadriz/friendly-snippets"},
|
|
|
|
config = function() require("plugins.luasnip") end
|
|
|
|
}
|
|
|
|
|
|
|
|
use {
|
|
|
|
"jose-elias-alvarez/null-ls.nvim",
|
|
|
|
config = function() require("plugins.null-ls") end
|
|
|
|
}
|
|
|
|
|
|
|
|
use {
|
|
|
|
"SmiteshP/nvim-navic",
|
|
|
|
requires = {"neovim/nvim-lspconfig"},
|
|
|
|
config = function()
|
|
|
|
local navic = require("nvim-navic")
|
|
|
|
navic.setup {
|
|
|
|
highlight = false,
|
|
|
|
separator = " > ",
|
|
|
|
depth_limit = 0.01,
|
|
|
|
depth_limit_indicator = "..",
|
|
|
|
safe_output = true
|
2022-10-21 06:15:28 -04:00
|
|
|
}
|
2023-03-12 16:09:11 -04:00
|
|
|
end,
|
|
|
|
}
|
|
|
|
|
|
|
|
use {
|
|
|
|
"ray-x/lsp_signature.nvim",
|
|
|
|
config = function()
|
|
|
|
local lsp_signature = require("lsp_signature")
|
2022-10-21 06:15:28 -04:00
|
|
|
|
2023-03-12 16:09:11 -04:00
|
|
|
lsp_signature.setup{
|
|
|
|
hint_enable = false,
|
|
|
|
verbose = true
|
2022-12-24 12:33:46 -05:00
|
|
|
}
|
2022-10-21 06:15:28 -04:00
|
|
|
|
2023-03-12 16:09:11 -04:00
|
|
|
end
|
|
|
|
}
|
2022-10-21 06:15:28 -04:00
|
|
|
|
2023-03-12 16:09:11 -04:00
|
|
|
use {
|
|
|
|
"j-hui/fidget.nvim",
|
|
|
|
config = function() require("fidget").setup() end
|
|
|
|
}
|
|
|
|
|
|
|
|
-- Debug Adapter Protocol
|
|
|
|
use {
|
|
|
|
"mfussenegger/nvim-dap",
|
|
|
|
requires = {
|
|
|
|
"arywz11/DAPInstall.nvim",
|
|
|
|
"rcarriga/nvim-dap-ui"
|
|
|
|
},
|
|
|
|
config = function() require("plugins.dap") end,
|
|
|
|
}
|
2022-10-21 06:15:28 -04:00
|
|
|
|
2023-03-12 16:09:11 -04:00
|
|
|
end,
|
2022-12-24 12:33:46 -05:00
|
|
|
|
2023-03-12 16:09:11 -04:00
|
|
|
config = {
|
|
|
|
display = {
|
|
|
|
open_fn = function()
|
|
|
|
return require("packer.util").float{border = "rounded"}
|
|
|
|
end
|
2022-10-21 06:15:28 -04:00
|
|
|
}
|
2023-03-12 16:09:11 -04:00
|
|
|
}
|
2022-10-21 06:15:28 -04:00
|
|
|
}
|
|
|
|
|
2022-12-24 12:33:46 -05:00
|
|
|
|
2022-10-21 06:15:28 -04:00
|
|
|
local function bootstrap()
|
2023-03-12 16:09:11 -04:00
|
|
|
local fn = vim.fn
|
|
|
|
local packer_install_path =
|
|
|
|
fn.stdpath("data").."/site/pack/packer/opt/packer.nvim"
|
|
|
|
local not_installed = fn.empty(fn.glob(packer_install_path)) == 1
|
2022-10-21 06:15:28 -04:00
|
|
|
|
2023-03-12 16:09:11 -04:00
|
|
|
if not_installed then
|
|
|
|
print("`packer.nvim` is not installed, installing...")
|
|
|
|
local repo = "https://github.com/wbthomason/packer.nvim"
|
|
|
|
vim.cmd(("!git clone %s %s"):format(repo, packer_install_path))
|
|
|
|
end
|
2022-10-21 06:15:28 -04:00
|
|
|
|
2023-03-12 16:09:11 -04:00
|
|
|
vim.cmd("packadd packer.nvim")
|
|
|
|
require("packer").startup {
|
|
|
|
load,
|
|
|
|
config = {
|
|
|
|
git = {clone_timeout = 240},
|
|
|
|
},
|
|
|
|
}
|
|
|
|
|
|
|
|
if not_installed then
|
|
|
|
vim.cmd("PackerSync")
|
|
|
|
end
|
2022-10-21 06:15:28 -04:00
|
|
|
end
|
|
|
|
|
|
|
|
return bootstrap
|