need to commit
This commit is contained in:
294
config/lua/plugins.lua
Normal file
294
config/lua/plugins.lua
Normal file
@@ -0,0 +1,294 @@
|
||||
local settings = require("user-conf")
|
||||
local fn = vim.fn
|
||||
|
||||
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
|
||||
|
||||
-- returns the require for use in `config` parameter of packer's use
|
||||
-- expects the name of the config file
|
||||
local function get_config(name)
|
||||
return string.format('require("config/%s")', name)
|
||||
end
|
||||
|
||||
-- bootstrap packer if not installed
|
||||
if fn.empty(fn.glob(install_path)) > 0 then
|
||||
fn.system({
|
||||
"git",
|
||||
"clone",
|
||||
"https://github.com/wbthomason/packer.nvim",
|
||||
install_path,
|
||||
})
|
||||
print("Installing packer...")
|
||||
vim.api.nvim_command("packadd packer.nvim")
|
||||
end
|
||||
|
||||
-- initialize and configure packer
|
||||
local packer = require("packer")
|
||||
|
||||
packer.init({
|
||||
enable = true, -- enable profiling via :PackerCompile profile=true
|
||||
threshold = 0, -- the amount in ms that a plugins load time must be over for it to be included in the profile
|
||||
max_jobs = 20, -- Limit the number of simultaneous jobs. nil means no limit. Set to 20 in order to prevent PackerSync form being "stuck" -> https://github.com/wbthomason/packer.nvim/issues/746
|
||||
-- Have packer use a popup window
|
||||
display = {
|
||||
open_fn = function()
|
||||
return require("packer.util").float({ border = "rounded" })
|
||||
end,
|
||||
},
|
||||
})
|
||||
|
||||
packer.startup(function(use)
|
||||
-- actual plugins list
|
||||
use("wbthomason/packer.nvim")
|
||||
|
||||
-- telescope: highly extendable fuzzy finder over lists
|
||||
-- https://github.com/nvim-telescope/telescope.nvim
|
||||
use({
|
||||
"nvim-telescope/telescope.nvim",
|
||||
requires = { { "nvim-lua/popup.nvim" }, { "nvim-lua/plenary.nvim" } },
|
||||
config = get_config("telescope"),
|
||||
})
|
||||
-- zoxide helps jump to folders
|
||||
use({ "jvgrootveld/telescope-zoxide" })
|
||||
-- An extension for telescope.nvim that allows you to switch between document's headings.
|
||||
use({ "crispgm/telescope-heading.nvim" })
|
||||
-- provide its users with the ability of picking symbols and insert them at point
|
||||
use({ "nvim-telescope/telescope-symbols.nvim" })
|
||||
use({ "nvim-telescope/telescope-file-browser.nvim" })
|
||||
-- file browser extension for telescope.nvim. It supports synchronized creation, deletion, renaming, and moving of files and folders powered by telescope.nvim and plenary.nvim.
|
||||
use({ "nvim-telescope/telescope-fzf-native.nvim", run = "make" })
|
||||
-- Integration for packer.nvim with telescope.nvim.
|
||||
use({ "nvim-telescope/telescope-packer.nvim" })
|
||||
-- sets vim.ui.select to telescope. That means for example that neovim core stuff can fill the telescope picker
|
||||
use({ "nvim-telescope/telescope-ui-select.nvim" })
|
||||
-- File Explorer
|
||||
use({ "kyazdani42/nvim-tree.lua", config = get_config("nvim-tree") })
|
||||
-- Smoothly navigate between splits and panes
|
||||
-- https://github.com/numToStr/Navigator.nvim
|
||||
use({ "numToStr/Navigator.nvim", config = get_config("navigator") })
|
||||
-- Neovim statusline
|
||||
use({
|
||||
"nvim-lualine/lualine.nvim",
|
||||
config = get_config("lualine"),
|
||||
event = "VimEnter",
|
||||
requires = { "kyazdani42/nvim-web-devicons", opt = true },
|
||||
})
|
||||
-- A high-performance color highlighter for Neovim which has no external dependencies
|
||||
use({
|
||||
"norcalli/nvim-colorizer.lua",
|
||||
event = "BufReadPre",
|
||||
config = get_config("colorizer"),
|
||||
})
|
||||
-- autopair plugin for Neovim that supports multiple characters
|
||||
use({ "windwp/nvim-autopairs", config = get_config("nvim-autopairs") })
|
||||
-- fast parser for doing lookups per keystroke
|
||||
use({
|
||||
"nvim-treesitter/nvim-treesitter",
|
||||
config = get_config("treesitter"),
|
||||
run = ":TSUpdate",
|
||||
})
|
||||
|
||||
-- use("nvim-treesitter/nvim-treesitter-textobjects")
|
||||
|
||||
-- use("RRethy/nvim-treesitter-endwise")
|
||||
-- A completion engine plugin for neovim
|
||||
use({
|
||||
"hrsh7th/nvim-cmp",
|
||||
requires = {
|
||||
"hrsh7th/cmp-nvim-lsp",
|
||||
"hrsh7th/cmp-buffer",
|
||||
"hrsh7th/cmp-path",
|
||||
"hrsh7th/cmp-cmdline",
|
||||
"f3fora/cmp-spell",
|
||||
"hrsh7th/cmp-calc",
|
||||
"lukas-reineke/cmp-rg",
|
||||
"hrsh7th/cmp-nvim-lsp-signature-help",
|
||||
},
|
||||
config = get_config("cmp"),
|
||||
})
|
||||
-- community driven repository for all kinds of snippets in all programming languages
|
||||
use({ "rafamadriz/friendly-snippets" })
|
||||
use({
|
||||
"L3MON4D3/LuaSnip",
|
||||
requires = "saadparwaiz1/cmp_luasnip",
|
||||
config = get_config("luasnip"),
|
||||
})
|
||||
|
||||
-- requirement for Neogit
|
||||
use({
|
||||
"sindrets/diffview.nvim",
|
||||
cmd = {
|
||||
"DiffviewOpen",
|
||||
"DiffviewClose",
|
||||
"DiffviewToggleFiles",
|
||||
"DiffviewFocusFiles",
|
||||
},
|
||||
config = get_config("diffview"),
|
||||
})
|
||||
|
||||
-- some tui? for git in neovim?
|
||||
use({
|
||||
"TimUntersberger/neogit",
|
||||
requires = { "nvim-lua/plenary.nvim" },
|
||||
cmd = "Neogit",
|
||||
config = get_config("neogit"),
|
||||
})
|
||||
|
||||
-- probably does git blame
|
||||
use({ "f-person/git-blame.nvim", config = get_config("git-blame") })
|
||||
|
||||
use({
|
||||
"lewis6991/gitsigns.nvim",
|
||||
requires = { "nvim-lua/plenary.nvim" },
|
||||
event = "BufReadPre",
|
||||
config = get_config("gitsigns"),
|
||||
})
|
||||
|
||||
-- make Neovim's quickfix window better
|
||||
use({
|
||||
"kevinhwang91/nvim-bqf",
|
||||
requires = { { "junegunn/fzf", module = "nvim-bqf" }, config = get_config("nvim-bqf") },
|
||||
})
|
||||
|
||||
-- tab labels
|
||||
use({
|
||||
"akinsho/nvim-bufferline.lua",
|
||||
requires = "kyazdani42/nvim-web-devicons",
|
||||
event = "BufReadPre",
|
||||
config = get_config("bufferline"),
|
||||
})
|
||||
|
||||
-- delete a buffer without messing up your window layout
|
||||
use("famiu/bufdelete.nvim")
|
||||
|
||||
use({ "neovim/nvim-lspconfig", config = get_config("lsp") })
|
||||
|
||||
-- adds vscode-like pictograms
|
||||
use({ "onsails/lspkind-nvim", requires = { "famiu/bufdelete.nvim" } })
|
||||
|
||||
-- use({
|
||||
-- "jose-elias-alvarez/null-ls.nvim",
|
||||
-- requires = { { "nvim-lua/plenary.nvim" } },
|
||||
-- config = get_config("null-ls"),
|
||||
-- })
|
||||
|
||||
-- A tree like view for symbols
|
||||
use({
|
||||
"simrat39/symbols-outline.nvim",
|
||||
cmd = { "SymbolsOutline" },
|
||||
config = get_config("symbols"),
|
||||
})
|
||||
|
||||
-- adds indentation guides to all lines
|
||||
use({
|
||||
"lukas-reineke/indent-blankline.nvim",
|
||||
event = "BufReadPre",
|
||||
config = [[require("config/indent-blankline")]],
|
||||
})
|
||||
|
||||
-- use({
|
||||
-- "akinsho/nvim-toggleterm.lua",
|
||||
-- keys = { "<C-n>", "<leader>fl", "<leader>gt" },
|
||||
-- config = get_config("toggleterm"),
|
||||
-- })
|
||||
|
||||
-- highlights todos
|
||||
use({
|
||||
"folke/todo-comments.nvim",
|
||||
requires = "nvim-lua/plenary.nvim",
|
||||
config = get_config("todo"),
|
||||
})
|
||||
|
||||
-- some kinda project management
|
||||
-- https://github.com/ahmedkhalf/project.nvim
|
||||
use({ "ahmedkhalf/project.nvim", config = get_config("project") })
|
||||
|
||||
-- text highlighting
|
||||
use("ironhouzi/starlite-nvim")
|
||||
|
||||
-- popup with possible key bindings of the command you started typing
|
||||
use({ "folke/which-key.nvim", config = get_config("which-key") })
|
||||
|
||||
-- alignment
|
||||
use("junegunn/vim-easy-align") -- no lua alternative, https://github.com/Vonr/align.nvim not working for me
|
||||
|
||||
--
|
||||
-- literally a grammer checker
|
||||
-- https://github.com/rhysd/vim-grammarous
|
||||
use({ "rhysd/vim-grammarous", cmd = "GrammarousCheck" })
|
||||
|
||||
-- automatically highlighting other uses of the current word under the cursor
|
||||
-- https://github.com/RRethy/vim-illuminate
|
||||
use({ "RRethy/vim-illuminate" })
|
||||
|
||||
-- lf is a terminal file manager
|
||||
use({
|
||||
"ptzz/lf.vim",
|
||||
requires = "voldikss/vim-floaterm",
|
||||
config = get_config("lf"),
|
||||
})
|
||||
|
||||
-- themes
|
||||
if settings.theme == "nightfox" then
|
||||
use({ "EdenEast/nightfox.nvim", config = get_config("nightfox") })
|
||||
elseif settings.theme == "catppuccino" then
|
||||
use({ "catppuccin/nvim", as = "catppuccin", config = get_config("catppuccin") })
|
||||
else
|
||||
use({ "catppuccin/nvim", as = "catppuccin", config = get_config("catppuccin") })
|
||||
end
|
||||
|
||||
--
|
||||
use({
|
||||
"ThePrimeagen/harpoon",
|
||||
requires = { "nvim-lua/plenary.nvim" },
|
||||
config = get_config("harpoon"),
|
||||
})
|
||||
|
||||
use({ "folke/zen-mode.nvim", cmd = "ZenMode", config = get_config("zen-mode") })
|
||||
|
||||
use({ "folke/twilight.nvim", config = get_config("twilight") })
|
||||
|
||||
use({ "tweekmonster/startuptime.vim" })
|
||||
|
||||
use({ "ggandor/lightspeed.nvim" })
|
||||
|
||||
use({ "ray-x/go.nvim", config = get_config("go"), ft = { "go" } })
|
||||
|
||||
use({ "LudoPinelli/comment-box.nvim", config = get_config("comment-box") })
|
||||
|
||||
use({ "rcarriga/nvim-notify", config = get_config("notify") })
|
||||
|
||||
use({ "echasnovski/mini.nvim", branch = "stable", config = get_config("mini") })
|
||||
|
||||
use({
|
||||
"https://gitlab.com/yorickpeterse/nvim-window.git",
|
||||
config = get_config("nvim-window"),
|
||||
})
|
||||
|
||||
use({
|
||||
"waylonwalker/Telegraph.nvim",
|
||||
config = function()
|
||||
require("telegraph").setup({})
|
||||
end,
|
||||
})
|
||||
|
||||
use({ "rhysd/conflict-marker.vim" })
|
||||
|
||||
use({ "edluffy/specs.nvim", config = get_config("specs") })
|
||||
|
||||
use({ "mfussenegger/nvim-ts-hint-textobject" })
|
||||
|
||||
use({
|
||||
"goolord/alpha-nvim",
|
||||
requires = { "kyazdani42/nvim-web-devicons" },
|
||||
config = get_config("alpha-nvim"),
|
||||
})
|
||||
|
||||
use({ "SmiteshP/nvim-navic" })
|
||||
|
||||
use({
|
||||
"j-hui/fidget.nvim",
|
||||
config = function()
|
||||
require("fidget").setup({})
|
||||
end,
|
||||
})
|
||||
end)
|
Reference in New Issue
Block a user