-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathplugins.lua
More file actions
596 lines (556 loc) · 15.3 KB
/
plugins.lua
File metadata and controls
596 lines (556 loc) · 15.3 KB
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
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
---@type NvPluginSpec[]
local plugins = {
-- Show Indentlines
{
"lukas-reineke/indent-blankline.nvim",
enabled = false,
},
-- Keymaps Popup
{
"folke/which-key.nvim",
opts = {
icons = {
breadcrumb = "»", -- symbol used in the command line area that shows your active key combo
separator = "➜", -- symbol used between a key and it's label
group = "", -- symbol prepended to a group
},
},
config = function(_, opts)
dofile(vim.g.base46_cache .. "whichkey")
require("which-key").setup(opts)
require("which-key").register {
{
["<leader>"] = {
d = { name = " Debugger" },
r = { name = " Runner" },
s = { name = " Sessions" },
f = { name = " Find" },
g = { name = " Git" },
l = { name = " LSP" },
n = { name = " Neovim" },
o = { name = " Options" },
p = { name = " Plugins" },
t = { name = " Terminal" },
T = { name = " Tests" },
},
},
}
end,
},
-- Peek At Lines
{
"nacro90/numb.nvim",
event = "CmdlineEnter",
config = true,
},
-- Completion Engine
{
"hrsh7th/nvim-cmp",
event = { "InsertEnter", "CmdlineEnter" },
opts = function()
local cmp = require "cmp"
cmp.setup.cmdline(":", {
mapping = cmp.mapping.preset.cmdline(),
sources = {
{ name = "cmdline" },
},
})
end,
config = function(_, opts)
table.insert(opts.sources, 2, { name = "codeium" })
opts.mapping = vim.tbl_extend("force", {}, opts.mapping, {
-- You can add here new mappings.
})
opts.completion["completeopt"] = "menu,menuone,noselect" -- disable autoselect
require("cmp").setup(opts)
end,
dependencies = {
{
"saecki/crates.nvim",
tag = "v0.4.0",
opts = {},
},
-- Commandline completions
{
"hrsh7th/cmp-cmdline",
},
-- AI Autocomplete
{
"Exafunction/codeium.nvim",
opts = {},
},
{
"L3MON4D3/LuaSnip",
dependencies = "rafamadriz/friendly-snippets",
},
},
},
-- Preview colors
{
"NvChad/nvim-colorizer.lua",
opts = require "custom.configs.colorizer",
},
-- Utilities
{
"nvim-lua/plenary.nvim",
},
-- Native LSP
{
"neovim/nvim-lspconfig",
config = function()
require "custom.configs.lspconfig"
end,
dependencies = {
-- Formatting
{
"stevearc/conform.nvim",
opts = require "custom.configs.conform",
},
-- Linting
{
"mfussenegger/nvim-lint",
enabled = false,
config = function()
require "custom.configs.nvim-lint"
end,
},
-- For Typescript
{
"pmizio/typescript-tools.nvim",
opts = {
settings = {
tsserver_file_preferences = {
includeInlayParameterNameHints = "all",
includeCompletionsForModuleExports = true,
quotePreference = "auto",
},
},
},
},
-- Start/Stop LSP when focus is lost/gained
-- {
-- "hinell/lsp-timeout.nvim",
-- config = function()
-- vim.g["lsp-timeout-config"] = {
-- stopTimeout = 0,
-- startTimeout = 1,
-- silent = true, -- true to suppress notifications
-- }
-- end,
-- },
-- Package Installer
{
"williamboman/mason.nvim",
init = function()
require("core.utils").load_mappings "Mason"
require("core.utils").load_mappings "LSP"
end,
cmd = {
"Mason",
"MasonInstall",
"MasonInstallAll",
"MasonUpdate",
"MasonUninstall",
"MasonUninstallAll",
"MasonLog",
},
opts = require "custom.configs.mason",
dependencies = "williamboman/mason-lspconfig.nvim",
},
-- Improve Other LSP Functionalities
{
"nvimdev/lspsaga.nvim",
init = function()
require("core.utils").load_mappings "Lspsaga"
end,
opts = require "custom.configs.lspsaga",
},
-- For Plugin Development
{
"folke/neodev.nvim",
opts = require "custom.configs.neodev",
},
},
},
-- Sessions
{
"olimorris/persisted.nvim",
init = function()
require("core.utils").load_mappings "Sessions"
end,
opts = {
save_dir = vim.fn.expand(vim.fn.stdpath "data" .. "/sessions/"), -- directory where session files are saved
silent = false, -- silent nvim message when sourcing session file
use_git_branch = true, -- create session files based on the branch of the git enabled repository
autosave = false, -- automatically save session files when exiting Neovim
should_autosave = nil, -- function to determine if a session should be autosaved
autoload = false, -- automatically load the session for the cwd on Neovim startup
on_autoload_no_session = nil, -- function to run when `autoload = true` but there is no session to load
follow_cwd = true, -- change session file name to match current working directory if it changes
allowed_dirs = nil, -- table of dirs that the plugin will auto-save and auto-load from
ignored_dirs = nil, -- table of dirs that are ignored when auto-saving and auto-loading
telescope = { -- options for the telescope extension
reset_prompt_after_deletion = true, -- whether to reset prompt after session deleted
},
},
},
-- Commenter
{
"numToStr/Comment.nvim",
config = function()
require("Comment").setup {
-- ignores empty lines
ignore = "^$",
pre_hook = require("ts_context_commentstring.integrations.comment_nvim").create_pre_hook(),
}
end,
dependencies = "JoosepAlviste/nvim-ts-context-commentstring",
},
-- File Explorer
{
"nvim-tree/nvim-tree.lua",
init = function()
require("core.utils").load_mappings "NvimTree"
end,
cmd = {
"NvimTreeOpen",
"NvimTreeToggle",
"NvimTreeFocus",
"NvimTreeFindFile",
"NvimTreeFindFileToggle",
},
opts = require "custom.configs.nvim-tree",
},
-- Icons
{
"nvim-tree/nvim-web-devicons",
-- config = function()
-- local icons = require "nvim-web-devicons"
-- icons.set_icon {
-- deb = { icon = "", name = "Deb", color = "#A1B7EE" },
-- }
-- end,
},
-- Tmux navigation
{
"alexghergh/nvim-tmux-navigation",
enabled = function()
if vim.fn.has "win32" == 1 then
return false
end
return true
end,
event = "VeryLazy",
opts = {
keybindings = {
left = "<C-h>",
down = "<C-j>",
up = "<C-k>",
right = "<C-l>",
last_active = "<C-\\>",
next = "<C-Space>",
},
},
},
-- Improve Folds
{
"kevinhwang91/nvim-ufo",
event = "VeryLazy",
init = function()
vim.o.foldcolumn = "1"
vim.o.foldlevel = 99
vim.o.foldlevelstart = 99
vim.o.foldenable = true
vim.o.foldmethod = "indent"
end,
opts = {
provider_selector = function(_, _, _)
return { "treesitter", "indent" }
end,
},
dependencies = {
"kevinhwang91/promise-async",
{
"luukvbaal/statuscol.nvim",
config = function()
local builtin = require "statuscol.builtin"
require("statuscol").setup {
relculright = true,
segments = {
{ text = { builtin.foldfunc, " " }, click = "v:lua.ScFa" },
{ text = { builtin.lnumfunc, " " }, click = "v:lua.ScLa" },
{ text = { "%s" }, click = "v:lua.ScSa" },
},
}
end,
},
},
},
-- Syntax Highlighting
{
"nvim-treesitter/nvim-treesitter",
cmd = {
"TSInstall",
"TSUninstall",
"TSInstallInfo",
"TSUpdate",
"TSBufEnable",
"TSBufDisable",
"TSEnable",
"TSDisable",
"TSModuleInfo",
"TSToggle",
"TSBufToggle",
},
opts = require "custom.configs.treesitter",
config = function(_, opts)
dofile(vim.g.base46_cache .. "syntax")
require("nvim-treesitter.configs").setup(opts)
end,
dependencies = {
"JoosepAlviste/nvim-ts-context-commentstring",
"windwp/nvim-ts-autotag",
"nvim-treesitter/nvim-treesitter-textobjects",
},
},
-- Schemas
{ "b0o/schemastore.nvim" },
-- Manage Projects
{
"ahmedkhalf/project.nvim",
opts = require "custom.configs.project",
event = "VeryLazy",
config = function(_, opts)
require("project_nvim").setup(opts)
end,
},
-- Buffer Delete
{
"moll/vim-bbye",
cmd = { "Bdelete", "Bwipeout" },
},
-- Highlight, List and Search Todo comments in your projects
{
"folke/todo-comments.nvim",
cmd = { "TodoTrouble", "TodoLocList", "TodoQuickFix", "TodoTelescope" },
opts = require "custom.configs.todo-comments",
},
-- NvChad Built-in Terminal
{
"NvChad/nvterm",
enabled = false,
},
{
"nvim-neotest/neotest",
init = function()
require("core.utils").load_mappings "Neotest"
end,
dependencies = {
"nvim-neotest/neotest-python",
"nvim-neotest/neotest-go",
-- "marilari88/neotest-vitest",
-- "nvim-neotest/neotest-jest",
-- "nvim-neotest/neotest-rust",
-- "nvim-neotest/neotest-dotnet",
-- "nvim-neotest/neotest-java",
"nvim-treesitter/nvim-treesitter",
},
config = function()
require "custom.configs.neotest"
end,
},
-- Terminal Integration
{
"akinsho/toggleterm.nvim",
init = function()
require("core.utils").load_mappings "Toggleterm"
end,
cmd = {
"ToggleTerm",
"ToggleTermSendCurrentLine",
"ToggleTermSendVisualLines",
"ToggleTermSendVisualSelection",
},
opts = require "custom.configs.toggleterm",
},
-- Notification
{
"rcarriga/nvim-notify",
event = "VeryLazy",
config = function()
dofile(vim.g.base46_cache .. "notify")
require("notify").setup {
level = 2,
minimum_width = 50,
render = "default",
stages = "fade",
timeout = 3000,
top_down = true,
}
vim.notify = require "notify"
local messages = require "custom.core.messages"
math.randomseed(os.time())
local randomMessage = messages[math.random(#messages)]
if vim.g.startup_message then
vim.notify(randomMessage, vim.log.levels.INFO, { title = "Just For Fun:" })
end
end,
},
-- Improve UI
{
"stevearc/dressing.nvim",
event = "VeryLazy",
opts = require "custom.configs.dressing",
},
-- Search motions
{
"folke/flash.nvim",
event = "CmdlineEnter",
opts = require "custom.configs.flash",
},
-- Fuzzy Finder
{
"nvim-telescope/telescope.nvim",
init = function()
require("core.utils").load_mappings "Telescope"
end,
opts = function()
require "custom.configs.telescope"
end,
dependencies = {
{
"nvim-telescope/telescope-fzf-native.nvim",
build = "make",
enabled = function()
return vim.fn.executable "make" == 1
end,
},
},
},
-- Pretty Diagnostics and Lists
{
"folke/trouble.nvim",
init = function()
require("core.utils").load_mappings "Trouble"
end,
cmd = { "TroubleToggle", "Trouble" },
opts = require "custom.configs.trouble",
},
-- For Java
{
"mfussenegger/nvim-jdtls",
ft = "java",
},
-- Git Signs
{
"lewis6991/gitsigns.nvim",
init = function()
require("core.utils").load_mappings "Git"
-- load gitsigns only when a git file is opened
vim.api.nvim_create_autocmd({ "BufRead" }, {
group = vim.api.nvim_create_augroup("GitSignsLazyLoad", { clear = true }),
callback = function()
vim.fn.system("git -C " .. '"' .. vim.fn.expand "%:p:h" .. '"' .. " rev-parse")
if vim.v.shell_error == 0 then
vim.api.nvim_del_augroup_by_name "GitSignsLazyLoad"
vim.schedule(function()
require("lazy").load { plugins = { "gitsigns.nvim" } }
end)
end
end,
})
end,
},
-- Debugging
{
"rcarriga/nvim-dap-ui",
init = function()
require("core.utils").load_mappings "Dap"
end,
dependencies = {
{
"mfussenegger/nvim-dap",
config = function()
-- NOTE: Check out this for guide
-- https://github.com/mfussenegger/nvim-dap/wiki/Debug-Adapter-installation
local dap = require "dap"
vim.fn.sign_define(
"DapBreakpoint",
{ text = "🛑", texthl = "DiagnosticSignError", linehl = "", numhl = "" }
)
local dapui = require "dapui"
dap.listeners.after.event_initialized["dapui_config"] = function()
dapui.open()
end
-- dap.listeners.before.event_terminated["dapui_config"] = function()
-- dapui.close()
-- end
-- dap.listeners.before.event_exited["dapui_config"] = function()
-- dapui.close()
-- end
-- NOTE: Make sure to install the needed files/exectubles through mason
require "custom.configs.dap.settings.cpptools"
require "custom.configs.dap.settings.netcoredbg"
require "custom.configs.dap.settings.godot"
require "custom.configs.dap.settings.bash-debug-adapter"
require "custom.configs.dap.settings.php-debug-adapter"
require "custom.configs.dap.settings.dart-debug-adapter"
require "custom.configs.dap.settings.chrome-debug-adapter"
require "custom.configs.dap.settings.firefox-debug-adapter"
require "custom.configs.dap.settings.java-debug"
require "custom.configs.dap.settings.node-debug2"
require "custom.configs.dap.settings.debugpy"
require "custom.configs.dap.settings.go-debug-adapter"
require "custom.configs.dap.settings.js-debug"
end,
},
},
opts = require "custom.configs.dap.ui",
},
-- Preview Markdown
{
"iamcco/markdown-preview.nvim",
init = function()
require("core.utils").load_mappings "MarkdownPreview"
end,
build = function()
vim.fn["mkdp#util#install"]()
end,
ft = "markdown",
},
-- Show diffs
{
"sindrets/diffview.nvim",
event = "VeryLazy",
},
-- UI for messages, cmdline, and popup
{
"folke/noice.nvim",
opts = require "custom.configs.noice",
dependencies = { { "MunifTanjim/nui.nvim" }, { "rcarriga/nvim-notify" } },
},
-- Code Runner
{
"Zeioth/compiler.nvim",
init = function()
require("core.utils").load_mappings "Compiler"
end,
cmd = { "CompilerOpen", "CompilerToggleResults", "CompilerRedo" },
dependencies = {
{
"stevearc/overseer.nvim",
commit = "400e762648b70397d0d315e5acaf0ff3597f2d8b",
opts = {
task_list = {
direction = "bottom",
min_height = 10,
max_height = 15,
default_detail = 1,
},
},
},
},
opts = {},
},
}
return plugins