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

208 lines
5.2 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 close and reopen Neovim..."
vim.cmd [[packadd packer.nvim]]
end
-- Autocommand that reloads neovim whenever you save the plugins.lua file
vim.cmd [[
augroup packer_user_config
autocmd!
autocmd BufWritePost plugins.lua source <afile> | PackerSync
augroup end
]]
-- Use a protected call so we don't error out on first use
local status_ok, packer = pcall(require, "packer")
if not status_ok then
return
end
-- Have packer use a popup window
packer.init {
display = {
open_fn = function()
return require("packer.util").float { border = "rounded" }
end,
},
}
return packer.startup(function(use)
-- Packer can manage itself
use 'wbthomason/packer.nvim'
use 'morhetz/gruvbox'
-- Status line
use {
'hoob3rt/lualine.nvim',
config = [[require('config.lualine')]],
}
use 'tpope/vim-fugitive'
-- use 'mhinz/vim-signify'
use {
'lewis6991/gitsigns.nvim',
config = [[require('config.gitsigns')]],
}
use 'tpope/vim-surround'
use 'tpope/vim-repeat'
use 'tpope/vim-abolish'
use {
"williamboman/mason.nvim",
"williamboman/mason-lspconfig.nvim",
'neovim/nvim-lspconfig',
requires = {
"hrsh7th/cmp-nvim-lsp",
}
}
use {
'hrsh7th/nvim-cmp',
event = 'InsertEnter',
config = [[require('completion')]],
requires = {
'hrsh7th/vim-vsnip',
'hrsh7th/vim-vsnip-integ',
-- 'rafamadriz/friendly-snippets',
},
}
use { 'hrsh7th/cmp-vsnip', after = 'nvim-cmp' }
use { 'hrsh7th/cmp-buffer', after = 'nvim-cmp' }
use { 'hrsh7th/cmp-path', after = 'nvim-cmp' }
use { 'hrsh7th/cmp-nvim-lsp', after = 'nvim-cmp' }
use { 'hrsh7th/cmp-cmdline', after = 'nvim-cmp' }
-- use {'f3fora/cmp-spell', after = 'nvim-cmp'}
-- for formatters and linters
use {
"jose-elias-alvarez/null-ls.nvim",
config = [[require('config.null-ls')]],
requires = {
"jayp0521/mason-null-ls.nvim"
}
}
use 'nvim-lua/popup.nvim'
use {
'nvim-telescope/telescope.nvim',
config = [[require('config.telescope')]],
requires = { 'nvim-lua/plenary.nvim' }
}
use { 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' }
use {
"nvim-telescope/telescope-file-browser.nvim"
}
use {
'nvim-tree/nvim-tree.lua',
requires = {
'nvim-tree/nvim-web-devicons', -- optional
},
config = [[require('config.nvimtree')]],
}
use {
'lervag/vimtex',
config = [[require('config.vimtex')]],
}
-- Highlight on Yank
use 'machakann/vim-highlightedyank'
-- Autoclose parenthesis
-- use 'jiangmiao/auto-pairs'
use {
'windwp/nvim-autopairs',
config = [[ require('config.autopairs') ]]
}
use 'kyazdani42/nvim-web-devicons'
use 'christoomey/vim-tmux-navigator'
use {
'nvim-treesitter/nvim-treesitter',
config = [[require('config.treesitter')]],
run = ':TSUpdate',
}
use {
'norcalli/nvim-colorizer.lua',
config = [[require('config.colorizer')]],
}
use {
"mickael-menu/zk-nvim",
config = [[require('config.zk')]]
}
-- use {
-- 'renerocksai/telekasten.nvim',
-- requires = {
-- 'nvim-telescope/telescope.nvim',
-- 'nvim-lua/plenary.nvim',
-- 'renerocksai/calendar-vim'
-- },
-- config = [[require('config.telekasten')]]
-- }
use {
"folke/which-key.nvim",
config = function()
vim.o.timeout = true
vim.o.timeoutlen = 300
require("which-key").setup {
-- your configuration comes here
-- or leave it empty to use the default settings
-- refer to the configuration section below
}
end
}
use({
"folke/noice.nvim",
config = function()
require("noice").setup({
-- add any options here
})
end,
requires = {
-- if you lazy-load any plugin below, make sure to add proper `module="..."` entries
"MunifTanjim/nui.nvim",
-- OPTIONAL:
-- `nvim-notify` is only needed, if you want to use the notification view.
-- If not available, we use `mini` as the fallback
"rcarriga/nvim-notify",
}
})
use {
'echasnovski/mini.indentscope',
config = function ()
require('mini.indentscope').setup()
end
}
use {
"lukas-reineke/indent-blankline.nvim",
config = [[require('config.indentblankline')]]
}
if PACKER_BOOTSTRAP then
require("packer").sync()
end
end)