-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpacker.lua
153 lines (133 loc) · 3.56 KB
/
packer.lua
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
-- automatically install packer if not installed
local ensure_packer_installed = function()
local install_path = vim.fn.stdpath('data') .. '/site/pack/packer/start/packer.nvim'
if vim.fn.empty(vim.fn.glob(install_path)) > 0 then
PACKER_BOOTSTRAP = vim.fn.system({
'git',
'clone',
'--depth',
'1',
'https://github.com/wbthomason/packer.nvim',
install_path,
})
print('Installing packer...')
vim.cmd([[packadd packer.nvim]])
end
end
local _ = ensure_packer_installed()
local status_ok, packer = pcall(require, 'packer')
if not status_ok then
return
end
local opts = {
display = {
open_fn = function()
return require('packer.util').float({ border = 'rounded' })
end,
},
}
packer.init(opts)
packer.startup(function(use)
use('wbthomason/packer.nvim')
-- Utils
use('nvim-lua/plenary.nvim')
use('kyazdani42/nvim-web-devicons')
use('MunifTanjim/nui.nvim')
use('windwp/nvim-autopairs')
use('rcarriga/nvim-notify')
use('lewis6991/impatient.nvim')
-- Syntax highligther
use({
'nvim-treesitter/nvim-treesitter',
run = function()
require('nvim-treesitter.install').update({
with_sync = true,
})
end,
})
-- Telescope
use({ 'nvim-telescope/telescope.nvim', tag = '0.1.0' })
use({ 'nvim-telescope/telescope-fzf-native.nvim', run = 'make' })
-- LSP
use({
'williamboman/mason.nvim',
'williamboman/mason-lspconfig.nvim',
'neovim/nvim-lspconfig',
})
use('ray-x/lsp_signature.nvim')
use('onsails/lspkind.nvim')
use('folke/trouble.nvim')
use({ 'j-hui/fidget.nvim', tag = 'legacy' }) -- use legacy until rewrite
-- Formatting
use('jose-elias-alvarez/null-ls.nvim')
use('tpope/vim-sleuth')
-- Autocompletion
use('hrsh7th/cmp-nvim-lsp')
use('hrsh7th/cmp-buffer')
use('hrsh7th/cmp-path')
use('hrsh7th/cmp-emoji')
use('hrsh7th/cmp-cmdline')
use('hrsh7th/nvim-cmp')
-- Snippets
use('L3MON4D3/LuaSnip')
use('saadparwaiz1/cmp_luasnip')
use('rafamadriz/friendly-snippets')
-- UI
use({ 'akinsho/bufferline.nvim', tag = 'v2.*' })
use({ 'nvim-lualine/lualine.nvim' })
use('lukas-reineke/indent-blankline.nvim')
use('goolord/alpha-nvim')
use('norcalli/nvim-colorizer.lua')
use({ 'anuvyklack/windows.nvim', requires = {
'anuvyklack/middleclass',
} })
use('petertriho/nvim-scrollbar')
use('stevearc/aerial.nvim')
-- Colorschemes
use('f1zm0/tokyonight.nvim')
-- Sessions
use('rmagatti/auto-session')
use({
'rmagatti/session-lens',
requires = { 'rmagatti/auto-session', 'nvim-telescope/telescope.nvim' },
})
-- File explorer
use('kyazdani42/nvim-tree.lua')
-- Git integration
use('lewis6991/gitsigns.nvim')
use({ 'NeogitOrg/neogit', requires = 'nvim-lua/plenary.nvim' })
use({ 'sindrets/diffview.nvim', requires = 'nvim-lua/plenary.nvim' })
-- Comments
use('terrortylor/nvim-comment')
use('folke/todo-comments.nvim')
-- Markdown support
use({
'iamcco/markdown-preview.nvim',
run = function()
fn['mkdp#util#install']()
end,
})
use('mzlogin/vim-markdown-toc')
-- Copilot integration
use({
'zbirenbaum/copilot.lua',
event = 'InsertEnter',
config = function()
vim.defer_fn(function()
local opts = require('hvim.plugins.copilot').options
require('copilot').setup(opts)
end, 100)
end,
})
use({
'zbirenbaum/copilot-cmp',
after = { 'copilot.lua' },
config = function()
require('copilot_cmp').setup()
end,
})
-- Auto-install plugins after setting up packer
if PACKER_BOOTSTRAP then
packer.sync()
end
end)