-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathplugins.lua
276 lines (257 loc) · 9.58 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
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
local overrides = require "custom.configs.overrides"
---@type NvPluginSpec[]
local plugins = {
-- Override plugin definition options
{
"neovim/nvim-lspconfig",
event = "BufEnter",
init = function()
require("core.utils").lazy_load "nvim-lspconfig"
end,
dependencies = {
-- -- format & linting
{
"jose-elias-alvarez/null-ls.nvim",
config = function()
require("custom.configs.null-ls").setup()
end,
},
},
lazy = false,
config = function()
local config = require "plugins.configs.lspconfig"
require("custom.configs.lspconfig").setup(config.on_attach, config.capabilities)
end, -- Override to setup mason-lspconfig
},
-- {
-- "mfussenegger/nvim-lint",
-- event = "VeryLazy",
-- config = function ()
-- require('custom.configs.nvim-lint')
-- end,
-- },
{
"hrsh7th/nvim-cmp",
opts = overrides.cmp,
},
-- override plugin configs
{
"williamboman/mason.nvim",
opts = overrides.mason,
},
{
"nvim-treesitter/nvim-treesitter",
opts = {
ensure_installed = {
"vim",
"lua",
"html",
"css",
"javascript",
"typescript",
"tsx",
"c",
"markdown",
"rust",
"toml",
"markdown_inline",
},
highlight = {
enable = true,
additional_vim_regex_highlighting = false,
},
indent = {
enable = false,
additional_vim_regex_highlighting = false,
-- disable = {
-- "python"
-- },
},
},
-- config = function(_, opts)
-- require("nvim-treesitter.configs").setup(opts)
--
-- -- local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
-- -- parser_config.tsx.filetype_to_parsername = { "javascript", "typescript.tsx" }
-- end,
lazy = false,
},
{
"nvim-tree/nvim-tree.lua",
opts = overrides.nvimtree,
},
{
"nvim-telescope/telescope.nvim",
lazy = false,
},
-- Install a plugin
{
"max397574/better-escape.nvim",
event = "InsertEnter",
config = function()
require("better_escape").setup {
timeout = 100,
}
end,
},
-- To make a plugin not be loaded
{
"NvChad/nvim-colorizer.lua",
init = function()
require("core.utils").lazy_load "nvim-colorizer.lua"
end,
config = function(_, opts)
require("colorizer").setup {
filetypes = {
"css",
"javascript",
"html",
},
user_default_options = { mode = "virtualtext" },
}
-- execute colorizer as soon as possible
vim.defer_fn(function()
require("colorizer").attach_to_buffer(0)
end, 0)
end,
},
{
"gelguy/wilder.nvim",
event = "CmdlineEnter",
config = function()
local wilder = require "wilder"
wilder.setup {
modes = { ":", "/", "?" },
next_key = "<C-n>",
previous_key = "<C-p>",
accept_key = "<Tab>",
reject_key = "<S-Tab>",
}
wilder.set_option(
"renderer",
wilder.popupmenu_renderer(wilder.popupmenu_border_theme {
highlighter = wilder.basic_highlighter(),
left = { " ", wilder.popupmenu_devicons() },
right = { " ", wilder.popupmenu_scrollbar() },
accent = wilder.make_hl("WilderAccent", "Pmenu", { { a = 1 }, { a = 1 }, { foreground = "#f4468f" } }),
-- separator = " · ",
-- left = { " ", wilder.wildmenu_spinner(), " " }, -- Show spinner
-- right = { " ", wilder.wildmenu_index() }, -- Show number of items
highlights = {
border = "Normal", -- highlight to use for the border
},
-- pumblend = 20, -- Opacity
-- 'single', 'double', 'rounded' or 'solid'
-- can also be a list of 8 characters, see :h wilder#popupmenu_border_theme() for more details
border = "rounded",
})
)
end,
},
{
"lukas-reineke/indent-blankline.nvim",
enabled = false,
-- event = ""
-- init = function()
-- require("core.utils").lazy_load "indent-blankline.nvim"
-- end,
-- opts = function()
-- return require("plugins.configs.others").blankline
-- end,
-- config = function(_, opts)
-- require("core.utils").load_mappings "blankline"
-- dofile(vim.g.base46_cache .. "blankline")
-- require("indent_blankline").setup(opts)
-- end,
},
{
"SmiteshP/nvim-navic",
requires = "neovim/nvim-lspconfig",
},
{
"simrat39/rust-tools.nvim",
event = "BufEnter",
-- init = function()
-- require("core.utils").lazy_load "nvim-lspconfig"
-- end,
-- -- event = "BufEnter",
dependencies = {
"neovim/nvim-lspconfig",
"nvim-lua/plenary.nvim",
"mfussenegger/nvim-dap",
"nvim-telescope/telescope.nvim",
},
config = function()
require("custom.configs.rust-tools").setup()
end, -- Override to setup mason-lspconfig
},
{
"ThePrimeagen/git-worktree.nvim",
dependencies = {
"nvim-telescope/telescope.nvim",
},
config = function(_, opts)
require("git-worktree").setup({
-- change_directory_command = <str> -- default: "cd",
-- update_on_change = <boolean> -- default: true,
-- update_on_change_command = <str> -- default: "e .",
-- clearjumps_on_change = <boolean> -- default: true,
-- autopush = <boolean> -- default: false,
})
require("telescope").load_extension("git_worktree")
-- -- Creates a worktree. Requires the path, branch name, and the upstream
-- -- Example:
-- :lua require("git-worktree").create_worktree("feat-69", "master", "origin")
--
-- -- switches to an existing worktree. Requires the path name
-- -- Example:
-- :lua require("git-worktree").switch_worktree("feat-69")
--
-- -- deletes to an existing worktree. Requires the path name
-- -- Example:
-- :lua require("git-worktree").delete_worktree("feat-69")
vim.keymap.set("n", "<leader>gwt", function()
require('telescope').extensions.git_worktree.git_worktrees()
end, { desc = "Manage [G]it [W]ork [T]rees" })
end,
event = "VeryLazy",
},
{
"theprimeagen/harpoon",
config = function(_, opts)
require("custom.configs.harpoon").setup()
end,
event = "VeryLazy",
},
{
"andweeb/presence.nvim",
event = "VeryLazy",
config = function()
-- The setup config table shows all available config options with their default values:
require("presence").setup({
-- General options
auto_update = true, -- Update activity based on autocmd events (if `false`, map or manually execute `:lua package.loaded.presence:update()`)
neovim_image_text = "NeoVim dees nuts", -- Text displayed when hovered over the Neovim image
-- neovim_image_text = "The One True Text Editor", -- Text displayed when hovered over the Neovim image
main_image = "neovim", -- Main image display (either "neovim" or "file")
client_id = "793271441293967371", -- Use your own Discord application client id (not recommended)
log_level = nil, -- Log messages at or above this level (one of the following: "debug", "info", "warn", "error")
debounce_timeout = 10, -- Number of seconds to debounce events (or calls to `:lua package.loaded.presence:update(<filename>, true)`)
enable_line_number = false, -- Displays the current line number instead of the current project
blacklist = {}, -- A list of strings or Lua patterns that disable Rich Presence if the current file name, path, or workspace matches
buttons = true, -- Configure Rich Presence button(s), either a boolean to enable/disable, a static table (`{{ label = "<label>", url = "<url>" }, ...}`, or a function(buffer: string, repo_url: string|nil): table)
file_assets = {}, -- Custom file asset definitions keyed by file names and extensions (see default config at `lua/presence/file_assets.lua` for reference)
show_time = true, -- Show the timer
-- Rich Presence text options
editing_text = "Editing %s", -- Format string rendered when an editable file is loaded in the buffer (either string or function(filename: string): string)
file_explorer_text = "Browsing %s", -- Format string rendered when browsing a file explorer (either string or function(file_explorer_name: string): string)
git_commit_text = "Committing changes", -- Format string rendered when committing changes in git (either string or function(filename: string): string)
plugin_manager_text = "Managing plugins", -- Format string rendered when managing plugins (either string or function(plugin_manager_name: string): string)
reading_text = "Reading %s", -- Format string rendered when a read-only or unmodifiable file is loaded in the buffer (either string or function(filename: string): string)
workspace_text = "Working on %s", -- Format string rendered when in a git repository (either string or function(project_name: string|nil, filename: string): string)
line_number_text = "Line %s out of %s", -- Format string rendered when `enable_line_number` is set to true (either string or function(line_number: number, line_count: number): string)
})
end
},
}
return plugins