-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathui.lua
More file actions
263 lines (249 loc) · 6.07 KB
/
Copy pathui.lua
File metadata and controls
263 lines (249 loc) · 6.07 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
local harpoon_spec = {
"ThePrimeagen/harpoon",
keys = {
{
'<leader>ha',
function()
require('harpoon.mark').add_file()
end,
mode = 'n',
desc = "Add to Harpoon"
},
{
'<leader>hh',
function()
require('harpoon.ui').toggle_quick_menu()
end,
mode = 'n',
desc = "Toggle Harpoon"
},
}
}
local winresizer_spec = { 'simeji/winresizer' }
local bufresize_spec = {
"kwkarlwang/bufresize.nvim",
config = function()
require("bufresize").setup()
end,
keys = {
{
'<M-S-h>',
'30<C-w><',
mode = 'n',
desc = 'Increase buffer left'
},
{
'<M-S-l>',
'30<C-w>>',
mode = 'n',
desc = 'Increase buffer right'
},
{
'<M-S-k>',
'10<C-w>+',
mode = 'n',
desc = 'Increase buffer height'
},
{
'<M-S-j>',
'10<C-w>-',
mode = 'n',
desc = 'Decrease buffer height'
},
}
}
local plenary_spec = { 'nvim-lua/plenary.nvim' }
local scope = { "tiagovla/scope.nvim", config = true }
local bufferline_spec = {
'akinsho/bufferline.nvim',
dependencies = 'nvim-tree/nvim-web-devicons',
version = "*",
lazy = false,
config = function()
require("bufferline").setup({})
end,
keys = {
{
"<leader>br",
"<cmd>BufferLineCloseRight</CR>",
mode = 'n',
desc = 'Close buffers to the right'
},
}
}
local markdown_preview_spec = {
"iamcco/markdown-preview.nvim",
run = "cd app && npm install",
ft = "markdown",
config = function()
vim.g.mkdp_auto_start = 1
end,
}
local highlight_colors_spec = {
"brenoprata10/nvim-highlight-colors",
config = function()
require('nvim-highlight-colors').setup({
render = 'virtual',
virtual_symbol = "",
enable_tailwind = true,
})
end
}
local diagram_spec = {
"3rd/diagram.nvim",
dependencies = {
{
"3rd/image.nvim",
opts = {
processor = "magick_cli"
},
}, -- you'd probably want to configure image.nvim manually instead of doing this
},
opts = {
events = {
render_buffer = {},
clear_buffer = { "BufLeave" }
},
renderer_options = {
mermaid = {
background = "transparent",
cli_args = { "-b", "transparent" }
}
}
},
config = function()
require("diagram").setup({
integrations = {
require("diagram.integrations.markdown"),
require("diagram.integrations.neorg"),
},
})
end,
keys = {
{
"M", -- or any key you prefer
function()
require("diagram").show_diagram_hover()
end,
mode = "n",
ft = { "markdown", "norg" }, -- Only in these filetypes
desc = "Show diagram in new tab",
},
},
}
local which_key_spec = {
"folke/which-key.nvim",
event = "VeryLazy",
opts = {
preset = "helix", -- Modern and clean visual layout
delay = 300, -- Wait 300ms before showing the popup
plugins = {
marks = true, -- Show marks on ' and `
registers = true, -- Show registers
spelling = {
enabled = true, -- Show suggestions when using z=
suggestions = 20,
},
},
icons = {
mappings = true, -- Enable icons for mapped keys
},
spec = {
-- ["<leader>s"] = { group = "Specter - Search/Replace Tool" }
{ "<leader>s", group = "Specter - Search/Replace Tool" },
{ "<leader>g", group = "Git" },
{ "<leader>t", group = "Snack Explorer" },
{ "<leader>b", group = "Buffer Utils" },
{ "<leader>h", group = "Harpoon" },
{ "<leader>c", group = "Code" },
{ "<leader>k", group = "Notification Utils" },
{ "<leader>n", group = "Neorg" },
{ "<leader>l", group = "Lazy Docker" }
},
triggers = {
{ "<leader>", mode = { "n", "v" } },
{ "<auto>", mode = "nixsotc" },
}
},
}
local calendar_spec = {
"itchyny/calendar.vim",
}
local lualine_spec = {
'nvim-lualine/lualine.nvim',
config = function()
require('lualine').setup({
options = {
theme = 'auto',
},
inactive_sections = {
lualine_c = { { 'filename', path = 1 } },
}
})
end,
dependencies = {
'kyazdani42/nvim-web-devicons',
opt = true
}
}
local telescope_spec = {
'nvim-telescope/telescope.nvim',
dependencies = { { 'nvim-lua/plenary.nvim' } },
config = function()
local telescope = require('telescope')
telescope.setup {
defaults = {
file_ignore_patterns = { ".git", "node_modules" },
},
extensions = {
fzf = {
fuzzy = true, -- false will only do exact matching
override_generic_sorter = true, -- override the generic sorter
override_file_sorter = true, -- override the file sorter
case_mode = "smart_case", -- or "ignore_case" or "respect_case"
}
}
}
-- telescope.load_extension('fzf')
-- telescope.load_extension('neoclip')
-- telescope.load_extension('harpoon')
end
}
local lazydocker = {
"mgierada/lazydocker.nvim",
dependencies = { "akinsho/toggleterm.nvim" },
config = function()
require("lazydocker").setup({
border = "curved", -- valid options are "single" | "double" | "shadow" | "curved"
width = 0.9, -- width of the floating window (0-1 for percentage, >1 for absolute columns)
height = 0.9, -- height of the floating window (0-1 for percentage, >1 for absolute rows)
})
end,
event = "BufRead",
keys = {
{
"<leader>ld",
function()
require("lazydocker").open()
end,
desc = "Open Lazydocker floating window",
},
},
}
local M = {
harpoon_spec = harpoon_spec,
winresizer_spec = winresizer_spec,
plenary_spec = plenary_spec,
bufferline_spec = bufferline_spec,
markdown_preview_spec = markdown_preview_spec,
highlight_colors_spec = highlight_colors_spec,
diagram_spec = diagram_spec,
which_key_spec = which_key_spec,
calendar_spec = calendar_spec,
lualine_spec = lualine_spec,
telescope_spec = telescope_spec,
bufresize_spec = bufresize_spec,
lazydocker = lazydocker,
scope = scope
}
return M