This repository has been archived by the owner on Oct 2, 2023. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 4
/
plugins.lua
145 lines (116 loc) · 2.94 KB
/
plugins.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
local ensure_packer = function()
local fn = vim.fn
local install_path = fn.stdpath("data") .. "/site/pack/packer/start/packer.nvim"
if fn.empty(fn.glob(install_path)) > 0 then
fn.system({ "git", "clone", "--depth", "1", "https://github.com/wbthomason/packer.nvim", install_path })
print("Installing packer...")
vim.cmd([[packadd packer.nvim]])
return true
end
return false
end
local packer_bootstrap = ensure_packer()
-- reload neovim whenever plugins.lua is saved
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")
-- color scheme
use("rebelot/kanagawa.nvim")
-- treesitter
use({
"nvim-treesitter/nvim-treesitter",
run = ":TSUpdate",
})
use("nvim-treesitter/nvim-treesitter-textobjects")
-- automatic bracket pairs
use({
"windwp/nvim-autopairs",
config = function()
require("nvim-autopairs").setup({})
end,
})
-- autoclose and rename html tags
use({
"windwp/nvim-ts-autotag",
config = function()
require("nvim-ts-autotag").setup({})
end,
})
-- indent guides
use("lukas-reineke/indent-blankline.nvim")
-- smooth scrolling
use("karb94/neoscroll.nvim")
-- git decorations in files
use({
"lewis6991/gitsigns.nvim",
config = function()
require("gitsigns").setup()
end,
})
-- surround selections
use("kylechui/nvim-surround")
-- commenting
use({
"numToStr/Comment.nvim",
config = function()
require("Comment").setup({
pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(),
})
end,
})
use("JoosepAlviste/nvim-ts-context-commentstring")
-- telescope
use({
"nvim-telescope/telescope.nvim",
tag = "0.1.0",
requires = { { "nvim-lua/plenary.nvim" } },
})
-- telescope code actions ui
use("nvim-telescope/telescope-ui-select.nvim")
-- telescope file browser
use("nvim-telescope/telescope-file-browser.nvim")
-- status line
use({
"nvim-lualine/lualine.nvim",
requires = { "kyazdani42/nvim-web-devicons", opt = true },
})
-- snippets
use("L3MON4D3/LuaSnip")
use("rafamadriz/friendly-snippets")
-- lsp
use("neovim/nvim-lspconfig")
-- lsp installer
use("williamboman/mason.nvim")
use("williamboman/mason-lspconfig.nvim")
-- lsp ui
use("glepnir/lspsaga.nvim")
-- formatting, code actions and diagnostics
use({
"jose-elias-alvarez/null-ls.nvim",
commit = "76d0573fc159839a9c4e62a0ac4f1046845cdd50",
})
-- diagnostics list
use("folke/trouble.nvim")
-- autocompletion
use("hrsh7th/nvim-cmp")
use("hrsh7th/cmp-buffer")
use("hrsh7th/cmp-nvim-lsp")
use("hrsh7th/cmp-nvim-lua")
use("hrsh7th/cmp-path")
use("saadparwaiz1/cmp_luasnip")
if packer_bootstrap then
require("packer").sync()
end
end,
config = {
display = {
open_fn = require("packer.util").float,
},
},
})