dotfiles/.config/nvim/lua/core/plugins.lua

262 lines
7.4 KiB
Lua
Raw Normal View History

local ok, packer = pcall(require,"packer")
2022-10-21 06:15:28 -04:00
if not ok then
vim.notify("Failed to load packer\n\n")
return
end
vim.api.nvim_create_autocmd("BufWritePost", {
pattern = "*/core/plugins.lua",
callback = function(arg)
vim.cmd("source "..arg.file)
vim.cmd("PackerInstall")
end,
})
packer.startup{
2022-12-24 12:33:46 -05:00
function(use)
2022-10-21 06:15:28 -04:00
use {"wbthomason/packer.nvim"}
2022-12-24 12:33:46 -05:00
use {
"lewis6991/impatient.nvim",
config = function() require('impatient') end
}
-- Colorchemes
-- 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"}
2022-10-21 06:15:28 -04:00
2022-12-24 12:33:46 -05:00
use {"dstein64/vim-startuptime"}
2022-10-21 06:15:28 -04:00
use {
2022-12-24 12:33:46 -05:00
"kyazdani42/nvim-tree.lua",
requires = { "kyazdani42/nvim-web-devicons" },
config = function() require("plugins.nvim-tree") end
2022-10-21 06:15:28 -04:00
}
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
2022-10-21 06:15:28 -04:00
use {
2022-12-24 12:33:46 -05:00
"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
use {
"akinsho/toggleterm.nvim", tag = 'v2.*',
config = function() require("toggleterm").setup() end
}
2022-10-21 06:15:28 -04:00
use {
"windwp/nvim-autopairs",
config = function() require("nvim-autopairs").setup() end
}
use {
2022-12-24 12:33:46 -05:00
"lukas-reineke/indent-blankline.nvim",
config = function()
require("indent_blankline").setup{
show_end_of_line = true,
space_char_blankline = " ",
}
end
2022-10-21 06:15:28 -04:00
}
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
}
2022-12-24 12:33:46 -05:00
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
use {
"nvim-telescope/telescope.nvim",
2022-12-24 12:33:46 -05:00
requires = {"nvim-lua/plenary.nvim"},
2023-01-04 07:28:57 -05:00
config = function() require("plugins.telescope") end
2022-10-21 06:15:28 -04:00
}
-- Language Server Protocol
use {
2022-12-24 12:33:46 -05:00
"neovim/nvim-lspconfig",
requires = { "williamboman/mason.nvim", "williamboman/mason-lspconfig.nvim" },
config = function()
require("lsp")
require("mason").setup()
end
2022-10-21 06:15:28 -04:00
}
2022-10-21 06:15:28 -04:00
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',
2022-12-24 12:33:46 -05:00
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-10-21 06:15:28 -04:00
}
end
}
use {
"L3MON4D3/LuaSnip",
2022-12-24 12:33:46 -05:00
requires = {"rafamadriz/friendly-snippets"},
config = function() require("luasnip/loaders/from_vscode").lazy_load() end
}
use {
"jose-elias-alvarez/null-ls.nvim",
config = function() require("plugins.null-ls") end
2022-10-21 06:15:28 -04:00
}
2022-12-24 12:33:46 -05:00
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
}
end,
2022-12-24 12:33:46 -05:00
}
2022-10-21 06:15:28 -04:00
use {
"ray-x/lsp_signature.nvim",
config = function()
local lsp_signature = require("lsp_signature")
lsp_signature.setup{
hint_enable = false,
verbose = true
}
end
}
use {
2022-12-24 12:33:46 -05:00
"j-hui/fidget.nvim",
config = function() require("fidget").setup() end
2022-10-21 06:15:28 -04:00
}
2022-12-24 12:33:46 -05:00
-- Debug Adapter Protocol
2022-10-21 06:15:28 -04:00
use {
"mfussenegger/nvim-dap",
requires = {
"arywz11/DAPInstall.nvim",
"rcarriga/nvim-dap-ui"
},
config = function() require("plugins.dap") end,
}
end,
2022-12-24 12:33:46 -05:00
2022-10-21 06:15:28 -04:00
config = {
display = {
open_fn = function()
return require("packer.util").float{border = "rounded"}
end
}
}
}
2022-12-24 12:33:46 -05:00
2022-10-21 06:15:28 -04:00
local function bootstrap()
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
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
vim.cmd("packadd packer.nvim")
require("packer").startup {
load,
config = {
git = {clone_timeout = 240},
},
}
if not_installed then
vim.cmd("PackerSync")
end
end
return bootstrap