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

88 lines
2.1 KiB
Lua
Raw Normal View History

2022-09-19 07:47:06 -04:00
local ensure_packer = function()
local fn = vim.fn
2023-03-08 08:20:53 -05:00
local install_path = fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
2022-09-19 07:47:06 -04:00
if fn.empty(fn.glob(install_path)) > 0 then
2023-03-08 08:20:53 -05:00
fn.system({ 'git', 'clone', '--depth', '1', 'https://github.com/wbthomason/packer.nvim', install_path })
vim.cmd 'packadd packer.nvim'
2022-09-19 07:47:06 -04:00
return true
end
return false
end
local packer_bootstrap = ensure_packer()
vim.cmd([[
augroup packer_user_config
autocmd!
autocmd BufWritePost plugins.lua source <afile> | PackerSync
augroup end
]])
return require('packer').startup(function(use)
use 'wbthomason/packer.nvim'
use 'tpope/vim-sensible'
use 'tpope/vim-surround'
use 'tpope/vim-commentary'
use 'tpope/vim-repeat'
use 'tpope/vim-dispatch'
use 'tpope/vim-abolish'
use {
'tpope/vim-fugitive',
'tpope/vim-rhubarb',
}
use 'christoomey/vim-sort-motion'
use 'christoomey/vim-tmux-navigator'
use {
'kana/vim-textobj-user',
'kana/vim-textobj-indent',
'kana/vim-textobj-line',
}
use 'sheerun/vim-polyglot'
use {
'nvim-treesitter/nvim-treesitter',
run = function()
local ts_update = require('nvim-treesitter.install').update({ with_sync = true })
ts_update()
end,
config = function()
require('nvim-treesitter.configs').setup({
indent = { enable = true },
highlight = { enable = true },
})
end,
}
2022-09-19 07:47:06 -04:00
use {
'nvim-telescope/telescope.nvim', tag = '0.1.0',
requires = {
{ 'nvim-lua/plenary.nvim' },
{ 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' },
{ 'xiyaowong/telescope-emoji.nvim' },
2022-09-19 07:47:06 -04:00
},
config = function()
require('telescope').setup({
defaults = { preview = false }
})
2022-09-19 07:47:06 -04:00
require('telescope').load_extension('fzf')
require('telescope').load_extension('emoji')
2022-09-19 07:47:06 -04:00
end
}
use { 'folke/which-key.nvim', config = function() require('keys') end }
use 'preservim/nerdtree'
use { 'dracula/vim', as = 'dracula' }
-- Automatically set up your configuration after cloning packer.nvim
-- Put this at the end after all plugins
if packer_bootstrap then
require('packer').sync()
end
end)