-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugins.lua
174 lines (153 loc) · 4.41 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
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
local overrides = require("custom.configs.overrides")
local plugins = {
{
"kdheepak/lazygit.nvim",
-- optional for floating window border decoration
dependencies = {
"nvim-lua/plenary.nvim",
},
event = "VeryLazy",
init = function()
require("core.utils").load_mappings("lazygit")
end,
},
{
"christoomey/vim-tmux-navigator",
lazy = false,
},
{
"nvim-treesitter/nvim-treesitter-context",
event = "VeryLazy",
},
{
"folke/persistence.nvim",
event = "BufReadPre",
opts = { options = { "buffers", "curdir", "tabpages", "winsize", "help", "globals", "skiprtp" } },
-- stylua: ignore
keys = {
{ "<leader>rs", function() require("persistence").load() end, desc = "Restore Session" },
{ "<leader>rls", function() require("persistence").load({ last = true }) end, desc = "Restore Last Session" },
},
},
{
"nvim-telescope/telescope.nvim",
dependencies = {
{
"HUAHUAI23/telescope-dapzzzz",
lazy = false,
},
},
opts = overrides.telescope,
},
{
"hrsh7th/nvim-cmp",
config = function()
local opts = require("plugins.configs.cmp")
local other_opts = require("custom.configs.cmp")
local merge_tb = vim.tbl_deep_extend
opts = merge_tb("force", opts, other_opts)
require("cmp").setup(opts)
end,
},
{
"echasnovski/mini.indentscope",
version = false, -- wait till new 0.7.0 release to put it back on semver
event = { "BufReadPre", "BufNewFile" },
opts = { symbol = "│", options = { try_as_border = true } },
init = function()
vim.api.nvim_create_autocmd("FileType", {
pattern = { "help", "nvim-tree", "Trouble", "lazy", "mason" },
callback = function()
vim.b.miniindentscope_disable = true
end,
})
end,
config = function(_, opts)
require("mini.indentscope").setup(opts)
end,
},
{ "tpope/vim-repeat", event = "VeryLazy" },
{
"RRethy/vim-illuminate",
event = { "BufReadPost", "BufNewFile" },
opts = { delay = 200 },
config = function(_, opts)
require("illuminate").configure(opts)
local function map(key, dir, buffer)
vim.keymap.set("n", key, function()
require("illuminate")["goto_" .. dir .. "_reference"](false)
end, {
desc = dir:sub(1, 1):upper() .. dir:sub(2) .. " Reference",
buffer = buffer,
})
end
map("]]", "next")
map("[[", "prev")
-- also set it after loading ftplugins, since a lot overwrite [[ and ]]
vim.api.nvim_create_autocmd("FileType", {
callback = function()
local buffer = vim.api.nvim_get_current_buf()
map("]]", "next", buffer)
map("[[", "prev", buffer)
end,
})
end,
keys = {
{ "]]", desc = "Next Reference" },
{ "[[", desc = "Prev Reference" },
},
},
{
"kylechui/nvim-surround", -- Surround
lazy = false,
config = function()
require("nvim-surround").setup({})
end,
},
{
"p00f/clangd_extensions.nvim", -- clangd extension, some good stuff
ft = { "c", "cpp" },
-- opts = overrides.clangd_extensions,
-- config = function()
-- require "custom.configs.clangd_extensions"
-- end,
},
{
"simrat39/rust-tools.nvim", -- rust, rust, it's rust!
ft = { "rust" },
-- opts = overrides.rust_tools,
-- config = function()
-- require "custom.configs.rust_tools"
-- end,
}, -- better diagnostics list and others
{
"folke/trouble.nvim",
cmd = { "TroubleToggle", "Trouble" },
opts = { use_diagnostic_signs = true },
},
{
"neovim/nvim-lspconfig",
dependencies = {
-- format & linting
{
"nvimtools/none-ls.nvim",
config = function()
require("custom.configs.null-ls")
end,
},
},
config = function()
require("plugins.configs.lspconfig")
require("custom.configs.lspconfig")
end, -- Override to setup mason-lspconfig
}, -- override plugin configs
{ "williamboman/mason.nvim", opts = overrides.mason },
{ "nvim-treesitter/nvim-treesitter", opts = overrides.treesitter },
{ "lewis6991/gitsigns.nvim", opts = overrides.gitsigns },
{ "nvim-tree/nvim-tree.lua", lazy = false, opts = overrides.nvimtree },
{
"NvChad/nvterm",
enabled = false,
},
}
return plugins