repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

neovim: overhaul og keymaps and which-key preview

7bca016073d72dccbbe6d89009ee5a697a4613d2

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (53)

lua/bugabinga/plugins/heirline.lua

Deleted
deleted file mode 100644
1 ----@diagnostic disable: param-type-mismatch
2 -local icon = require 'std.icon'
3 -local auto = require 'std.auto'
4 -local ignored = require 'std.ignored'
6 -local NEW_FILE = '~untitled~'
8 -return {
9 - {
10 - 'rebelot/heirline.nvim',
11 - tag = 'v1.0.3',
12 - event = 'BufEnter',
13 - dependencies = {
14 - 'nvim-tree/nvim-web-devicons',
15 - 'lewis6991/gitsigns.nvim',
16 - },
17 - config = function ()
18 - local heirline = require 'heirline'
19 - local conditions = require 'heirline.conditions'
20 - local utils = require 'heirline.utils'
22 - local nugu = require 'bugabinga.nugu.palette'
23 - heirline.load_colors( nugu )
25 - auto 'reload_heirline_colors' {
26 - description = 'Reload dark/light nugu colors for Heirline',
27 - events = 'ColorScheme',
28 - command = function () utils.on_colorscheme( nugu ) end,
29 - }
31 - local vi_mode = {
32 - init = function ( self )
33 - self.mode = vim.fn.mode( 1 ) -- :h mode()
34 - end,
36 - static = {
37 - mode_names = {
38 - n = icon.normal,
39 - no = icon.normal .. '?',
40 - nov = icon.normal .. '?',
41 - noV = icon.normal .. '?',
42 - ['no\22'] = icon.normal .. '?',
43 - niI = icon.normal .. 'i',
44 - niR = icon.normal .. 'r',
45 - niV = icon.normal .. 'v',
46 - nt = icon.normal .. 't',
47 - v = icon.visual,
48 - vs = icon.visual .. 's',
49 - V = icon.visual .. '_',
50 - Vs = icon.visual .. 's',
51 - ['\22'] = '^' .. icon.visual,
52 - ['\22s'] = '^' .. icon.visual,
53 - s = icon.select,
54 - S = icon.select .. '_',
55 - ['\19'] = '^' .. icon.select,
56 - i = icon.insert,
57 - ic = icon.insert .. 'c',
58 - ix = icon.insert .. 'x',
59 - R = icon.replace,
60 - Rc = icon.replace .. 'c',
61 - Rx = icon.replace .. 'x',
62 - Rv = icon.replace .. 'v',
63 - Rvc = icon.replace .. 'v',
64 - Rvx = icon.replace .. 'v',
65 - c = icon.command,
66 - cv = icon.command .. 'x',
67 - r = icon.pending,
68 - rm = icon.pending .. 'm',
69 - ['r?'] = icon.pending .. '?',
70 - ['!'] = icon.exclaim,
71 - t = icon.terminal,
72 - },
73 - mode_colors = {
74 - n = 'ui_normal',
75 - i = 'ui_accent',
76 - v = 'ui_important_global',
77 - V = 'ui_important_global',
78 - ['\22'] = 'ui_important_global',
79 - c = 'ui_important_global',
80 - s = 'ui_important_global',
81 - S = 'ui_important_global',
82 - ['\19'] = 'ui_important_global',
83 - R = 'ui_important_global',
84 - r = 'ui_important_global',
85 - ['!'] = 'ui_important_global',
86 - t = 'ui_important_global',
87 - },
88 - },
90 - provider = function ( self )
91 - local mode_name = self.mode_names[self.mode]
92 - return ' ' .. icon.vim .. ' %3(' .. mode_name .. '%) '
93 - end,
95 - hl = function ( self )
96 - local mode = self.mode:sub( 1, 1 ) -- get only the first mode character
97 - return { fg = self.mode_colors[mode], bold = true, }
98 - end,
100 - update = {
101 - 'ModeChanged',
102 - pattern = '*:*',
103 - callback = vim.schedule_wrap( function () vim.cmd.redrawstatus() end ),
104 - },
105 - }
107 - local file_icon = {
108 - init = function ( self )
109 - local filename = self.filename
110 - local extension = vim.fn.fnamemodify( filename, ':e' )
111 - self.icon = require 'nvim-web-devicons'.get_icon_color( filename, extension, { default = true, } )
112 - end,
113 - provider = function ( self )
114 - return self.icon and (self.icon .. ' ')
115 - end,
116 - hl = 'DefaultIcon',
117 - }
119 - local file_name = {
120 - init = function ( self )
121 - self.lfilename = vim.fs.normalize( vim.fn.fnamemodify( self.filename, ':.' ) )
122 - if self.lfilename == '' then self.lfilename = NEW_FILE end
123 - end,
125 - flexible = 2,
127 - {
128 - provider = function ( self )
129 - return self.lfilename
130 - end,
131 - },
132 - {
133 - provider = function ( self )
134 - return vim.fs.normalize( vim.fn.pathshorten( self.lfilename ) )
135 - end,
136 - },
137 - }
139 - local file_flags = {
140 - {
141 - condition = function ()
142 - return vim.bo.modified
143 - end,
144 - provider = string.format( ' %s ', icon.modified ),
145 - hl = 'Comment',
146 - },
147 - {
148 - condition = function ()
149 - return not vim.bo.modifiable or vim.bo.readonly
150 - end,
151 - provider = string.format( ' %s ', icon.lock ),
152 - hl = 'ErrorMsg',
153 - },
154 - }
156 - local file_name_block = {
157 - init = function ( self )
158 - self.filename = vim.fs.normalize( vim.api.nvim_buf_get_name( 0 ) )
159 - end,
161 - file_icon,
162 - { provider = ' ', },
163 - file_name,
164 - file_flags,
165 - { provider = '%<', }, -- this means that the statusline is cut here when there's not enough space
166 - }
168 - local file_type = {
169 - provider = function ()
170 - return icon.file .. ' ' .. string.upper( vim.bo.filetype )
171 - end,
172 - }
174 - local file_encoding = {
175 - provider = function ()
176 - local enc = (vim.bo.fenc ~= '' and vim.bo.fenc) or vim.o.enc -- :h 'enc'
177 - return enc ~= 'utf-8' and enc:upper()
178 - end,
179 - }
181 - local file_format = {
182 - static = {
183 - dos = icon.newline .. icon.carriage_return,
184 - unix = icon.newline,
185 - mac = icon.carriage_return,
186 - },
187 - provider = function ( self )
188 - local fileformat = vim.bo.fileformat
189 - return self[fileformat]
190 - end,
191 - }
193 - local file_size = {
194 - provider = function ()
195 - -- stackoverflow, compute human readable file size
196 - -- i want to see vim opening a 1EiB file 󰱯
197 - local suffix = { 'b', 'k', 'M', 'G', 'T', 'P', 'E', }
198 - local fsize = vim.fn.getfsize( vim.api.nvim_buf_get_name( 0 ) )
199 - fsize = (fsize < 0 and 0) or fsize
200 - if fsize < 1024 then
201 - return fsize .. suffix[1]
202 - end
203 - local i = math.floor( (math.log( fsize ) / math.log( 1024 )) )
204 - return string.format( '%.2g%s', fsize / math.pow( 1024, i ), suffix[i + 1] )
205 - end,
206 - }
208 - local file_last_modified = {
209 - provider = function ()
210 - local ftime = vim.fn.getftime( vim.api.nvim_buf_get_name( 0 ) )
211 - if ftime > 0 then
212 - local timeago = require 'std.timeago'
213 - return timeago.format( ftime )
214 - end
215 - end,
216 - }
218 - local lsp_active = {
219 - condition = conditions.lsp_attached,
220 - -- FIXME: updates from parent components do not seem to update children,
221 - -- if those have their own updates?
222 - update = { 'LspAttach', 'LspDetach', 'BufEnter', 'BufLeave', },
224 - provider = function ()
225 - local names = {}
226 - for _, client in pairs( vim.lsp.get_clients { bufnr = 0, } ) do
227 - table.insert( names, client.name )
228 - end
229 - return icon.lsp .. ' ' .. table.concat( names, ' ' )
230 - end,
231 - }
233 - local diagnostic_enabled = {
234 - init = function ( self )
235 - self.icon = vim.diagnostic.is_disabled() and icon.toggle_off or icon.toggle_on
236 - end,
237 - provider = function ( self )
238 - return icon.diagnostic .. ' ' .. self.icon
239 - end,
240 - }
242 - local diagnostic = {
243 - condition = conditions.has_diagnostics,
245 - static = {
246 - error_icon = icon.error,
247 - warn_icon = icon.warn,
248 - info_icon = icon.info,
249 - hint_icon = icon.hint,
250 - },
252 - init = function ( self )
253 - self.errors = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.ERROR, } )
254 - self.warnings = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.WARN, } )
255 - self.hints = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.HINT, } )
256 - self.info = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.INFO, } )
257 - end,
259 - update = { 'DiagnosticChanged', 'BufEnter', },
261 - {
262 - provider = function ( self )
263 - -- 0 is just another output, we can decide to print it or not!
264 - return self.errors > 0 and (self.error_icon .. ' ' .. self.errors .. ' ')
265 - end,
266 - hl = 'DiagnosticError',
267 - },
268 - {
269 - provider = function ( self )
270 - return self.warnings > 0 and (self.warn_icon .. ' ' .. self.warnings .. ' ')
271 - end,
272 - hl = 'DiagnosticWarn',
273 - },
274 - {
275 - provider = function ( self )
276 - return self.info > 0 and (self.info_icon .. ' ' .. self.info .. ' ')
277 - end,
278 - hl = 'DiagnosticInfo',
279 - },
280 - {
281 - provider = function ( self )
282 - return self.hints > 0 and (self.hint_icon .. ' ' .. self.hints)
283 - end,
284 - hl = 'DiagnosticHint',
285 - },
286 - }
288 - local is_svn_repo = function ()
289 - local svn_dir = vim.fs.find( '.svn', {
290 - upward = true,
291 - stop = vim.uv.os_homedir(),
292 - path = vim.fs.dirname( vim.api.nvim_buf_get_name( 0 ) ),
293 - type = 'directory',
294 - } )
296 - return not vim.tbl_isempty( svn_dir )
297 - end
299 - local svn_get_relative_url = function ()
300 - -- FIXME: replace with vim.system
301 - local job = require 'plenary.job'
302 - local relative_url = { '[ERR]', }
304 - job:new {
305 - command = 'svn',
306 - args = { 'info', '--show-item', 'relative-url', '--no-newline', },
307 - on_exit = function ( current_job, exit_code )
308 - if exit_code == 0 then relative_url = current_job:result() end
309 - end,
310 - }:sync()
312 - return relative_url[1]
313 - end
315 - local svn = {
316 - condition = is_svn_repo,
318 - update = 'BufEnter',
320 - init = function ( self )
321 - self.relative_url = svn_get_relative_url()
322 - end,
324 - {
325 - provider = function ( self )
326 - return icon.subversion .. ' ' .. icon.branch .. ' ' .. self.relative_url
327 - end,
328 - },
330 - }
332 - local git = {
333 - condition = conditions.is_git_repo,
335 - init = function ( self )
336 - self.status_dict = vim.b.gitsigns_status_dict
337 - end,
339 - {
340 - provider = function ( self )
341 - return icon.git .. ' ' .. icon.branch .. ' ' .. self.status_dict.head .. ' '
342 - end,
343 - },
344 - {
345 - provider = function ( self )
346 - local count = self.status_dict.added or 0
347 - return count > 0 and (icon.diff_add .. ' ' .. count .. ' ')
348 - end,
349 - hl = 'DiffAdd',
350 - },
351 - {
352 - provider = function ( self )
353 - local count = self.status_dict.removed or 0
354 - return count > 0 and (icon.diff_remove .. ' ' .. count .. ' ')
355 - end,
356 - hl = 'DiffDelete',
357 - },
358 - {
359 - provider = function ( self )
360 - local count = self.status_dict.changed or 0
361 - return count > 0 and (icon.diff_change .. ' ' .. count .. ' ')
362 - end,
363 - hl = 'DiffChange',
364 - },
365 - }
367 - local work_dir = {
368 - init = function ( self )
369 - self.icon = (vim.fn.haslocaldir( 0 ) == 1 and icon['local'] or '') .. ' ' .. icon.global .. ' '
370 - self.cwd = vim.fs.normalize( vim.uv.cwd() ):gsub( vim.fs.normalize( vim.uv.os_homedir() ), '~' )
371 - end,
373 - flexible = 1,
375 - {
376 - provider = function ( self )
377 - return self.icon .. self.cwd
378 - end,
379 - },
380 - {
381 - provider = function ( self )
382 - local cwd = vim.fn.pathshorten( self.cwd )
383 - return self.icon .. cwd
384 - end,
385 - },
386 - {
387 - provider = '',
388 - },
389 - }
391 - local help_file_name = {
392 - condition = function ()
393 - return vim.bo.filetype == 'help'
394 - end,
395 - provider = function ()
396 - local filename = vim.api.nvim_buf_get_name( 0 )
397 - return vim.fn.fnamemodify( filename, ':t' )
398 - end,
399 - hl = 'Question',
400 - }
402 - local terminal_name = {
403 - provider = function ()
404 - local name, _ = vim.api.nvim_buf_get_name( 0 ):gsub( '.*:', '' )
405 - local basename = vim.fs.basename( name )
406 - return icon.terminal .. ' ' .. (basename or 'noname')
407 - end,
408 - hl = 'Bold',
409 - }
411 - local togglers = {
412 - provider = function ()
413 - local togglers = require 'bugabinga.options.togglers'
414 - return tostring( togglers )
415 - end,
416 - }
418 - local macro_recording = {
419 - condition = function ()
420 - return vim.fn.reg_recording() ~= '' and vim.o.cmdheight == 0
421 - end,
422 - provider = icon.macro .. ' ',
423 - hl = 'PreProc',
424 - utils.surround( { '░▒▓ ', ' ▓▒░', }, nil, {
425 - provider = function ()
426 - return vim.fn.reg_recording()
427 - end,
428 - hl = 'Bold',
429 - } ),
430 - update = {
431 - 'RecordingEnter',
432 - 'RecordingLeave',
433 - },
434 - }
436 - local lazy = {
437 - condition = function ()
438 - local ok, lazy_status = pcall( require, 'lazy.status' )
439 - return ok and lazy_status.has_updates()
440 - end,
441 - update = { 'User', pattern = 'LazyUpdate', },
442 - provider = function () return ' ' .. icon.lazy .. ' ' .. require 'lazy.status'.updates() .. ' ' end,
443 - on_click = {
444 - callback = function () require 'lazy'.update() end,
445 - name = 'update_plugins',
446 - },
447 - }
449 - local align = { provider = '%=', }
450 - local space = { provider = ' ', }
452 - local default_statusline = {
453 - vi_mode, macro_recording, align,
454 - work_dir, space, git, svn, align,
455 - diagnostic_enabled, space, diagnostic, space, lsp_active, align,
456 - togglers, align,
457 - lazy, space, file_encoding, space, file_format, space, file_type, space, file_size, space, file_last_modified,
458 - }
460 - local special_statusline = {
461 - condition = function ()
462 - return conditions.buffer_matches {
463 - buftype = ignored.buftypes,
464 - filetype = ignored.filetypes,
465 - }
466 - end,
468 - file_type,
469 - space,
470 - help_file_name,
471 - align,
472 - }
474 - local terminal_statusline = {
476 - condition = function ()
477 - return conditions.buffer_matches { buftype = { 'terminal', }, }
478 - end,
480 - { condition = conditions.is_active, vi_mode, space, },
481 - file_type,
482 - space,
483 - terminal_name,
484 - align,
485 - }
487 - local inactive_statusline = {
488 - condition = conditions.is_not_active,
489 - file_type,
490 - space,
491 - file_name,
492 - align,
493 - }
495 - local statuslines = {
496 - hl = function ()
497 - if conditions.is_active() then
498 - return 'StatusLine'
499 - else
500 - return 'StatusLineNC'
501 - end
502 - end,
504 - fallthrough = false,
506 - special_statusline,
507 - terminal_statusline,
508 - inactive_statusline,
509 - default_statusline,
510 - }
512 - local winbars = {
513 - hl = function ()
514 - if conditions.is_active() then
515 - return 'Winbar'
516 - else
517 - return 'WinbarNC'
518 - end
519 - end,
521 - fallthrough = false,
523 - {
524 - condition = function ()
525 - return conditions.buffer_matches { buftype = { 'terminal', }, }
526 - end,
528 - file_type,
529 - space,
530 - terminal_name,
531 - },
533 - file_name_block,
534 - }
536 - local tabline_buffer_number = {
537 - provider = function ( self )
538 - return '(' .. tostring( self.bufnr ) .. ')'
539 - end,
540 - hl = function ( self )
541 - if self.is_active then
542 - return { fg = utils.get_highlight 'TabLineSel'.fg, }
543 - elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then
544 - return { fg = utils.get_highlight 'StatusLineNc'.fg, }
545 - else
546 - return { fg = utils.get_highlight 'TabLine'.fg, }
547 - end
548 - end,
549 - }
551 - local tabline_file_name = {
552 - provider = function ( self )
553 - local name = self.file_name
554 - return name == '' and NEW_FILE or vim.fs.normalize( vim.fn.fnamemodify( name, ':t' ) )
555 - end,
556 - hl = function ( self ) return { bold = self.is_active or self.is_visible, italic = true, } end,
557 - }
559 - local tabline_file_flags = {
560 - {
561 - condition = function ( self ) return vim.api.nvim_get_option_value( 'modified', { buf = self.bufnr, } ) end,
562 - provider = icon.modified .. ' ',
563 - },
564 - {
565 - condition = function ( self )
566 - return not vim.api.nvim_get_option_value( 'modifiable', { buf = self.bufnr, } ) or
567 - vim.api.nvim_get_option_value( 'readonly', { buf = self.bufnr, } )
568 - end,
569 - provider = function ( self )
570 - if vim.api.nvim_get_option_value( 'buftype', { buf = self.bufnr, } ) == 'terminal' then
571 - return icon.terminal
572 - else
573 - return icon.lock
574 - end
575 - end,
576 - },
577 - hl = 'Bold',
578 - }
580 - local tabline_file_name_block = {
581 - init = function ( self )
582 - self.file_name = vim.api.nvim_buf_get_name( self.bufnr )
583 - end,
585 - hl = function ( self )
586 - if self.is_active then
587 - return 'TabLineSel'
588 - elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then
589 - return { fg = utils.get_highlight 'StatusLineNc'.fg, }
590 - else
591 - return 'TabLine'
592 - end
593 - end,
595 - on_click = {
596 - callback = function ( _, minwid, _, button )
597 - if button == 'm' then --m = middle click
598 - vim.schedule( function ()
599 - vim.api.nvim_buf_delete( minwid, { force = false, } )
600 - vim.cmd.redrawtabline()
601 - end )
602 - else
603 - vim.api.nvim_win_set_buf( 0, minwid )
604 - end
605 - end,
606 - minwid = function ( self ) return self.bufnr end,
607 - name = 'heirline_tabline_buffer_callback',
608 - },
610 - file_icon,
611 - { provider = ' ', },
612 - tabline_file_name,
613 - tabline_buffer_number,
614 - tabline_file_flags,
615 - }
617 - local tabline_buffer_block = utils.surround(
618 - {
619 - ' ' .. icon.slant_left,
620 - icon.slant_right .. ' ',
621 - },
622 - function ( self )
623 - if self.is_active then
624 - return utils.get_highlight 'TabLine'.bg
625 - else
626 - return utils.get_highlight 'TabLineFill'.bg
627 - end
628 - end,
629 - { tabline_file_name_block, }
630 - )
632 - local buffer_line = utils.make_buflist(
633 - tabline_buffer_block,
634 - { provider = icon.arrow_left .. ' ', hl = 'TabLine', },
635 - { provider = ' ' .. icon.arrow_right, hl = 'TabLine', }
636 - )
638 - local tabpage = {
639 - provider = function ( self )
640 - return '%' .. self.tabnr .. 'T ' .. self.tabpage .. ' %T'
641 - end,
642 - hl = function ( self )
643 - if self.is_active then
644 - return 'TabLineSel'
645 - else
646 - return 'TabLine'
647 - end
648 - end,
649 - }
651 - local tab_pages = {
652 - { provider = '%=', },
653 - utils.make_tablist( tabpage ),
654 - }
656 - local tabline = { buffer_line, tab_pages, }
658 - -- local statuscolumn = {}
660 - heirline.setup {
661 - statusline = statuslines,
662 - winbar = winbars,
663 - tabline = tabline,
664 - -- statuscolumn = statuscolumn,
666 - opts = {
667 - colors = nugu,
668 - disable_winbar_cb = function ( args )
669 - return conditions.buffer_matches(
670 - {
671 - buftype = ignored.buftypes,
672 - filetype = ignored.filetypes,
673 - },
674 - args.buf )
675 - end,
676 - },
677 - }
678 - end,
679 - },

neovim/README.md

Modified
39 39 # todo
41 41 * replace nugu with nugu_fresh
42 +* use `vim.secure.read` for project local settings
42 43 * write plugin to parse lsp settings locally and apply them
43 44 * is there a use case for a plugin that parses local plugin configuration overrides?
44 45 * kill custom lsp stuff in favor of lspconfig and try neoconf + nvim-java

neovim/lazy-lock.json

Modified
2 - "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
2 + "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" },
3 3 "actions-preview.nvim": { "branch": "master", "commit": "5072b1b1065a6b22bdd46b5c21780a91d6a08071" },
4 + "auto-dark-mode.nvim": { "branch": "master", "commit": "e328dc463d238cb7d690fb4daf068eba732a5a14" },
4 5 "better-escape.nvim": { "branch": "master", "commit": "7e86edafb8c7e73699e0320f225464a298b96d12" },
5 6 "colorizer.nvim": { "branch": "master", "commit": "107719885290366c893e1c1c58b7474cbeabfef6" },
6 7 "diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" },
8 9 "fidget.nvim": { "branch": "main", "commit": "4e854f3299e21d1c18279add340428a97520fc44" },
9 10 "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" },
10 11 "gen.nvim": { "branch": "main", "commit": "2cb643b1a827bcdfc665a37d5f8174249d2d5bf5" },
11 - "gitsigns.nvim": { "branch": "main", "commit": "078041e9d060a386b0c9d3a8c7a7b019a35d3fb0" },
12 + "gitsigns.nvim": { "branch": "main", "commit": "6ef8c54fb526bf3a0bc4efb0b2fe8e6d9a7daed2" },
12 13 "glow.nvim": { "branch": "main", "commit": "238070a686c1da3bccccf1079700eb4b5e19aea4" },
13 14 "heirline.nvim": { "branch": "master", "commit": "03cff30d7e7d3ba6fdc00925f015822f79cef908" },
14 - "hlargs.nvim": { "branch": "main", "commit": "0f2dbf02ff948e8fc8ebe07b215f3174a12bbe3c" },
15 15 "hyper.nvim": { "branch": "main", "commit": "b84fb39e703b1dd487d20c4faf028ee51374c88b" },
16 - "indent-blankline.nvim": { "branch": "master", "commit": "3d08501caef2329aba5121b753e903904088f7e6" },
16 + "indent-blankline.nvim": { "branch": "master", "commit": "821a7acd88587d966f7e464b0b3031dfe7f5680c" },
17 17 "lazy.nvim": { "branch": "main", "commit": "83493db50a434a4c5c648faf41e2ead80f96e478" },
18 18 "lsp_signature.nvim": { "branch": "master", "commit": "c6aeb2f1d2538bbdfdaab1664d9d4c3c75aa9db8" },
19 19 "mason-tool-installer.nvim": { "branch": "main", "commit": "1212fb6082b7177dde17ea65e429e027835aeb40" },
20 - "mason.nvim": { "branch": "main", "commit": "3b5068f0fc565f337d67a2d315d935f574848ee7" },
20 + "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
21 21 "mini.align": { "branch": "main", "commit": "f845218c5fea89e49074e48270dc5e1b9511a0f9" },
22 22 "mini.bracketed": { "branch": "main", "commit": "65c7dfb51e832de9e279e5d5b0741e7af6755ab5" },
23 23 "mini.starter": { "branch": "main", "commit": "ce222a5b6de50a9963c1eb62aa16ec6d5efca7ee" },
26 26 "neogen": { "branch": "main", "commit": "b95347a588401a755eadd17482edc1662876bd58" },
27 27 "nrpattern.nvim": { "branch": "master", "commit": "f862ce687761078ef3155688151c55f69d28453e" },
28 28 "nui.nvim": { "branch": "main", "commit": "cbd2668414331c10039278f558630ed19b93e69b" },
29 - "nvim-autopairs": { "branch": "master", "commit": "797260ff31e8bdd9db0f0c352659a35aba335b0b" },
29 + "nvim-autopairs": { "branch": "master", "commit": "dbfc1c34bed415906395db8303c71039b3a3ffb4" },
30 30 "nvim-genghis": { "branch": "main", "commit": "8613fc1b43db6cc761733b3630eabff9e86296f7" },
31 31 "nvim-gomove": { "branch": "main", "commit": "2b44ae7ac0804f4e3959228122f7c85bef1964e3" },
32 32 "nvim-jdtls": { "branch": "master", "commit": "a4746791876166dc146eae573a1b49d24a6652e7" },
35 35 "nvim-navbuddy": { "branch": "master", "commit": "f137a3466a6cd1965cdcc5398daff54e66eebbe5" },
36 36 "nvim-navic": { "branch": "master", "commit": "8649f694d3e76ee10c19255dece6411c29206a54" },
37 37 "nvim-neoclip.lua": { "branch": "main", "commit": "798cd0592a81c185465db3a091a0ff8a21af60fd" },
38 - "nvim-spectre": { "branch": "master", "commit": "e7db8ebca7fd0a604027ebf85acee52f6642c91c" },
38 + "nvim-spectre": { "branch": "master", "commit": "1d23be1165c373a6026e42f3b3a5100126eaf81d" },
39 39 "nvim-surround": { "branch": "main", "commit": "84a26afce16cffa7e3322cfa80a42cddf60616eb" },
40 - "nvim-tree.lua": { "branch": "master", "commit": "f7c09bd72e50e1795bd3afb9e2a2b157b4bfb3c3" },
41 - "nvim-treesitter": { "branch": "master", "commit": "567a76780cd4f982dae1ec57e3dad6174bef3680" },
40 + "nvim-tree.lua": { "branch": "master", "commit": "d35a8d5ec6358ada4b058431b367b32360737466" },
41 + "nvim-treesitter": { "branch": "master", "commit": "f197a15b0d1e8d555263af20add51450e5aaa1f0" },
42 42 "nvim-treesitter-textobjects": { "branch": "master", "commit": "d2a4ffc22d9d38d44edb73da007b3cf43451e9b4" },
43 43 "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
44 44 "nvim-ts-context-commentstring": { "branch": "main", "commit": "7ab799a9792f7cf3883cf28c6a00ad431f3d382a" },
45 45 "nvim-web-devicons": { "branch": "master", "commit": "cb0c967c9723a76ccb1be0cc3a9a10e577d2f6ec" },
46 46 "nvim-window": { "branch": "main", "commit": "e7f5d60eeec8ff37af7be4c9a99f65edf67fc574" },
47 47 "oil.nvim": { "branch": "master", "commit": "e462a3446505185adf063566f5007771b69027a1" },
48 - "persistence.nvim": { "branch": "main", "commit": "4982499c1636eac254b72923ab826ee7827b3084" },
48 + "persistence.nvim": { "branch": "main", "commit": "ad538bfd5336f1335cdb6fd4e0b0eebfa6e12f32" },
49 49 "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
50 50 "plenary.nvim": { "branch": "master", "commit": "f7adfc4b3f4f91aab6caebf42b3682945fbc35be" },
51 51 "schemastore.nvim": { "branch": "main", "commit": "4d798fd5b692c8fce77268aba8f6f926b0c9f835" },
52 - "specs.nvim": { "branch": "main", "commit": "2743e412bbe21c9d73954c403d01e8de7377890d" },
52 + "specs.nvim": { "branch": "main", "commit": "e929006d3f6bb8e43f03e13ac364c67236eb5299" },
53 53 "speedtyper.nvim": { "branch": "main", "commit": "2d158eed4c753995b0501a3a7a72464fbb213e3d" },
54 54 "ssr.nvim": { "branch": "main", "commit": "bb323ba621ac647b4ac5638b47666e3ef3c279e1" },
55 55 "substitute.nvim": { "branch": "main", "commit": "17ffaeb5a1dc2dbef39cf0865d8a4b6000836714" },
57 57 "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
58 58 "telescope-zoxide": { "branch": "main", "commit": "68966349aa1b8e9ade403e18479ecf79447389a7" },
59 59 "telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
60 - "todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" },
60 + "todo-comments.nvim": { "branch": "main", "commit": "8febc60a76feefd8203077ef78b6a262ea1a41f9" },
61 61 "toggleterm.nvim": { "branch": "main", "commit": "193786e0371e3286d3bc9aa0079da1cd41beaa62" },
62 62 "tree-sitter-nu": { "branch": "main", "commit": "c5b7816043992b1cdc1462a889bc74dc08576fa6" },
63 63 "treesj": { "branch": "main", "commit": "60e27280030f9cd8dfb6ceb335922c6ff76682cc" },
64 64 "twilight.nvim": { "branch": "main", "commit": "8b7b50c0cb2dc781b2f4262a5ddd57571556d1e4" },
65 65 "virt-column.nvim": { "branch": "master", "commit": "b62b4ef0774d19452d4ed18e473e824c7a756f2f" },
66 - "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" },
66 + "which-key.nvim": { "branch": "main", "commit": "ce741eb559c924d72e3a67d2189ad3771a231414" },
67 67 "zen-mode.nvim": { "branch": "main", "commit": "78557d972b4bfbb7488e17b5703d25164ae64e6a" }

neovim/lua/bugabinga/lazy.lua

Modified
108 108 lazy_cmds:each( function ( cmd )
109 109 map.normal {
110 - name = cmd[1] .. ' plugins',
110 + description = cmd[1],
111 111 category = 'plugins',
112 112 keys = base_key .. cmd[2],
113 113 command = cmd[3],

neovim/lua/bugabinga/lsp/clients/lua.lua

Modified
7 7 root_dir = project.find_lua_project_root,
8 8 single_file_support = true,
9 9 workspaces = true,
10 - before_init = require 'neodev.lsp'.before_init,
11 10 settings = {
12 11 Lua = {
13 12 addonManager = { enable = false, },

neovim/lua/bugabinga/lsp/init.lua

Modified
293 293 description = 'Show signature help under cursor.',
294 294 category = 'lsp',
295 295 buffer = bufnr,
296 - keys = '<leader>ls',
296 + keys = { 'H', '<leader>ls', },
297 297 command = vim.lsp.buf.signature_help,
341 341 description = 'Show references of symbol under cursor.',
342 342 category = 'lsp',
343 343 buffer = bufnr,
344 - keys = '<leader>lr',
344 + keys = '<leader>ln',
345 345 command = vim.lsp.buf.references,
349 349 description = 'Rename symbol under cursor.',
350 350 category = 'lsp',
351 351 buffer = bufnr,
352 - keys = { '<f2>', '<leader>ln', },
352 + keys = { '<f2>', '<leader>lr', },
353 353 command = vim.lsp.buf.rename,

neovim/lua/bugabinga/plugins/actions-preview.lua

Modified
1 1 local map = require 'std.map'
3 +map.normal.visual {
4 + description = 'Open Code Actions Preview...',
5 + category = 'lsp',
6 + keys = '<leader>la',
7 + command = function () require 'actions-preview'.code_actions() end,
8 +}
3 10 return {
4 11 'aznhe21/actions-preview.nvim',
5 - keys = { '<leader>lap', mode = { 'n', 'v' } },
6 - config = function ()
7 - local actions_preview = require 'actions-preview'
8 - actions_preview.setup {
9 - telescope = {
10 - sorting_strategy = 'ascending',
11 - layout_strategy = 'vertical',
12 - layout_config = {
13 - width = 0.69,
14 - height = 0.42,
15 - prompt_position = 'top',
16 - preview_cutoff = 21,
17 - preview_height = function ( _, _, max_lines )
18 - return max_lines - 16
19 - end,
20 - },
12 + opts = {
13 + telescope = {
14 + sorting_strategy = 'ascending',
15 + layout_strategy = 'vertical',
16 + layout_config = {
17 + width = 0.69,
18 + height = 0.42,
19 + prompt_position = 'top',
20 + preview_cutoff = 21,
21 + preview_height = function ( _, _, max_lines )
22 + return max_lines - 16
23 + end,
22 - }
24 - map.normal {
25 - description = 'Open Code Actions Preview...',
26 - category = 'lsp',
27 - keys = '<leader>lap',
28 - command = function () actions_preview.code_actions() end,
29 - }
30 - end
25 + },
26 + },

neovim/lua/bugabinga/plugins/align.lua

Deleted
deleted file mode 100644
1 -return {
2 - 'echasnovski/mini.align',
3 - keys = {
4 - { 'gA', mode = 'x' }
5 - },
6 - config = function ()
7 - local align = require 'mini.align'
8 - align.setup {
9 - -- these need to be consistent with treesitter-textobject movements
10 - comment = { suffix = 't' },
11 - file = { suffix = 'e' },
12 - oldfile = { suffix = '' },
13 - }
14 - end,
15 -}

neovim/lua/bugabinga/plugins/comment.lua

Modified
1 1 return { {
2 2 'numToStr/Comment.nvim',
3 - tag = 'v0.8.0',
3 + version = '0.*',
4 4 keys = {
5 5 { 'gc', mode = { 'n', 'v', }, desc = 'Comment toggle linewise', },
6 6 { 'gb', mode = { 'n', 'v', }, desc = 'Comment toggle blockwise', },

neovim/lua/bugabinga/plugins/commentstring.lua

Modified
4 4 return {
5 5 'JoosepAlviste/nvim-ts-context-commentstring',
6 6 lazy = false,
7 7 init = function ()
8 8 vim.g.skip_ts_context_commentstring_module = true
9 9 end,
10 - opts = { enable_autocmd = false },
10 + opts = { enable_autocmd = false, },

neovim/lua/bugabinga/plugins/devicons.lua

Modified
1 -return { {
1 +return {
2 2 'nvim-tree/nvim-web-devicons',
3 3 opts = {
4 4 -- instead of creating a highlight for every single icon, use only the
5 5 -- DefaultDevIcon highlight for all
6 6 color_icons = false,
8 -}, }
8 +}

neovim/lua/bugabinga/plugins/diffview.lua

Modified
1 +local map = require 'std.map'
3 +map.normal {
4 + keys = '<leader>vd',
5 + description = 'Opens Diffview',
6 + category = 'vcs',
7 + command = '<cmd>DiffviewOpen<cr>',
8 +}
1 10 return {
2 11 'sindrets/diffview.nvim',
3 - cmd = { 'DiffviewOpen', 'DiffviewToggleFiles' },
12 + cmd = { 'DiffviewOpen', },
4 13 opts = {},

neovim/lua/bugabinga/plugins/fidget.lua

Modified
2 2 local debug = require 'std.debug'
4 4 return {
5 5 'j-hui/fidget.nvim',
6 - version = '1.4.0',
7 - lazy = false,
6 + version = '1.*',
7 + event = 'VeryLazy',
8 8 opts = {
9 9 progress = {
10 - suppress_on_insert = false, -- Suppress new messages while in insert mode
10 + suppress_on_insert = true, -- Suppress new messages while in insert mode
11 11 lsp = {
12 - log_handler = debug.get, -- Log `$/progress` handler invocations (for debugging)
12 + log_handler = debug.get, -- Log `$/progress` handler invocations (for debugging)
15 15 notification = {
16 16 filter = debug.get and vim.log.levels.DEBUG,
17 - override_vim_notify = true, -- Automatically override vim.notify() with Fidget
17 + override_vim_notify = false, -- Automatically override vim.notify() with Fidget

neovim/lua/bugabinga/plugins/flash.lua

Modified
1 +local map = require 'std.map'
3 +map.normal.visual.operator_pending {
4 + keys = '<cr>',
5 + category = 'navigation',
6 + description = 'Jump to occurence of next chars quickly',
7 + command = function () require 'flash'.jump() end,
8 +}
1 10 return {
2 11 'folke/flash.nvim',
3 - tag = 'v1.18.2',
12 + version = '1.*',
4 13 event = 'VeryLazy',
5 14 opts = {
6 15 highlight = { backdrop = false, },
7 16 modes = { char = { highlight = { backdrop = false, }, },
10 - keys = {
11 - {
12 - '<cr>',
13 - mode = { 'n', 'x', 'o', },
14 - function () require 'flash'.jump() end,
15 - desc = 'Flash',
16 - },
17 - {
18 - '<s-cr>',
19 - mode = { 'n', 'o', 'x', },
20 - function () require 'flash'.treesitter() end,
21 - desc =
22 - 'Flash Treesitter',
23 - },
24 - },

neovim/lua/bugabinga/plugins/gen.lua

Deleted
deleted file mode 100644
1 -require 'bugabinga.health'.add_dependency
2 -{
3 - name_of_executable = 'ollama',
4 -}
5 -return {
6 - 'David-Kunz/gen.nvim',
7 - cmd = 'Gen',
8 - opts = {
9 - -- model = 'codellama:7b-instruct',
10 - model = 'codellama',
11 - display_mode = 'split',
12 - show_prompt = true,
13 - show_model = true,
14 - no_auto_close = true,
15 - debug = require 'std.debug'.get(),
16 - }
17 -}

neovim/lua/bugabinga/plugins/genghis.lua

Modified
1 +local map = require 'std.map'
3 +map.normal {
4 + keys = '<leader>fn',
5 + category = 'files',
6 + description = 'Create new file',
7 + command = function () require 'genghis'.createNewFile() end,
8 +}
10 +map.visual {
11 + keys = '<leader>fx',
12 + category = 'files',
13 + description = 'Move selection to new file',
14 + command = function () require 'genghis'.moveSelectionToNewFile() end,
17 +map.normal {
18 + keys = '<leader>fy',
19 + category = 'files',
20 + description = 'Yank file name',
21 + command = function () require 'genghis'.copyFilename() end,
24 +map.normal {
25 + keys = '<leader>fY',
26 + category = 'files',
27 + description = 'Yank file path',
28 + command = function () require 'genghis'.copyFilepath() end,
31 +map.normal {
32 + keys = '<leader>fc',
33 + category = 'files',
34 + description = 'Change file mode/permissions',
35 + command = function () require 'genghis'.chmodx() end,
38 +map.normal {
39 + keys = '<leader>fr',
40 + category = 'files',
41 + description = 'Rename file',
42 + command = function () require 'genghis'.renameFile() end,
45 +map.normal {
46 + keys = '<leader>fm',
47 + category = 'files',
48 + description = 'Move file',
49 + command = function () require 'genghis'.moveAndRenameFile() end,
52 +map.normal {
53 + keys = '<leader>fM',
54 + category = 'files',
55 + description = 'Move file to current working directory',
56 + command = function () require 'genghis'.moveToFolderInCwd() end,
59 +map.normal {
60 + keys = '<leader>ff',
61 + category = 'files',
62 + description = 'Duplicate file',
63 + command = function () require 'genghis'.duplicateFile() end,
66 +map.normal {
67 + keys = '<leader>fd',
68 + category = 'files',
69 + description = 'Move file to system trash',
70 + command = function () require 'genghis'.trashFile() end,
1 73 return {
2 74 'chrisgrieser/nvim-genghis',
3 75 cmd = {
17 89 dependencies = {
18 90 'stevearc/dressing.nvim',
20 - config = function ()
21 - local genghis = require 'genghis' -- no setup needed
22 - local keymap = vim.keymap.set
23 - keymap( 'n', '<leader>yp', genghis.copyFilepath )
24 - keymap( 'n', '<leader>yn', genghis.copyFilename )
25 - keymap( 'n', '<leader>cx', genghis.chmodx )
26 - keymap( 'n', '<leader>rf', genghis.renameFile )
27 - keymap( 'n', '<leader>mf', genghis.moveAndRenameFile )
28 - keymap( 'n', '<leader>mc', genghis.moveToFolderInCwd )
29 - keymap( 'n', '<leader>nf', genghis.createNewFile )
30 - keymap( 'n', '<leader>yf', genghis.duplicateFile )
31 - keymap( 'n', '<leader>df', genghis.trashFile )
32 - keymap( 'x', '<leader>x', genghis.moveSelectionToNewFile )
33 - end,

neovim/lua/bugabinga/plugins/gitsigns.lua

Modified
2 2 local map = require 'std.map'
4 4 return {
5 5 'lewis6991/gitsigns.nvim',
6 - tag = 'v0.7',
6 + version = '0.*',
7 7 event = 'VeryLazy',
8 8 opts = {
9 9 signs = {

neovim/lua/bugabinga/plugins/glow.lua

Modified
3 3 require 'bugabinga.health'.add_dependency
5 5 name = 'Glow',
6 6 name_of_executable = 'glow',
9 +local map = require 'std.map'
11 +map.normal {
12 + description = 'Generate markdown preview',
13 + keys = '<leader>gm',
14 + category = 'preview',
15 + command = '<cmd>Glow<cr>',
8 18 return {
9 19 'ellisonleao/glow.nvim',
10 20 cmd = 'Glow',

neovim/lua/bugabinga/plugins/hardtime.lua

Deleted
deleted file mode 100644
1 -local ignored = require 'std.ignored'
3 -return {
4 - 'm4xshen/hardtime.nvim',
5 - lazy = false,
6 - enabled = false,
7 - dependencies = { 'MunifTanjim/nui.nvim', 'nvim-lua/plenary.nvim' },
8 - opts = {
9 - disabled_filetypes = ignored.filetypes,
10 - }
11 -}

neovim/lua/bugabinga/plugins/heirline.lua

Modified
8 8 return {
10 10 'rebelot/heirline.nvim',
11 - tag = 'v1.0.3',
12 - event = 'BufEnter',
11 + version = '1.*',
12 + event = 'VeryLazy',
13 13 dependencies = {
14 14 'nvim-tree/nvim-web-devicons',
15 15 'lewis6991/gitsigns.nvim',

neovim/lua/bugabinga/plugins/hyper.lua

Deleted
deleted file mode 100644
1 -return {
2 - 'wet-sandwich/hyper.nvim',
3 - tag = '0.1.0',
4 - dependencies = {
5 - 'nvim-lua/plenary.nvim',
6 - },
7 - cmd = 'Hyper',
8 -}

neovim/lua/bugabinga/plugins/indent_blankline.lua

Modified
2 2 local icon = require 'std.icon'
4 4 return {
5 5 'lukas-reineke/indent-blankline.nvim',
6 - tag = 'v3.5.3',
6 + version = '3.*',
7 7 main = 'ibl',
8 8 event = { 'BufReadPost', 'BufNew', },
9 - config = function ()
10 - local ibl = require 'ibl'
12 - ibl.setup {
13 - debounce = 250,
14 - indent = {
15 - char = icon.vertical_bar,
16 - tab_char = icon.vertical_bar,
17 - },
18 - }
19 - end,
9 + opts = {
10 + debounce = 250,
11 + indent = {
12 + char = icon.vertical_bar,
13 + tab_char = icon.vertical_bar,
14 + },
15 + },

neovim/lua/bugabinga/plugins/mason.lua

Modified
1 1 return {
2 2 'williamboman/mason.nvim',
3 - tag = 'v1.10.0',
4 - cmd = { 'Mason', 'MasonUpdate', 'MasonInstall', 'MasonUninstall', 'MasonUninstallAll', 'MasonLog', },
3 + version = '1.*',
4 + lazy = false,
5 5 opts = {
6 6 ui = {
7 7 border = vim.g.border_style,
14 14 'WhoIsSethDaniel/mason-tool-installer.nvim',
15 15 lazy = false,
16 - cmd = { 'MasonToolsInstall', 'MasonToolsInstallSync', 'MasonToolsUpdate', 'MasonToolsUpdateSync', 'MasonToolsClean', },
17 16 opts = {
18 17 ensure_installed = {
19 18 'lua-language-server',

neovim/lua/bugabinga/plugins/mkdir.lua

Modified
1 -return { 'jghauser/mkdir.nvim', event = 'BufWritePre' }
1 +return { 'jghauser/mkdir.nvim', event = 'BufWritePre', }

neovim/lua/bugabinga/plugins/navic.lua

Modified
1 -return {
2 - 'SmiteshP/nvim-navic',
3 - opts = {
5 - }
6 -}
1 +return { 'SmiteshP/nvim-navic', opts = {}, }

neovim/lua/bugabinga/plugins/neoclip.lua

Modified
1 1 local map = require 'std.map'
3 -return {
4 - 'AckslD/nvim-neoclip.lua',
5 - event = 'TextYankPost',
6 - keys = { 'y', '<leader>p' },
7 - dependencies = {
8 - 'nvim-telescope/telescope.nvim',
9 - },
10 - config = function ()
11 - local neoclip = require 'neoclip'
3 +map.normal {
4 + description = 'Open clipboard history...',
5 + category = 'history',
6 + keys = '<c-p><c-h>',
7 + command = function ()
12 8 local telescope = require 'telescope'
13 - local themes = require 'telescope.themes'
14 - local cursor = themes.get_cursor { layout_config = { preview_width = 0.69, width = 0.42 } }
16 - neoclip.setup {}
17 9 telescope.load_extension 'neoclip'
19 - map.normal {
20 - description = 'Open clipboard history...',
21 - category = 'history',
22 - keys = '<leader>p',
23 - command = function () telescope.extensions.neoclip.default( cursor ) end,
24 - }
10 + telescope.extensions.neoclip.default()
25 11 end,
14 +return {
15 + 'AckslD/nvim-neoclip.lua',
16 + event = 'TextYankPost',
17 + dependencies = {
18 + 'nvim-telescope/telescope.nvim',
19 + },
20 + opts = {},

neovim/lua/bugabinga/plugins/neodev.lua

Deleted
deleted file mode 100644
1 -return {
2 - 'folke/neodev.nvim',
3 - lazy = false,
4 - opts = {
5 - lspconfig = false,
6 - override = function ( root_dir, library )
7 - if root_dir:find( '/etc/nixos', 1, true ) == 1 then
8 - library.enabled = true
9 - library.plugins = true
10 - end
11 - end,
12 - },
13 -}

neovim/lua/bugabinga/plugins/neogen.lua

Modified
1 1 local map = require 'std.map'
3 +map.normal {
4 + description = 'Generate doc comment for outer element',
5 + category = 'editing',
6 + keys = '<leader>gd',
7 + command = function () require 'neogen'.generate() end,
8 +}
10 +map.normal {
11 + name = 'Generate Doc Comment for Function',
12 + category = 'editing',
13 + keys = '<leader>gdf',
14 + command = function () require 'neogen'.generate { type = 'func', } end,
17 +map.normal {
18 + description = 'Generate Doc Comment for File',
19 + category = 'editing',
20 + keys = '<leader>gdF',
21 + command = function () require 'neogen'.generate { type = 'file', } end,
24 +map.normal {
25 + description = 'Generate Doc Comment for Class',
26 + category = 'editing',
27 + keys = '<leader>gdc',
28 + command = function () require 'neogen'.generate { type = 'class', } end,
3 31 return {
4 32 'danymat/neogen',
5 - keys = { '<leader>gd', },
6 33 dependencies = { 'nvim-treesitter/nvim-treesitter', },
7 - config = function ()
8 - local neogen = require 'neogen'
10 - neogen.setup {}
12 - map.normal {
13 - description = 'Generate doc comment for outer element',
14 - category = 'editing',
15 - keys = '<leader>gd',
16 - command = neogen.generate,
17 - }
19 - map.normal {
20 - name = 'Generate Doc Comment for Function',
21 - category = 'editing',
22 - keys = '<leader>gd' .. 'f',
23 - command = function () neogen.generate { type = 'func', } end,
24 - }
26 - map.normal {
27 - description = 'Generate Doc Comment for File',
28 - category = 'editing',
29 - keys = '<leader>gd' .. 'F',
30 - command = function () neogen.generate { type = 'file', } end,
31 - }
33 - map.normal {
34 - description = 'Generate Doc Comment for Class',
35 - category = 'editing',
36 - keys = '<leader>gd' .. 'c',
37 - command = function () neogen.generate { type = 'class', } end,
38 - }
39 - end,
34 + opts = {},

neovim/lua/bugabinga/plugins/noice.lua.off

Deleted
deleted file mode 100644
1 -local map = require 'std.map'
3 -return {
4 - {
5 - 'folke/noice.nvim',
6 - event = 'VeryLazy',
7 - dependencies = {
8 - 'MunifTanjim/nui.nvim',
9 - 'rcarriga/nvim-notify',
10 - },
11 - opts = {
12 - -- cmdline = {
13 - -- view = 'cmdline', -- cmdline on cursor
14 - -- },
15 - lsp = {
16 - signature = {
17 - auto_open = { trigger = false },
18 - },
19 - -- override markdown rendering so that **cmp** and other plugins use **Treesitter**
20 - override = {
21 - ['vim.lsp.util.convert_input_to_markdown_lines'] = true,
22 - ['vim.lsp.util.stylize_markdown'] = true,
23 - ['cmp.entry.get_documentation'] = true,
24 - },
25 - },
26 - presets = {
27 - inc_rename = true, -- enables an input dialog for inc-rename.nvim
28 - long_message_to_split = true, -- long messages will be sent to a split
29 - },
30 - views = {
31 - vsplit = {
32 - size = { width = 'auto', height = 'auto' },
33 - },
34 - popupmenu = {
35 - border = { style = vim.g.border_style },
36 - },
37 - popup = {
38 - border = { style = vim.g.border_style },
39 - },
40 - hover = {
41 - border = { style = vim.g.border_style },
42 - position = { row = -2, col = 2 },
43 - },
44 - cmdline = {
45 - relative = 'cursor',
46 - position = { row = 0, col = 2 },
47 - size = { width = '42', height = 'auto' },
48 - border = { style = 'solid' },
49 - zindex = 9999,
50 - },
51 - cmdline_popupmenu = {
52 - relative = 'cursor',
53 - position = { row = 1, col = 0 },
54 - size = { width = '42', height = 'auto' },
55 - border = { style = vim.g.border_style },
56 - zindex = 9999,
57 - },
58 - },
59 - routes = {
60 - {
61 - filter = { cmdline = '^:%s*!' },
62 - view = 'vsplit'
63 - },
64 - {
65 - filter = { event = 'msg_show', kind = 'echomsg' },
66 - view = 'mini'
67 - },
68 - {
69 - filter = { event = 'msg_show', kind = 'echo' },
70 - view = 'mini'
71 - },
72 - {
73 - filter = { event = 'msg_show', kind = '', find = 'written' },
74 - view = 'mini'
75 - },
76 - {
77 - filter = { any = { { cmdline = '^:%s*lua%s+' }, { cmdline = '^:%s*lua%s*=%s*' }, { cmdline = '^:%s*=%s*' }, } },
78 - view = 'cmdline_output',
79 - }
80 - },
81 - },
82 - config = function ( _, opts )
83 - local noice = require 'noice'
84 - noice.setup( opts )
86 - map.normal {
87 - description = 'Open search for notifications...',
88 - category = 'search',
89 - keys = '<C-n><C-n>',
90 - command = function () noice.cmd 'history' end,
91 - }
93 - map.command_line {
94 - description = 'Redirect Cmdline',
95 - category = 'ui',
96 - keys = '<S-cr>',
97 - ---@diagnostic disable-next-line: param-type-mismatch
98 - command = function () noice.redirect( vim.fn.getcmdline() ) end,
99 - }
101 - map.normal {
102 - description = 'Dismiss current notifications',
103 - category = 'notify',
104 - keys = '<esc>',
105 - command = function () noice.cmd 'dismiss' end,
106 - }
108 - local noice_lsp = require 'noice.lsp'
110 - map.normal {
111 - description = 'Scroll up in documentation popup',
112 - category = 'ui',
113 - keys = '<C-f>',
114 - command = function ()
115 - if not noice_lsp.scroll( -4 ) then return '<C-f>' end
116 - end,
117 - options = { expr = true },
118 - }
120 - map.normal {
121 - description = 'Scroll down in documentation popup',
122 - category = 'ui',
123 - keys = '<C-b>',
124 - command = function ()
125 - if not noice_lsp.scroll( 4 ) then return '<C-b>' end
126 - end,
127 - options = { expr = true },
128 - }
129 - end,
130 - },
131 - {
132 - 'rcarriga/nvim-notify',
133 - config = function ()
134 - local notify = require 'notify'
135 - local fade = require 'notify.stages.fade' 'bottom_up'
137 - local shadow_fade = function ( ... )
138 - local opts = fade[1]( ... )
139 - if opts then
140 - opts.border = vim.g.border_style
141 - opts.row = opts.row - 1
142 - end
143 - return opts
144 - end
146 - ---@diagnostic disable-next-line: missing-fields
147 - notify.setup {
148 - stages = { shadow_fade, unpack( fade, 2 ) },
149 - render = 'compact',
150 - timeout = 2500,
151 - fps = 60,
152 - top_down = false,
153 - }
154 - end,
155 - },

neovim/lua/bugabinga/plugins/nrpattern.lua

Modified
1 -return { {
1 +return {
2 2 'zegervdv/nrpattern.nvim',
3 3 keys = { '<C-a>', '<C-x>', },
4 4 config = function ()
5 5 local nrpattern = require 'nrpattern'
6 - -- this plugin overrides all its settiungs if empty map is given
6 + -- this plugin overrides all its settings if empty map is given
7 7 nrpattern.setup()
8 8 end,
9 -}, }
9 +}

neovim/lua/bugabinga/plugins/nui.lua

Modified
1 -return {
2 - 'MunifTanjim/nui.nvim',
3 -}
1 +return { 'MunifTanjim/nui.nvim', }

neovim/lua/bugabinga/plugins/nvim-jdtls.lua

Modified
1 -return {
2 - 'bugabinga/nvim-jdtls',
3 -}
1 +return { 'bugabinga/nvim-jdtls', }

neovim/lua/bugabinga/plugins/oil.lua

Modified
1 1 local map = require 'std.map'
3 +map.normal {
4 + description = 'Open parent directory in buffer.',
5 + category = 'files',
6 + keys = '-',
7 + -- command = function () require 'oil'.open_float() end,
8 + command = function () require 'oil'.open() end,
9 +}
3 11 return {
4 12 'stevearc/oil.nvim',
5 - keys = '-',
6 - cmd = { 'Oil' },
7 - dependencies = { 'nvim-tree/nvim-web-devicons' },
13 + cmd = { 'Oil', },
14 + dependencies = { 'nvim-tree/nvim-web-devicons', },
8 15 config = function ()
9 16 local oil = require 'oil'
10 17 oil.setup {
11 18 skip_confirm_for_simple_edits = true,
12 19 delete_to_trash = true,
20 + -- TODO: does oil support trash on win32?
13 21 -- trash_command = 'rm --trash', --nu command
15 23 colums = {
21 29 keymaps = {
22 30 ['q'] = 'actions.close',
23 31 ['<esc>'] = 'actions.close',
24 - ['<C-/>'] = 'actions.show_help',
32 + ['g?'] = 'actions.show_help',
25 33 ['<C-v>'] = 'actions.select_vsplit',
26 34 ['<C-s>'] = 'actions.select_split',
27 35 ['<C-h>'] = 'actions.toggle_hidden',
29 37 float = {
30 38 max_width = 69,
31 - min_width = 42,
39 + min_width = 69,
32 40 border = vim.g.border_style,
33 41 padding = 2,
34 - win_options = { winblend = vim.o.winblend },
38 - map.normal {
39 - description = 'Open parent directory in buffer.',
40 - category = 'files',
41 - keys = '-',
42 - -- command = oil.open,
43 - command = oil.open_float,
44 - }
45 44 end,

neovim/lua/bugabinga/plugins/origami.lua

Deleted
deleted file mode 100644
1 -return {
2 - 'chrisgrieser/nvim-origami',
3 - enabled = false,
4 - event = 'BufReadPost',
5 - opts = true,
6 -}

neovim/lua/bugabinga/plugins/persistence.lua

Modified
2 2 local map = require 'std.map'
4 4 return {
5 5 'folke/persistence.nvim',
6 - tag = 'v2.0.0',
6 + version = '2.*',
7 7 event = 'BufReadPre',
8 8 opts = {},
9 9 config = function ( _, opts )

neovim/lua/bugabinga/plugins/schemastore.lua

Modified
1 -return {
2 - 'b0o/schemastore.nvim',
3 -}
1 +return { 'b0o/schemastore.nvim', }

neovim/lua/bugabinga/plugins/specs.lua

Modified
1 1 local map = require 'std.map'
2 2 local ignored = require 'std.ignored'
4 -return { {
5 - 'KevinSilvester/specs.nvim',
6 - keys = { '<leader><leader>', '<leader><leader><leader>' },
7 - config = function ()
8 - local specs = require 'specs'
4 +map.normal {
5 + description = 'Find cursor!',
6 + category = 'fun',
7 + keys = '<leader><leader>',
8 + command = function () require 'specs'.show_specs() end,
9 +}
10 - specs.setup {
11 +map.normal {
12 + description = 'Find cursor, for real!',
13 + category = 'fun',
14 + keys = '<leader><leader><leader>',
15 + command = function ()
16 + require 'specs'.show_specs { width = 69, delay_ms = 69, inc_ms = 42, }
17 + end,
20 +return {
21 + 'KevinSilvester/specs.nvim',
22 + opts = function ()
23 + return {
11 24 show_jumps = true,
12 25 min_jump = 30,
13 26 popup = {
14 27 delay_ms = 10, -- delay before popup displays
15 - inc_ms = 10, -- time increments used for fade/resize effects
16 - blend = 10, -- starting blend, between 0-100 (fully transparent), see :h winblend
28 + inc_ms = 10, -- time increments used for fade/resize effects
29 + blend = 10, -- starting blend, between 0-100 (fully transparent), see :h winblend
17 30 width = 10,
18 31 winhl = 'Cursor',
19 - fader = specs.exp_fader,
20 - resizer = specs.shrink_resizer
32 + fader = require 'specs'.exp_fader,
33 + resizer = require 'specs'.shrink_resizer,
22 35 ignore_filetypes = ignored.filetypes_kv,
23 36 ignore_buftypes = ignored.buftypes_kv,
26 - map.normal {
27 - description = 'Find cursor!',
28 - category = 'fun',
29 - keys = '<leader><leader>',
30 - command = specs.show_specs,
31 - }
33 - map.normal {
34 - description = 'Find cursor, for real!',
35 - category = 'fun',
36 - keys = '<leader><leader><leader>',
37 - command = function ()
38 - specs.show_specs { width = 69, delay_ms = 69, inc_ms = 42 }
39 - end,
40 - }
41 - end,
42 -} }
38 + end
39 + ,

neovim/lua/bugabinga/plugins/spectre.lua

Modified
2 2 local map = require 'std.map'
4 4 require 'bugabinga.health'.add_dependency
6 - name_of_executable = 'rg'
6 + name_of_executable = 'rg',
7 +}
9 +map.normal {
10 + description = 'Search and replace',
11 + category = 'search',
12 + keys = '<leader>rs',
13 + command = function () spectre.open() end,
16 +map.normal {
17 + description = 'Search current word',
18 + category = 'search',
19 + keys = '<leader>rw',
20 + command = function () spectre.open_visual { select_word = true, } end,
23 +map.visual {
24 + description = 'Search current word',
25 + category = 'search',
26 + keys = '<leader>rw',
27 + command = function () spectre.open_visual() end,
30 +map.normal {
31 + description = 'Search on current file',
32 + category = 'search',
33 + keys = '<leader>rf',
34 + command = function () spectre.open_file_search { select_word = true, } end,
9 37 return {
10 - 'bugabinga/nvim-spectre',
38 + 'nvim-pack/nvim-spectre',
11 39 cmd = 'Spectre',
12 40 dependencies = {
13 41 'nvim-lua/plenary.nvim',
15 43 opts = {
16 44 live_update = true,
17 - default = { replace = { cmd = 'oxi' } },
45 + default = { replace = { cmd = 'oxi', }, },
19 - config = function ( _, opts )
20 - local spectre = require 'spectre'
21 - spectre.setup( opts )
47 + build = function ( plugin_spec )
48 + local sysname = vim.uv.os_uname().sysname
23 - map.normal {
24 - description = 'Open Spectre',
25 - category = 'search',
26 - keys = '<leader>s',
27 - command = function () spectre.open() end,
28 - }
50 + local copy_cmd = {}
51 + if sysname == 'Darwin' then
52 + copy_cmd = { 'cp', 'target/release/libspectre_oxi.dylib', '../lua/spectre_oxi.so', }
53 + elseif sysname == 'Linux' then
54 + copy_cmd = { 'cp', 'target/release/libspectre_oxi.so', '../lua/spectre_oxi.so', }
55 + elseif sysname == 'Windows_NT' then
56 + copy_cmd = { 'cp', 'target/release/libspectre_oxi.dll', '../lua/spectre_oxi.dll', }
57 + else
58 + error 'unsupported os'
59 + end
30 - map.normal {
31 - description = 'Search current word',
32 - category = 'search',
33 - keys = '<leader>sw',
34 - command = function () spectre.open_visual { select_word = true } end,
35 - }
61 + local spectre_oxi_dir = vim.fs.joinpath( plugin_spec.dir, 'spectre_oxi' )
62 + vim.uv.chdir( spectre_oxi_dir )
37 - map.visual {
38 - description = 'Search current word',
39 - category = 'search',
40 - keys = '<leader>sw',
41 - command = function () spectre.open_visual() end,
42 - }
64 + local cargo_build_proc = vim.system( { 'cargo', 'build', '--release', }, { text = true, } ):wait()
65 + if cargo_build_proc.code ~= 0 then error( cargo_build_proc.stderr ) end
44 - map.normal {
45 - description = 'Search on current file',
46 - category = 'search',
47 - keys = '<leader>sp',
48 - command = function () spectre.open_file_search { select_word = true } end,
49 - }
67 + local cp_proc = vim.system( copy_cmd, { text = true, } ):wait()
68 + if cp_proc.code ~= 0 then error( cp_proc.stderr ) end
70 + local rm_proc = vim.system( { 'rm', '-r', '-f', 'target', }, { text = true, } ):wait()
71 + if rm_proc.code ~= 0 then error( rm_proc.stderr ) end
73 + vim.print 'Building oxi done'
50 74 end,

neovim/lua/bugabinga/plugins/ssr.lua

Modified
1 1 local map = require 'std.map'
3 +local open_ssr = function () require 'ssr'.open() end
5 +map.normal.visual {
6 + description = 'Open structural search and replace',
7 + category = 'refactoring',
8 + keys = '<leader>rr',
9 + command = open_ssr,
12 +--FIXME: use custom facade
13 +vim.api.nvim_create_user_command( 'StructuralSearchAndReplace', open_ssr, { bang = true, } )
3 15 return {
4 16 'cshuaimin/ssr.nvim',
5 17 cmd = 'StructuralSearchAndReplace',
6 - keys = { '<leader>rs', mode = { 'n', 'x' } },
7 - config = function ()
8 - local ssr = require 'ssr'
9 - ssr.setup {
10 - border = vim.g.border_style,
11 - min_width = 69,
12 - min_height = 42,
13 - max_width = 3 * 69,
14 - max_height = 3 * 42,
15 - adjust_window = true,
16 - keymaps = {
17 - close = 'q',
18 - next_match = 'n',
19 - prev_match = 'N',
20 - replace_confirm = '<cr>',
21 - replace_all = '<c-cr>',
22 - },
23 - }
25 - local open_ssr = function () ssr.open() end
27 - map.normal.visual {
28 - description = 'Open structural search and replace',
29 - category = 'refactoring',
30 - keys = '<leader>rs',
31 - command = open_ssr,
32 - }
34 - vim.api.nvim_create_user_command( 'StructuralSearchAndReplace', open_ssr, { bang = true } )
35 - end
18 + opts = {
19 + border = vim.g.border_style,
20 + min_width = 69,
21 + min_height = 42,
22 + max_width = 3 * 69,
23 + max_height = 3 * 42,
24 + adjust_window = true,
25 + keymaps = {
26 + close = 'q',
27 + next_match = 'n',
28 + prev_match = 'N',
29 + replace_confirm = '<cr>',
30 + replace_all = '<c-cr>',
31 + },
32 + },

neovim/lua/bugabinga/plugins/starter.lua

Modified
9 9 local is_home = vim.uv.cwd() == vim.uv.os_homedir()
11 11 local custom_actions = {
12 - { name = 'Find files', action = 'Telescope find_files', section = 'Builtin actions' },
13 - { name = 'Oil', action = 'Oil', section = 'Builtin actions' },
12 + { name = 'Find files', action = 'Telescope find_files', section = 'Builtin actions', },
13 + { name = 'Explore files', action = 'Oil', section = 'Builtin actions', },
16 16 local sessions = function ( limit )
38 38 local section = 'Sessions'
40 - return { name = name, action = action, section = section }
40 + return { name = name, action = action, section = section, }
41 41 end )
42 42 :totable()
52 52 pattern = 'LazyVimStarted',
53 53 once = true,
54 54 command = vim.schedule_wrap( function ()
55 - if vim.bo.filetype == "starter" then
55 + if vim.bo.filetype == 'starter' then
56 56 startuptime = require 'lazy'.stats().startuptime
57 57 starter.refresh()
80 80 content_hooks = {
81 81 starter.gen_hook.adding_bullet(),
82 82 starter.gen_hook.aligning( 'center', 'center' ),
83 - starter.gen_hook.indexing( 'all', { 'Recent files', 'Recent files (current directory)', 'Builtin actions' } ),
83 + starter.gen_hook.indexing( 'all', { 'Recent files', 'Recent files (current directory)', 'Builtin actions', } ),
86 86 end,

neovim/lua/bugabinga/plugins/substitute.lua

Modified
1 -local map = require'std.map'
1 +local map = require 'std.map'
3 -return {{
4 - "gbprod/substitute.nvim",
5 - keys = { 's', 'S' },
6 - config = function()
7 - local substitute = require'substitute'
8 - substitute.setup{}
3 +map.normal {
4 + description = 'substitution motion',
5 + category = 'editing',
6 + keys = 's',
7 + command = function () require 'substitute'.operator() end,
8 +}
10 - map.normal {
11 - description = 'substitution motion',
12 - category = 'editing',
13 - keys = 's',
14 - command = substitute.operator,
15 - }
10 +map.normal {
11 + description = 'substitution of current line',
12 + category = 'editing',
13 + keys = 'ss',
14 + command = function () require 'substitute'.line() end,
17 - map.normal {
18 - description = 'substitution of current line',
19 - category = 'editing',
20 - keys = 'ss',
21 - command = substitute.line,
22 - }
17 +map.normal {
18 + description = 'substitution until end of line',
19 + category = 'editing',
20 + keys = 'S',
21 + command = function () require 'substitute'.eol() end,
24 - map.normal {
25 - description = 'substitution until end of line',
26 - category = 'editing',
27 - keys = 'S',
28 - command = substitute.eol,
29 - }
24 +map.visual {
25 + description = 'substitution motion (visual mode)',
26 + category = 'editing',
27 + keys = 's',
28 + command = function () require 'substitute'.visual() end,
31 +return {
32 + 'gbprod/substitute.nvim',
33 + opts = {},
31 - map.visual {
32 - description = 'substitution motion (visual mode)',
33 - category = 'editing',
34 - keys = 's',
35 - command = substitute.visual,
36 - }
37 - end,
38 -}}

neovim/lua/bugabinga/plugins/surround.lua

Modified
1 1 return {
2 - {
3 - 'kylechui/nvim-surround',
4 - keys = {
5 - { 'ms', mode = 'n' },
6 - { 'mss', mode = 'n' },
7 - { 'mS', mode = 'n' },
8 - { 'mSS', mode = 'n' },
2 + 'kylechui/nvim-surround',
3 + keys = {
4 + { 'ms', mode = 'n', },
5 + { 'mss', mode = 'n', },
6 + { 'mS', mode = 'n', },
7 + { 'mSS', mode = 'n', },
10 - { 'ms', mode = 'x' },
11 - { 'mS', mode = 'x' },
9 + { 'ms', mode = 'x', },
10 + { 'mS', mode = 'x', },
13 - { 'md', mode = 'n' },
14 - { 'mc', mode = 'n' },
15 - { 'mC', mode = 'n' },
12 + { 'md', mode = 'n', },
13 + { 'mc', mode = 'n', },
14 + { 'mC', mode = 'n', },
15 + },
16 + opts = {
17 + keymaps = {
18 + normal = 'ms',
19 + normal_cur = 'mss',
20 + normal_line = 'mS',
21 + normal_cur_line = 'mSS',
22 + visual = 'ms',
23 + visual_line = 'mS',
24 + delete = 'md',
25 + change = 'mc',
26 + change_line = 'mC',
17 - opts = {
18 - keymaps = {
19 - normal = 'ms',
20 - normal_cur = 'mss',
21 - normal_line = 'mS',
22 - normal_cur_line = 'mSS',
23 - visual = 'ms',
24 - visual_line = 'mS',
25 - delete = 'md',
26 - change = 'mc',
27 - change_line = 'mC',
28 - },
29 - },
30 - dependencies = {
31 - 'nvim-treesitter/nvim-treesitter',
32 - },
33 - }
28 + },
29 + dependencies = {
30 + 'nvim-treesitter/nvim-treesitter',
31 + },

neovim/lua/bugabinga/plugins/symbols-outline.lua

Modified
1 +local map = require 'std.map'
3 +map.normal {
4 + description = 'Open overview of symbols in current buffer',
5 + category = 'lsp',
6 + keys = '<leader>lo',
7 + command = function () require 'navbuddy'.open( 0 ) end,
8 +}
1 10 return {
2 11 'SmiteshP/nvim-navbuddy',
3 12 cmd = 'NavBuddy',

neovim/lua/bugabinga/plugins/telescope.lua

Modified
1 -local map = require 'std.map'
2 -local icon = require 'std.icon'
3 -local table = require 'std.table'
5 1 require 'bugabinga.health'.add_dependency
7 3 name = 'ripgrep',
12 8 name_of_executable = 'fd',
11 +local map = require 'std.map'
12 +local icon = require 'std.icon'
13 +local table = require 'std.table'
15 +map.normal {
16 + description = 'Switch to recently used folders',
17 + category = 'navigation',
18 + keys = '<c-p><c-z>',
19 + command = function () require 'telescope'.extensions.zoxide.list() end,
22 +map.normal.visual.terminal {
23 + description = 'Search help files',
24 + category = 'help',
25 + keys = '<F1>',
26 + command = function () require 'telescope.builtin'.help_tags() end,
29 +map.normal {
30 + description = 'Open last search...',
31 + category = 'plugins',
32 + keys = '<c-p>',
33 + command = function () require 'telescope.builtin'.resume() end,
36 +map.normal {
37 + description = 'Open search for all files...',
38 + category = 'search',
39 + keys = '<c-p><c-p>',
40 + command = function () require 'telescope.builtin'.find_files() end,
43 +map.normal {
44 + description = 'Open search for keymaps...',
45 + category = 'search',
46 + keys = '<c-p><c-k>',
47 + command = function () require 'telescope.builtin'.keymaps() end,
50 +map.normal {
51 + description = 'Open search for symbols...',
52 + category = 'search',
53 + keys = '<c-p><c-s>',
54 + command = function () require 'telescope.builtin'.symbols() end,
57 +map.normal {
58 + description = 'Open search for all file contents...',
59 + category = 'search',
60 + keys = '<c-p><c-g>',
61 + command = function () require 'telescope.builtin'.live_grep() end,
64 +map.normal {
65 + description = 'Open search for current buffer content...',
66 + category = 'search',
67 + keys = '<c-p><c-/>',
68 + command = function () require 'telescope.builtin'.current_buffer_fuzzy_find() end,
71 +map.normal {
72 + description = 'Open search for buffers...',
73 + category = 'search',
74 + keys = '<c-e>',
75 + command = function () require 'telescope.builtin'.buffers() end,
15 78 return {
16 79 'nvim-telescope/telescope.nvim',
17 - tag = '0.1.6',
80 + version = '0.*',
18 81 cmd = 'Telescope',
19 82 event = 'VeryLazy',
20 83 dependencies = {
27 90 config = function ()
28 91 local telescope = require 'telescope'
29 - local builtin = require 'telescope.builtin'
30 92 local actions = require 'telescope.actions'
31 93 local themes = require 'telescope.themes'
48 110 prompt_prefix = icon.telescope .. ' ',
49 111 selection_caret = icon.arrow_right .. ' ',
50 - border = true,
112 + border = vim.g.border_style,
51 113 file_ignore_patterns = {
52 114 '.git/',
53 115 '.svn/',
60 122 '%.mkv',
61 123 '%.mp4',
62 124 '%.zip',
125 + '%.spl',
64 127 mappings = {
81 144 live_grep = ivy,
82 145 current_buffer_fuzzy_find = cursor,
83 146 buffers = cursor,
147 + help_tags = dropdown,
85 149 extensions = {
86 150 ['ui-select'] = { cursor, },
91 155 telescope.load_extension 'ui-select'
92 156 telescope.load_extension 'zoxide'
94 - map.normal {
95 - description = 'Switch to recently used folders',
96 - category = 'navigation',
97 - keys = '<c-z>',
98 - command = telescope.extensions.zoxide.list,
99 - }
101 - map.normal.visual.terminal {
102 - description = 'Search help files',
103 - category = 'help',
104 - keys = '<F1>',
105 - command = function () builtin.help_tags( dropdown ) end,
106 - }
108 - map.normal {
109 - description = 'Open last search...',
110 - category = 'plugins',
111 - keys = '<c-p>',
112 - command = function () builtin.resume() end,
113 - }
115 - map.normal {
116 - description = 'Open search for commands...',
117 - category = 'plugins',
118 - keys = '<c-p><c-m>',
119 - command = function () builtin.commands() end,
120 - }
122 - map.normal {
123 - description = 'Open search for all files...',
124 - category = 'search',
125 - keys = '<c-p><c-p>',
126 - command = function () builtin.find_files() end,
127 - }
129 - map.normal {
130 - description = 'Open search for keymaps...',
131 - category = 'search',
132 - keys = '<c-p><c-k>',
133 - command = function () builtin.keymaps() end,
134 - }
136 - map.normal {
137 - description = 'Open search for symbols...',
138 - category = 'search',
139 - keys = '<c-p><c-s>',
140 - command = function () builtin.symbols() end,
141 - }
143 - map.normal {
144 - description = 'Open search for all file contents...',
145 - category = 'search',
146 - keys = '<c-p><c-g>',
147 - command = function () builtin.live_grep() end,
148 - }
150 - map.normal {
151 - description = 'Open search for current buffer content...',
152 - category = 'search',
153 - keys = '<c-p><c-b>',
154 - command = function () builtin.current_buffer_fuzzy_find() end,
155 - }
157 - map.normal {
158 - description = 'Open search for buffers...',
159 - category = 'search',
160 - keys = '<c-e>',
161 - command = function () builtin.buffers() end,
162 - }

neovim/lua/bugabinga/plugins/todo-comments.lua

Modified
1 1 return {
2 2 'folke/todo-comments.nvim',
3 - tag = 'v1.1.0',
3 + version = '1.*',
4 4 dependencies = { 'nvim-lua/plenary.nvim', },
5 5 event = 'BufReadPost',
6 6 opts = {},

neovim/lua/bugabinga/plugins/toggleterm.lua

Modified
1 1 local map = require 'std.map'
2 2 local auto = require 'std.auto'
4 -require 'bugabinga.health'.add_dependency
5 -{
6 - name_of_executable = 'gitui',
7 -}
8 - {
9 - name_of_executable = 'mdcat',
10 - }
11 - {
12 - name_of_executable = 'dot',
13 - }
15 4 return {
16 5 'akinsho/toggleterm.nvim',
17 - tag = 'v2.10.0',
6 + version = '2.*',
18 7 keys = {
19 8 '<F7>',
20 - '<F8>',
21 - '<F9>',
22 - '<F10>',
24 10 cmd = {
25 11 'ToggleTerm',
26 12 'TermExec',
27 - 'Gitui',
28 - 'Mdcat',
29 - 'Graphviz',
30 - 'Graphviz',
32 14 opts = {
33 15 open_mapping = '<F7>',
34 16 direction = 'float',
35 17 float_opts = {
36 18 border = vim.g.border_style,
37 - winblend = vim.o.winblend,
39 20 size = function ( term )
40 21 if term.direction == 'horizontal' then
65 46 pattern = 'term://*',
66 47 command = set_terminal_keymaps,
69 - map.normal {
70 - description = 'Open vertical Terminal',
71 - category = 'terminal',
72 - keys = '<F8>',
73 - command = '<CMD>exe v:count1 . "ToggleTerm size=60 direction=vertical"<CR>',
74 - }
76 - map.normal {
77 - description = 'Open horizontal Terminal',
78 - category = 'terminal',
79 - keys = '<F9>',
80 - command = '<CMD>exe v:count1 . "ToggleTerm size=20 direction=horizontal"<CR>',
81 - }
83 - local Terminal = require 'toggleterm.terminal'.Terminal
85 - --[ GITUI ]
87 - local gitui = Terminal:new {
88 - hidden = true,
89 - cmd = 'gitui',
90 - dir = 'git_dir',
91 - direction = 'tab',
92 - }
94 - local toggle_gitui = function () gitui:toggle() end
96 - map.normal.terminal.insert {
97 - description = 'Toggle gitui terminal in tab',
98 - category = 'terminal',
99 - keys = '<F10>',
100 - command = toggle_gitui,
101 - }
103 - vim.api.nvim_create_user_command( 'Gitui', toggle_gitui, { desc = 'Toggle Gitui', } )

neovim/lua/bugabinga/plugins/tree.lua

Modified
1 1 local map = require 'std.map'
3 +map.normal {
4 + description = 'Toggle Tree File Explorer',
5 + category = 'explorer',
6 + keys = '<leader>e',
7 + command = function () require 'nvim-tree.api'.tree.toggle() end,
8 +}
3 10 return {
4 11 'nvim-tree/nvim-tree.lua',
5 - version = 'v1.0',
6 - lazy = false,
12 + version = '1.*',
7 13 cmd = 'NvimTreeOpen',
8 - keys = '<leader>e',
9 14 dependencies = {
10 15 'nvim-tree/nvim-web-devicons',
11 16 'antosha417/nvim-lsp-file-operations',
18 23 -- set termguicolors to enable highlight groups
19 24 vim.opt.termguicolors = true
20 25 end,
21 - config = function ()
22 - require 'nvim-tree'.setup {
23 - sort_by = 'case_sensitive',
24 - view = {
25 - width = 69,
26 - },
27 - renderer = {
28 - group_empty = true,
29 - },
30 - filters = {
31 - dotfiles = false,
32 - },
33 - }
26 + opts = {
27 + sort_by = 'case_sensitive',
28 + view = {
29 + width = 69,
30 + },
31 + renderer = {
32 + group_empty = true,
33 + },
34 + filters = {
35 + dotfiles = false,
36 + },
37 + },
38 + config = function ( _, opts )
39 + require 'nvim-tree'.setup( opts )
34 40 require 'lsp-file-operations'.setup()
36 - map.normal {
37 - description = 'Toggle Tree File Explorer',
38 - category = 'explorer',
39 - keys = '<leader>e',
40 - command = '<cmd>NvimTreeToggle<cr>',
41 - }
42 41 end,

neovim/lua/bugabinga/plugins/treesitter.lua

Modified
1 -local map = require 'std.map'
3 1 require 'bugabinga.health'.add_dependency
5 3 name = 'CMake',
22 20 return {
23 21 'nvim-treesitter/nvim-treesitter',
24 - tag = 'v0.9.2',
25 - -- branch = 'master',
22 + -- version = '0.*',
23 + branch = 'master',
26 24 event = { 'BufReadPre', 'BufNewFile', },
27 25 build = function ()
28 26 require 'nvim-treesitter.install'.update { with_sync = true, }
44 42 ---@diagnostic disable-next-line: missing-fields
45 43 configs.setup {
47 44 sync_install = false,
49 45 ensure_installed = {
50 46 'bash',

neovim/lua/bugabinga/plugins/treesj.lua

Modified
1 1 local map = require 'std.map'
3 +map.normal {
4 + description = 'Toggle Tree Join/Split',
5 + category = 'editing',
6 + -- WARN: <C-j> produces the same keycode as <C-enter> on some terminals
7 + keys = '<C-j>',
8 + command = function () require 'treesj'.toggle() end,
9 +}
3 11 return {
4 12 'Wansmer/treesj',
5 13 keys = '<C-j>',
6 - dependencies = { 'nvim-treesitter/nvim-treesitter' },
14 + dependencies = { 'nvim-treesitter/nvim-treesitter', },
7 15 opts = {
8 16 use_default_keymaps = false,
10 - config = function ( _, opts )
11 - local treesj = require 'treesj'
12 - treesj.setup( opts )
14 - map.normal {
15 - description = 'Toggle Tree Join/Split',
16 - category = 'editing',
17 - -- WARN: <C-j> produces the same keycode as <C-enter> on some terminals
18 - keys = '<C-j>',
19 - command = treesj.toggle,
20 - }
21 - end,

neovim/lua/bugabinga/plugins/virt-column.lua

Modified
1 1 local ignored = require 'std.ignored'
3 3 return {
4 - {
5 - 'lukas-reineke/virt-column.nvim',
6 - tag = 'v2.0.2',
7 - event = { 'BufReadPost', 'BufNew', },
8 - opts = {
9 - -- FIXME: I have visual redrawing bugs right now.
10 - enabled = false,
11 - char = { '░', '▒', '▓', },
12 - exclude = {
13 - filetypes = ignored.filetypes,
14 - buftypes = ignored.buftypes,
15 - },
4 + 'lukas-reineke/virt-column.nvim',
5 + version = '2.*',
6 + event = { 'BufReadPost', 'BufNew', },
7 + opts = {
8 + -- FIXME: I have visual redrawing bugs right now.
9 + enabled = false,
10 + char = { '░', '▒', '▓', },
11 + exclude = {
12 + filetypes = ignored.filetypes,
13 + buftypes = ignored.buftypes,

neovim/lua/bugabinga/plugins/whichkey.lua

Modified
3 3 local ignored = require 'std.ignored'
4 4 local icon = require 'std.icon'
6 6 return {
7 7 'folke/which-key.nvim',
8 - tag = 'v1.6.0',
8 + version = '1.*',
9 9 event = 'VeryLazy',
10 10 init = function ()
11 11 vim.o.timeout = true
40 40 -- use category as prefix?
41 41 wk.register {
42 42 ['<leader>'] = {
43 - m = { name = 'mark', _ = 'which_key_ignore', },
44 - h = { name = 'hunk', _ = 'which_key_ignore', },
45 - l = { name = 'lsp', _ = 'which_key_ignore', },
46 - r = { name = 'refactor', _ = 'which_key_ignore', },
47 - s = {
48 - name = 'swap',
49 - _ = 'which_key_ignore',
43 + m = { name = '|m|ark', _ = 'which_key_ignore', },
44 + h = { name = '|h|unk', _ = 'which_key_ignore', },
45 + r = { name = '|r|efactor', _ = 'which_key_ignore', },
46 + f = { name = '|f|iles', _ = 'which_key_ignore', },
47 + g = { name = '|g|enerate', _ = 'which_key_ignore', },
48 + v = { name = '|v|ersion control', _ = 'which_key_ignore', },
49 + l = { name = '|l|sp', _ = 'which_key_ignore',
50 + p = { name = '|p|eek', _ = 'which_key_ignore', },
51 + c = { name = '|c|alls', _ = 'which_key_ignore', },
52 + },
53 + s = { name = '|s|wap', _ = 'which_key_ignore',
51 - p = { name = 'parameter', _ = 'which_key_ignore', },
55 + p = { name = '|p|arameter', _ = 'which_key_ignore', },
54 - t = {
55 - name = 'toggle',
56 - _ = 'which_key_ignore',
58 + t = { name = '|t|oggle', _ = 'which_key_ignore',
58 - o = { name = 'options', _ = 'which_key_ignore', },
60 + o = { name = '|o|ptions', _ = 'which_key_ignore', },
61 - z = { name = 'lazy', _ = 'which_key_ignore', },
63 + z = { name = 'la|z|y', _ = 'which_key_ignore', },
62 64 [' '] = { name = 'fun', _ = 'which_key_ignore', },

neovim/lua/bugabinga/plugins/window.lua

Modified
1 1 local map = require 'std.map'
3 +map.normal {
4 + description = 'Open window picker...',
5 + category = 'navigation',
6 + keys = '<c-w>a',
7 + command = function () require 'nvim-window'.pick() end,
8 +}
10 +-- TODO: use facade
11 +vim.api.nvim_create_user_command( 'PickWindow', function () require 'nvim-window'.pick() end, { bang = true, } )
3 13 return {
4 14 'yorickpeterse/nvim-window',
5 - cmd = 'PickWindow',
6 - keys = '<c-w>a',
8 15 opts = {
9 16 -- from wezterm for easz qwerty moitions
10 - chars = {
11 - 'a',
12 - 's',
13 - 'd',
14 - 'f',
15 - 'q',
16 - 'w',
17 - 'e',
18 - 'r',
19 - 'z',
20 - 'x',
21 - 'c',
22 - 'v',
23 - 'j',
24 - 'k',
25 - 'l',
26 - 'm',
27 - 'i',
28 - 'u',
29 - 'o',
30 - 'p',
31 - 'g',
32 - 'h',
33 - 't',
34 - 'y',
35 - 'b',
36 - 'n',
37 - },
17 + chars = { 'a', 's', 'd', 'f', 'q', 'w', 'e', 'r', 'z', 'x', 'c', 'v', 'j', 'k', 'l', 'm', 'i', 'u', 'o', 'p', 'g', 'h', 't', 'y', 'b', 'n', },
38 18 border = vim.g.border_style,
39 19 normal_hl = 'NormalFloat',
40 20 hint_hl = 'Special',
42 - config = function ( _, opts )
43 - local window = require 'nvim-window'
45 - window.setup( opts )
47 - map.normal {
48 - description = 'Open window picker...',
49 - category = 'navigation',
50 - keys = '<c-w>a',
51 - command = function () window.pick() end,
52 - }
54 - vim.api.nvim_create_user_command( 'PickWindow', window.pick, { bang = true } )
55 - end

neovim/lua/bugabinga/plugins/zen.lua

Modified
1 +local map = require 'std.map'
3 +map.normal {
4 + description = 'Enable zen mode',
5 + category = 'ui',
6 + keys = '<leader>tz',
7 + command = function () require 'zen-mode'.toggle() end,
8 +}
1 10 return {
2 - "folke/zen-mode.nvim",
11 + 'folke/zen-mode.nvim',
3 12 cmd = 'ZenMode',
4 - dependencies = { { 'folke/twilight.nvim', opts = { dimming = { inactive = true } } } },
13 + dependencies = { { 'folke/twilight.nvim', opts = { dimming = { inactive = true, }, }, }, },
5 14 opts = {
6 15 --FIXME: this does not work, because on win32 there is no base64 binary
7 - plugins = { wezterm = { enabled = true, font = "+4" } },
16 + plugins = { wezterm = { enabled = true, font = '+4', }, },
8 17 window = {
9 18 width = 0.69,
10 19 backdrop = 0.42,
11 20 options = {
12 - signcolumn = "no",
21 + signcolumn = 'no',
13 22 number = false,
14 23 relativenumber = false,
15 24 cursorline = false,
16 25 cursorcolumn = false,
17 - foldcolumn = "0",
26 + foldcolumn = '0',
18 27 list = false,