repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

neovim: cleanup. delete unused plugins

66b985ce8be40978f736d7d954caef1106c7977c

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (18)

helix/config.toml

Modified
1 -theme = "nugu-dark"
1 +theme = "nugu-light"
3 3 [editor]
4 4 shell = ["nu", "--commands"]

neovim/.editorconfig

Modified
1 1 root = true
3 -[*]
4 -spell = false
6 -[*.lua]
7 -number = false
8 -relativenumber = false
9 -diagnostic = false
11 3 # see https://github.com/CppCXY/EmmyLuaCodeStyle
12 4 # optional space/tab
13 5 indent_style = space

neovim/.save.actions.lua

Deleted
deleted file mode 100644
1 -return { 'Format' }

neovim/README.md

Modified
49 49 # todo
51 51 * steal <https://github.com/olrtg/nvim-emmet>
52 +* use checkhealth to find deprecations and fix

neovim/init.lua

Modified
11 11 local version = vim.version()
12 12 local expected = { major = 0, minor = 11 }
13 13 if version.major ~= expected.major or version.minor ~= expected.minor then
14 - vim.notify(
15 - 'This configuration assumes NeoVim version ' ..
16 - expected.major .. '.' .. expected.minor .. ', but it is ' .. version.major .. '.' .. version.minor .. '!',
17 - vim.log.levels.ERROR )
18 - return
14 + vim.notify(
15 + 'This configuration assumes NeoVim version ' ..
16 + expected.major .. '.' .. expected.minor .. ', but it is ' .. version.major .. '.' .. version.minor .. '!',
17 + vim.log.levels.ERROR)
18 + return
21 21 -- setup debug mode
27 27 -- inspect profile on https://ui.perfetto.dev
28 28 require 'bugabinga.profile'
30 -local start_time = vim.uv.hrtime() ---@diagnostic disable-line: undefined-field
30 +local start_time = vim.uv.hrtime()
31 31 local auto = require 'std.auto'
32 32 auto 'measure_startup_time' {
33 - events = 'VimEnter',
34 - description = 'Measure startup time of neovim.',
35 - once = true,
36 - command = function ()
37 - local end_time = vim.uv.hrtime() ---@diagnostic disable-line: undefined-field
38 - local time_elapsed = end_time - start_time
39 - vim.schedule( function ()
40 - vim.notify( string.format( 'Neovim started in (%d ms).', time_elapsed / 1e6 ), vim.log.levels.INFO )
41 - end )
42 - end,
33 + events = 'VimEnter',
34 + description = 'Measure startup time of neovim.',
35 + once = true,
36 + command = function()
37 + local end_time = vim.uv.hrtime()
38 + local time_elapsed = end_time - start_time
39 + vim.schedule(function()
40 + local time_elapsed_ms = time_elapsed / 1e6
41 + local msg = string.format('Neovim started in (%d ms).', time_elapsed_ms)
42 + vim.notify(msg, vim.log.levels.INFO)
43 + end)
44 + end,
45 47 vim.cmd.colorscheme 'nugu'
47 49 require 'patches'
49 51 --[[ MY STUFF ]]
50 ---
52 +require 'bugabinga.bigfile'
53 +require 'bugabinga.diagnostic'
54 +require 'bugabinga.editorconfig'
55 +require 'bugabinga.java'
56 +require 'bugabinga.lsp'
57 +require 'bugabinga.mkdir'
51 58 require 'bugabinga.options'
52 59 require 'bugabinga.sessions'
53 60 require 'bugabinga.treesitter'
54 -require 'bugabinga.bigfile'
55 -require 'bugabinga.editorconfig'
56 -require 'bugabinga.save_actions'
57 -require 'bugabinga.lsp'
58 -require 'bugabinga.java'
59 -require 'bugabinga.mkdir'
60 -require 'bugabinga.diagnostic'
62 62 --[[ PLUGINS ]]
63 ---
64 -require 'bugabinga.file_explorer'
65 -require 'bugabinga.virtual_column'
66 63 require 'bugabinga.autotag'
67 64 require 'bugabinga.colorizer'
68 65 require 'bugabinga.devicons'
69 66 require 'bugabinga.diff'
67 +require 'bugabinga.file_explorer'
70 68 require 'bugabinga.format'
69 +require 'bugabinga.fuzzy_find'
71 70 require 'bugabinga.jump2d'
72 -require 'bugabinga.lint'
73 -require 'bugabinga.search_and_replace'
71 +require 'bugabinga.key_preview'
74 72 require 'bugabinga.move'
75 73 require 'bugabinga.navigation'
76 74 require 'bugabinga.notifications'
77 -require 'bugabinga.operators'
75 +require 'bugabinga.patterns'
76 +require 'bugabinga.search_and_replace'
78 77 require 'bugabinga.specs'
79 78 require 'bugabinga.splitjoin'
80 -require 'bugabinga.statusbar'
81 79 require 'bugabinga.surround'
82 -require 'bugabinga.textobjects'
83 -require 'bugabinga.key_preview'
84 -require 'bugabinga.patterns'
85 80 require 'bugabinga.terminal'
86 -require 'bugabinga.fuzzy_find'
87 -require 'bugabinga.tree_explorer'
81 +require 'bugabinga.textobjects'
82 +require 'bugabinga.virtual_column'
89 84 require 'bugabinga.incubator'

neovim/lua/bugabinga/key_preview.lua

Modified
46 46 clues = {
47 47 -- Enhance this by adding descriptions for <Leader> mapping groups
48 48 { mode = 'n', keys = '<Leader>t', desc = '+Toggle' },
49 - { mode = 's', keys = '<Leader>s', desc = '+Session' },
49 + { mode = 'n', keys = '<Leader>s', desc = '+Session' },
50 50 { mode = 'n', keys = '<Leader>f', desc = '+Find' },
51 51 { mode = 'n', keys = '<Leader>r', desc = '+Rules' },
52 52 { mode = 'n', keys = '<Leader>x', desc = '+Neovim' },

neovim/lua/bugabinga/lint.lua

Deleted
deleted file mode 100644
1 -local puk = require 'std.puk'
2 -local auto = require 'std.auto'
4 -puk.defer 'lint' (function(lint)
5 - local linters_by_ft = {
6 - lua = { 'selene' },
7 - sh = { 'shellcheck', 'dotenv_linter' },
8 - systemd = { 'systemd-analyze' },
9 - editorconfig = { 'editorconfig-checker' },
10 - yaml = { 'yq' },
11 - }
12 - for k, v in pairs(linters_by_ft) do
13 - lint.linters[k] = v
14 - end
16 - local timer = vim.uv.new_timer()
17 - local DEBOUNCE_MS = 500
18 - local try_lint = function()
19 - local bufnr = vim.api.nvim_get_current_buf()
20 - if timer then
21 - timer:stop()
22 - timer:start(DEBOUNCE_MS, 0,
23 - vim.schedule_wrap(function()
24 - if vim.api.nvim_buf_is_valid(bufnr) then
25 - vim.api.nvim_buf_call(bufnr, function() lint.try_lint(nil, { ignore_errors = true }) end)
26 - end
27 - end))
28 - end
29 - end
31 - auto 'Lint' {
32 - description = 'Attempt linting current file',
33 - events = 'BufWritePost',
34 - command = try_lint,
35 - }
36 -end)

neovim/lua/bugabinga/operators.lua

Deleted
deleted file mode 100644
1 -local puk = require 'std.puk'
2 -puk.defer 'mini.operators' (function(operators)
3 - operators.setup {
4 - -- Evaluate text and replace with output
5 - evaluate = { prefix = '<leader>o=' },
6 - -- Exchange text regions
7 - exchange = { prefix = '<leader>ox' },
8 - -- Multiply (duplicate) text
9 - multiply = { prefix = '<leader>om' },
10 - -- Replace text with register
11 - replace = { prefix = '<leader>or' },
12 - -- Sort text
13 - sort = { prefix = '<leader>os' }
14 - }
15 -end)

neovim/lua/bugabinga/restore_cursor_position.lua

Deleted
deleted file mode 100644
1 --- Stolen from mini.misc plugin at https://github.com/echasnovski/mini.misc
3 -local ignored = require 'std.ignored'
4 -local auto = require 'std.auto'
6 -local restore_cursor = function ()
7 - -- Stop if not a normal buffer
8 - if vim.bo.buftype ~= '' then return end
10 - -- Stop if filetype is ignored
11 - if vim.tbl_contains( ignored.filetypes, vim.bo.filetype ) then return end
13 - -- Stop if line is already specified (like during start with `nvim file +num`)
14 - local cursor_line = vim.api.nvim_win_get_cursor( 0 )[1]
15 - if cursor_line > 1 then return end
17 - -- Stop if can't restore proper line for some reason
18 - local mark_line = vim.api.nvim_buf_get_mark( 0, [["]] )[1]
19 - local n_lines = vim.api.nvim_buf_line_count( 0 )
20 - if not (1 <= mark_line and mark_line <= n_lines) then return end
22 - -- Restore cursor and open just enough folds
23 - vim.cmd [[normal! g`"zv]]
24 -end
26 --- Create autocommand which runs once on `FileType` for every new buffer
27 -auto 'restore_cursor_position_setup' {
28 - description = 'Setup function to restore cursor position',
29 - events = 'BufReadPre',
30 - command = function ( data )
31 - auto 'restore_cursor_position' {
32 - description = 'Restores last known cursor position when opening a buffer.',
33 - event = 'FileType',
34 - buffer = data.buf,
35 - once = true,
36 - command = restore_cursor,
37 - }
38 - end,
39 -}

neovim/lua/bugabinga/save_actions.lua

Deleted
deleted file mode 100644
1 -local map = require 'std.map'
2 -local localrc = require 'std.localrc'
3 -local user_command = require 'std.user_command'
5 -local global_actions = vim.g.save_actions or {}
6 -local project_local_actions = localrc( '.save.actions.lua', 'table' ) or {}
7 -local all_actions = vim.tbl_deep_extend( 'force', global_actions, project_local_actions )
9 -local apply_save_actions = function ()
10 - vim.iter( all_actions ):each(
11 - function ( action )
12 - vim.validate {
13 - action = { action, 'string' },
14 - }
15 - local parsed_command = vim.api.nvim_parse_cmd( action, {} )
16 - ---@diagnostic disable-next-line: param-type-mismatch
17 - vim.api.nvim_cmd( parsed_command, { output = true } )
18 - end
19 - )
21 - --save all
22 - vim.cmd [[wa]]
23 -end
25 -user_command.SaveActions 'Execute all declared save actions' ( apply_save_actions )
27 -map.normal {
28 - description = 'Save all buffers and apply save actions',
29 - category = 'actions',
30 - keys = '<c-s>',
31 - command = '<cmd>SaveActions<cr>',
32 -}

neovim/lua/bugabinga/statusbar.lua

Deleted
deleted file mode 100644
1 -local puk = require 'std.puk'
2 -local icon = require 'std.icon'
3 -local auto = require 'std.auto'
4 -local ignored = require 'std.ignored'
6 -local NEW_FILE = '~untitled~'
8 -local heirline = puk 'heirline'
9 -local conditions = require 'heirline.conditions'
10 -local utils = require 'heirline.utils'
12 -local nugu = require 'bugabinga.nugu.palette'
13 -heirline.load_colors( nugu )
15 -auto 'reload_heirline_colors' {
16 - description = 'Reload dark/light nugu colors for Heirline',
17 - events = 'ColorScheme',
18 - command = function ()
19 - utils.on_colorscheme( nugu )
20 - end,
23 -local vi_mode = {
24 - init = function ( self )
25 - self.mode = vim.fn.mode( 1 ) -- :h mode()
26 - end,
28 - static = {
29 - mode_names = {
30 - n = icon.normal,
31 - no = icon.normal .. '?',
32 - nov = icon.normal .. '?',
33 - noV = icon.normal .. '?',
34 - ['no\22'] = icon.normal .. '?',
35 - niI = icon.normal .. 'i',
36 - niR = icon.normal .. 'r',
37 - niV = icon.normal .. 'v',
38 - nt = icon.normal .. 't',
39 - v = icon.visual,
40 - vs = icon.visual .. 's',
41 - V = icon.visual .. '_',
42 - Vs = icon.visual .. 's',
43 - ['\22'] = '^' .. icon.visual,
44 - ['\22s'] = '^' .. icon.visual,
45 - s = icon.select,
46 - S = icon.select .. '_',
47 - ['\19'] = '^' .. icon.select,
48 - i = icon.insert,
49 - ic = icon.insert .. 'c',
50 - ix = icon.insert .. 'x',
51 - R = icon.replace,
52 - Rc = icon.replace .. 'c',
53 - Rx = icon.replace .. 'x',
54 - Rv = icon.replace .. 'v',
55 - Rvc = icon.replace .. 'v',
56 - Rvx = icon.replace .. 'v',
57 - c = icon.command,
58 - cv = icon.command .. 'x',
59 - r = icon.pending,
60 - rm = icon.pending .. 'm',
61 - ['r?'] = icon.pending .. '?',
62 - ['!'] = icon.exclaim,
63 - t = icon.terminal,
64 - },
65 - mode_colors = {
66 - n = 'ui_normal',
67 - i = 'ui_accent',
68 - v = 'ui_important_global',
69 - V = 'ui_important_global',
70 - ['\22'] = 'ui_important_global',
71 - c = 'ui_important_global',
72 - s = 'ui_important_global',
73 - S = 'ui_important_global',
74 - ['\19'] = 'ui_important_global',
75 - R = 'ui_important_global',
76 - r = 'ui_important_global',
77 - ['!'] = 'ui_important_global',
78 - t = 'ui_important_global',
79 - },
80 - },
82 - provider = function ( self )
83 - local mode_name = self.mode_names[self.mode]
84 - return ' ' .. icon.vim .. ' %3(' .. mode_name .. '%) '
85 - end,
87 - hl = function ( self )
88 - local mode = self.mode:sub( 1, 1 ) -- get only the first mode character
89 - return { fg = self.mode_colors[mode], bold = true }
90 - end,
92 - update = {
93 - 'ModeChanged',
94 - pattern = '*:*',
95 - callback = vim.schedule_wrap( function ()
96 - vim.cmd.redrawstatus()
97 - end ),
98 - },
101 -local file_icon = {
102 - init = function ( self )
103 - local filename = self.filename
104 - local extension = vim.fn.fnamemodify( filename, ':e' )
105 - self.icon = MiniIcons.get( 'file', filename )
106 - end,
107 - provider = function ( self )
108 - return self.icon and (self.icon .. ' ')
109 - end,
110 - hl = 'DefaultIcon',
113 -local file_name = {
114 - init = function ( self )
115 - self.lfilename = vim.fs.normalize( vim.fn.fnamemodify( self.filename, ':.' ) )
116 - if self.lfilename == '' then
117 - self.lfilename = NEW_FILE
118 - end
119 - end,
121 - flexible = 2,
123 - {
124 - provider = function ( self )
125 - return self.lfilename
126 - end,
127 - },
128 - {
129 - provider = function ( self )
130 - return vim.fs.normalize( vim.fn.pathshorten( self.lfilename ) )
131 - end,
132 - },
135 -local file_flags = {
136 - {
137 - condition = function ()
138 - return vim.bo.modified
139 - end,
140 - provider = string.format( ' %s ', icon.modified ),
141 - hl = 'Comment',
142 - },
143 - {
144 - condition = function ()
145 - return not vim.bo.modifiable or vim.bo.readonly
146 - end,
147 - provider = string.format( ' %s ', icon.lock ),
148 - hl = 'ErrorMsg',
149 - },
152 -local file_name_block = {
153 - init = function ( self )
154 - self.filename = vim.fs.normalize( vim.api.nvim_buf_get_name( 0 ) )
155 - end,
157 - file_icon,
158 - { provider = ' ' },
159 - file_name,
160 - file_flags,
161 - { provider = '%<' }, -- this means that the statusline is cut here when there's not enough space
164 -local file_type = {
165 - provider = function ()
166 - return icon.file .. ' ' .. string.lower( vim.bo.filetype )
167 - end,
170 -local file_encoding = {
171 - provider = function ()
172 - local enc = (vim.bo.fenc ~= '' and vim.bo.fenc) or vim.o.enc -- :h 'enc'
173 - return enc ~= 'utf-8' and enc:upper()
174 - end,
177 -local file_format = {
178 - static = {
179 - dos = icon.newline .. icon.carriage_return,
180 - unix = icon.newline,
181 - mac = icon.carriage_return,
182 - },
183 - provider = function ( self )
184 - local fileformat = vim.bo.fileformat
185 - return self[fileformat]
186 - end,
189 -local file_size = {
190 - provider = function ()
191 - -- stackoverflow, compute human readable file size
192 - -- i want to see vim opening a 1EiB file 󰱯
193 - local suffix = { 'b', 'k', 'M', 'G', 'T', 'P', 'E' }
194 - local fsize = vim.fn.getfsize( vim.api.nvim_buf_get_name( 0 ) )
195 - fsize = (fsize < 0 and 0) or fsize
196 - if fsize < 1024 then
197 - return fsize .. suffix[1]
198 - end
199 - local i = math.floor( (math.log( fsize ) / math.log( 1024 )) )
200 - return string.format( '%.2g%s', fsize / math.pow( 1024, i ), suffix[i + 1] )
201 - end,
204 -local file_last_modified = {
205 - provider = function ()
206 - local ftime = vim.fn.getftime( vim.api.nvim_buf_get_name( 0 ) )
207 - if ftime > 0 then
208 - local timeago = require 'std.timeago'
209 - return timeago.format( ftime )
210 - end
211 - end,
214 -local lsp_active = {
215 - condition = conditions.lsp_attached,
216 - update = { 'LspAttach', 'LspDetach', 'BufEnter', 'BufLeave' },
218 - provider = function ()
219 - local names = {}
220 - for _, client in pairs( vim.lsp.get_clients { bufnr = 0 } ) do
221 - table.insert( names, client.name )
222 - end
223 - return icon.lsp .. ' ' .. table.concat( names, ' ' )
224 - end,
227 -local diagnostic = {
228 - condition = conditions.has_diagnostics,
230 - static = {
231 - error_icon = icon.error,
232 - warn_icon = icon.warn,
233 - info_icon = icon.info,
234 - hint_icon = icon.hint,
235 - },
237 - init = function ( self )
238 - self.errors = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.ERROR } )
239 - self.warnings = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.WARN } )
240 - self.hints = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.HINT } )
241 - self.info = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.INFO } )
242 - end,
244 - update = { 'DiagnosticChanged', 'BufEnter', 'BufLeave' },
246 - {
247 - provider = function ( self )
248 - -- 0 is just another output, we can decide to print it or not!
249 - return self.errors > 0 and (self.error_icon .. ' ' .. self.errors .. ' ')
250 - end,
251 - hl = 'DiagnosticError',
252 - },
253 - {
254 - provider = function ( self )
255 - return self.warnings > 0 and (self.warn_icon .. ' ' .. self.warnings .. ' ')
256 - end,
257 - hl = 'DiagnosticWarn',
258 - },
259 - {
260 - provider = function ( self )
261 - return self.info > 0 and (self.info_icon .. ' ' .. self.info .. ' ')
262 - end,
263 - hl = 'DiagnosticInfo',
264 - },
265 - {
266 - provider = function ( self )
267 - return self.hints > 0 and (self.hint_icon .. ' ' .. self.hints)
268 - end,
269 - hl = 'DiagnosticHint',
270 - },
273 -local is_svn_repo = function ()
274 - local svn_dir = vim.fs.find( '.svn', {
275 - upward = true,
276 - stop = vim.uv.os_homedir(),
277 - path = vim.fs.dirname( vim.api.nvim_buf_get_name( 0 ) ),
278 - type = 'directory',
279 - } )
281 - return not vim.tbl_isempty( svn_dir )
282 -end
284 -local svn_get_relative_url = function ()
285 - local result = vim.system { 'svn', 'info', '--show-item', 'relative-url', '--no-newline' }:wait()
286 - if result.code == 0 then
287 - return result.stdout
288 - else
289 - return result.stderr
290 - end
291 -end
293 -local svn = {
294 - condition = is_svn_repo,
296 - update = 'BufEnter',
298 - init = function ( self )
299 - self.relative_url = svn_get_relative_url()
300 - end,
302 - {
303 - provider = function ( self )
304 - return icon.subversion .. ' ' .. icon.branch .. ' ' .. self.relative_url
305 - end,
306 - },
309 -local git = {
310 - condition = conditions.is_git_repo,
312 - init = function ( self )
313 - self.status_dict = vim.b.minidiff_summary
314 - end,
316 - {
317 - provider = function ( self )
318 - return icon.git .. ' ' .. icon.branch .. ' ' .. self.status_dict.source_name .. ' '
319 - end,
320 - },
321 - {
322 - provider = function ( self )
323 - local count = self.status_dict.add or 0
324 - return count > 0 and (icon.diff_add .. ' ' .. count .. ' ')
325 - end,
326 - hl = 'DiffAdd',
327 - },
328 - {
329 - provider = function ( self )
330 - local count = self.status_dict.delete or 0
331 - return count > 0 and (icon.diff_remove .. ' ' .. count .. ' ')
332 - end,
333 - hl = 'DiffDelete',
334 - },
335 - {
336 - provider = function ( self )
337 - local count = self.status_dict.change or 0
338 - return count > 0 and (icon.diff_change .. ' ' .. count .. ' ')
339 - end,
340 - hl = 'DiffChange',
341 - },
344 -local work_dir = {
345 - init = function ( self )
346 - self.icon = (vim.fn.haslocaldir( 0 ) == 1 and icon['local'] or '') .. ' ' .. icon.global .. ' '
347 - self.cwd = vim.fs.normalize( vim.uv.cwd() ):gsub( vim.fs.normalize( vim.uv.os_homedir() ), '~' )
348 - end,
350 - flexible = 1,
352 - {
353 - provider = function ( self )
354 - return self.icon .. self.cwd
355 - end,
356 - },
357 - {
358 - provider = function ( self )
359 - local cwd = vim.fn.pathshorten( self.cwd )
360 - return self.icon .. cwd
361 - end,
362 - },
363 - {
364 - provider = '',
365 - },
368 -local help_file_name = {
369 - condition = function ()
370 - return vim.bo.filetype == 'help'
371 - end,
372 - provider = function ()
373 - local filename = vim.api.nvim_buf_get_name( 0 )
374 - return vim.fn.fnamemodify( filename, ':t' )
375 - end,
376 - hl = 'Question',
379 -local terminal_name = {
380 - provider = function ()
381 - local name, _ = vim.api.nvim_buf_get_name( 0 ):gsub( '.*:', '' )
382 - local basename = vim.fs.basename( name )
383 - return icon.terminal .. ' ' .. (basename or 'noname')
384 - end,
385 - hl = 'Bold',
388 -local macro_recording = {
389 - condition = function ()
390 - return vim.fn.reg_recording() ~= '' and vim.o.cmdheight == 0
391 - end,
392 - provider = icon.macro .. ' ',
393 - hl = 'PreProc',
394 - utils.surround( { '░▒▓ ', ' ▓▒░' }, nil, {
395 - provider = function ()
396 - return vim.fn.reg_recording()
397 - end,
398 - hl = 'Bold',
399 - } ),
400 - update = {
401 - 'RecordingEnter',
402 - 'RecordingLeave',
403 - },
406 -local align = { provider = '%=' }
407 -local space = { provider = ' ' }
409 -local default_statusline = {
410 - vi_mode,
411 - macro_recording,
412 - work_dir,
413 - space,
414 - git,
415 - svn,
416 - align,
417 - diagnostic,
418 - align,
419 - space,
420 - space,
421 - lsp_active,
422 - space,
423 - file_encoding,
424 - space,
425 - file_format,
426 - space,
427 - file_type,
428 - space,
429 - file_size,
430 - space,
431 - file_last_modified,
434 -local special_statusline = {
435 - condition = function ()
436 - return conditions.buffer_matches {
437 - buftype = ignored.buftypes,
438 - filetype = ignored.filetypes,
439 - }
440 - end,
442 - file_type,
443 - space,
444 - help_file_name,
445 - align,
448 -local terminal_statusline = {
450 - condition = function ()
451 - return conditions.buffer_matches { buftype = { 'terminal' } }
452 - end,
454 - { condition = conditions.is_active, vi_mode, space },
455 - file_type,
456 - space,
457 - terminal_name,
458 - align,
461 -local inactive_statusline = {
462 - condition = conditions.is_not_active,
463 - file_type,
464 - space,
465 - file_name,
466 - align,
469 -local statuslines = {
470 - hl = function ()
471 - if conditions.is_active() then
472 - return 'StatusLine'
473 - else
474 - return 'StatusLineNC'
475 - end
476 - end,
478 - fallthrough = false,
480 - special_statusline,
481 - terminal_statusline,
482 - inactive_statusline,
483 - default_statusline,
486 -local winbars = {
487 - hl = function ()
488 - if conditions.is_active() then
489 - return 'Winbar'
490 - else
491 - return 'WinbarNC'
492 - end
493 - end,
495 - fallthrough = false,
497 - {
498 - condition = function ()
499 - return conditions.buffer_matches { buftype = { 'terminal' } }
500 - end,
502 - space,
503 - file_type,
504 - space,
505 - terminal_name,
506 - },
508 - {
509 - file_name_block,
510 - },
513 -local tabpage = {
514 - provider = function ( self )
515 - return '%' .. self.tabnr .. 'T ' .. self.tabpage .. ' %T'
516 - end,
517 - hl = function ( self )
518 - if self.is_active then
519 - return 'TabLineSel'
520 - else
521 - return 'TabLine'
522 - end
523 - end,
526 -local tab_pages = {
527 - { provider = '%=' },
528 - utils.make_tablist( tabpage ),
531 -heirline.setup {
532 - statusline = statuslines,
533 - winbar = winbars,
534 - tabline = tab_pages,
536 - opts = {
537 - colors = nugu,
538 - disable_winbar_cb = function ( args )
539 - return conditions.buffer_matches( {
540 - buftype = ignored.buftypes,
541 - filetype = ignored.filetypes,
542 - }, args.buf )
543 - end,
544 - },

neovim/lua/bugabinga/textobjects.lua

Modified
14 14 ['aa'] = { query = '@parameter.outer', description = 'outer parameter' },
15 15 ['ia'] = { query = '@parameter.inner', description = 'inner parameter' },
17 - ['ac'] = { query = '@comment.outer', description = 'outer comment' },
18 - ['ic'] = { query = '@comment.inner', description = 'inner comment' },
20 17 ['al'] = { query = '@loop.outer', description = 'outer loop' },
21 18 ['il'] = { query = '@loop.inner', description = 'inner loop' },
26 23 ['as'] = { query = '@statement.outer', description = 'outer statement' },
27 24 ['is'] = { query = '@statement.inner', description = 'inner statement' },
29 - ['aT'] = { query = '@class.outer', description = 'outer class' },
30 - ['iT'] = { query = '@class.inner', description = 'inner class' },
26 + ['ac'] = { query = '@class.outer', description = 'outer class' },
27 + ['ic'] = { query = '@class.inner', description = 'inner class' },
33 30 for keys, maps in pairs(textobject_select_keymaps) do

neovim/lua/bugabinga/tree_explorer.lua

Deleted
deleted file mode 100644
1 -local puk = require 'std.puk'

neovim/lua/std/auto.lua

Modified
1 1 --- Wrapper over `vim.api.nvim_create_autocmd` for automatic grouping and idempotency.
2 2 --- @param group_name string name of the group of autocommands to define
3 3 --- @return function a function to add new autocommands to the defined group
4 -return function ( group_name )
5 - local group = vim.api.nvim_create_augroup( group_name, { clear = true, } )
4 +return function(group_name)
5 + local group = vim.api.nvim_create_augroup(group_name, { clear = true, })
6 6 --- adds new autocommands to the outer group
7 7 --- @param list_of_autocommands table a single autocommand definition, or a list of those.
8 - return function ( list_of_autocommands )
8 + return function(list_of_autocommands)
9 9 if list_of_autocommands.events then
10 10 list_of_autocommands = { list_of_autocommands, }
12 - for _, autocommand in pairs( list_of_autocommands ) do
12 + for _, autocommand in ipairs(list_of_autocommands) do
13 13 vim.validate {
14 - ['autocommand.command'] = {autocommand.events, {'string', 'table'} },
15 - ['autocommand.command'] = {autocommand.command, { 'string', 'function'}, true},
16 - ['autocommand.callback'] = {autocommand.callback, 'function', true},
17 - ['autocommand.command'] = {autocommand.description, 'string', true},
18 - ['autocommand.command'] = {autocommand.buffer, 'number', true},
19 - ['autocommand.command'] = {autocommand.once, 'boolean', true},
20 - ['autocommand.command'] = {autocommand.pattern, {'string', 'table'}, true},
21 - }
14 + ['autocommand.events'] = { autocommand.events, { 'string', 'table' } },
15 + ['autocommand.command'] = { autocommand.command, { 'string', 'function' }, true },
16 + ['autocommand.callback'] = { autocommand.callback, 'function', true },
17 + ['autocommand.description'] = { autocommand.description, 'string', true },
18 + ['autocommand.buffer'] = { autocommand.buffer, 'number', true },
19 + ['autocommand.once'] = { autocommand.once, 'boolean', true },
20 + ['autocommand.pattern'] = { autocommand.pattern, { 'string', 'table' }, true },
21 + }
22 22 -- command and callback are mutually exclusive.
23 23 -- one of them has to be nil
24 24 local command = nil
25 25 local callback = nil
26 - if type( autocommand.command ) == 'function' then
26 + if type(autocommand.command) == 'function' then
27 27 callback = autocommand.command
28 28 else
29 29 command = autocommand.command
31 - vim.api.nvim_create_autocmd( autocommand.events, {
31 + vim.api.nvim_create_autocmd(autocommand.events, {
32 32 desc = autocommand.description,
33 33 group = group,
34 34 buffer = autocommand.buffer,
36 36 once = autocommand.once,
37 37 command = command,
38 38 callback = callback,
39 - } )
39 + })

neovim/lua/std/rename.lua

Modified
15 15 local clients = vim.lsp.get_clients()
16 16 for _, client in ipairs(clients) do
17 - if client.supports_method("workspace/willRenameFiles") then
18 - local resp = client.request_sync("workspace/willRenameFiles", changes, 1000, 0)
17 + if client:supports_method("workspace/willRenameFiles") then
18 + local resp = client:request_sync("workspace/willRenameFiles", changes, 1000, 0)
19 19 if resp and resp.result ~= nil then
20 20 vim.lsp.util.apply_workspace_edit(resp.result, client.offset_encoding)
29 29 for _, client in ipairs(clients) do
30 - if client.supports_method("workspace/didRenameFiles") then
31 - client.notify("workspace/didRenameFiles", changes)
30 + if client:supports_method("workspace/didRenameFiles") then
31 + client:notify("workspace/didRenameFiles", changes)

neovim/lua/std/table/init.lua

Modified
3 3 --- Facade over various table functions in lua, neovim and some of my own.
4 4 return {
5 5 deep_copy = require 'std.table.deep_copy',
6 6 join = require 'std.table.join',
8 - add_reverse_lookup = vim.tbl_add_reverse_lookup,
9 8 contains = vim.tbl_contains,
10 9 count = vim.tbl_count,
11 10 deep_extend = vim.tbl_deep_extend,
12 11 extend = vim.tbl_extend,
13 12 filter = vim.tbl_filter,
14 - flatten = vim.tbl_flatten,
15 13 get = vim.tbl_get,
16 14 is_array = vim.tbl_isarray,
17 15 is_empty = vim.tbl_isempty,
18 - is_list = vim.tbl_islist,
19 16 keys = vim.tbl_keys,
20 17 map = vim.tbl_map,
21 18 values = vim.tbl_values,

neovim/puk.plugins.nuon

Modified
12 12 github,
13 13 nvim-treesitter/nvim-treesitter,
14 14 main,
15 - "27b0bd487c4a1c72c9b53d0ca6f67f0ac6956b0a",
15 + "0d32ec3c3efd1c26daa47796287e31fdd3307148",
17 17 nvim,
18 18 --headless,
28 28 github,
29 29 nvim-treesitter/nvim-treesitter-textobjects,
30 30 main,
31 - "fa32a45fdbab9c9c3bda9ecec9b12dddb221b927",
31 + "b54cec389e98c5b0babbe618773acec927437cab",
44 44 github,
45 45 "stevearc/oil.nvim",
46 46 master,
47 - "5b6068aad7d2057dd399fac73b7fb2cdf23ccd6e",
47 + "bbad9a76b2617ce1221d49619e4e4b659b3c61fc",
60 60 github,
61 61 "stevearc/conform.nvim",
62 62 master,
63 - "6feb2f28f9a9385e401857b21eeac3c1b66dd628",
64 - null
65 - ],
66 - [
67 - heirline,
68 - github,
69 - "rebelot/heirline.nvim",
70 - master,
71 - "fae936abb5e0345b85c3a03ecf38525b0828b992",
63 + "973f3cb73887d510321653044791d7937c7ec0fa",
84 76 github,
85 77 "echasnovski/mini.notify",
86 78 main,
87 - "3a06b21dd0b335b95d125eae813276113b5e9ce7",
79 + "9996951977b503b8c9572a0bdb2c516f099701f9",
92 84 github,
93 85 "echasnovski/mini.splitjoin",
94 86 main,
95 - "70240d5d3881ff1b2b1d7902450f98a6fa303800",
87 + "ebde0e2a33ec983ade3b2bb3c495b3751b458e4c",
100 92 github,
101 93 "echasnovski/mini.pick",
102 94 main,
103 - "c272dc61cd0326b344761cd9d031bfcdef1978c7",
95 + "ebe3dacb352bb054607e5ed0fd461e2251a7a280",
108 100 github,
109 101 "echasnovski/mini.extra",
111 - "69ba107ac8712820f3ad391d327f62b57fead277",
103 + "564f26a928295bc6bfebabe894d2656222b7eee0",
116 108 github,
117 109 "echasnovski/mini.hipatterns",
119 - "e5083df391171dc9d8172645606f8496d9443374",
111 + "d71c21167d6bd5f21c9ecf90912c510f9edfc02b",
124 116 github,
125 117 "echasnovski/mini.clue",
127 - "97198ef9d8425e69f74d2875e217440ba0ff1730",
119 + "9d3001a921809f951e4fed04e0b0275bec778d6c",
132 124 github,
133 125 "echasnovski/mini.bracketed",
135 - "079b8375e40ebf3f8af319ad835263ff390c3965",
127 + "a54a2a180dc40f4d85875eeafacbdf991d042a36",
140 132 github,
141 133 "echasnovski/mini.diff",
143 - "f7bcd3cb4561f7d3a02ae9afafeda899c82f7108",
135 + "63a7ce537ced356b8180892d9586826b0afb519c",
148 140 github,
149 141 "echasnovski/mini.jump2d",
151 - "6045bd61659d97926ba7ae5f9be8924e11c15079",
143 + "4de9b6849fbaaf3e3f1440096524e6bb19da9c4b",
155 - "mini.operators",
156 - github,
157 - "echasnovski/mini.operators",
158 - main,
159 - "b79a95958c57e127704bbeb1dc11a511954fc888",
160 - null
161 - ],
162 - [
163 - "mini.surround",
147 + "mini.surround",
164 148 github,
165 149 "echasnovski/mini.splitjoin",
167 - "70240d5d3881ff1b2b1d7902450f98a6fa303800",
151 + "ebde0e2a33ec983ade3b2bb3c495b3751b458e4c",
172 156 github,
173 157 "echasnovski/mini.move",
175 - "4fe4a855fee53c66b0f3255a4b54ddc2ae6b308c",
159 + "f471ecb98395781827ef1dffee61afe1af0ace29",
180 164 github,
181 165 "echasnovski/mini.icons",
183 - "397ed3807e96b59709ef3292f0a3e253d5c1dc0a",
167 + "94848dad1589a199f876539bd79befb0c5e3abf0",
188 172 github,
189 173 windwp/nvim-autopairs,
190 174 master,
191 - "4d74e75913832866aa7de35e4202463ddf6efd1b",
175 + "23320e75953ac82e559c610bec5a90d9c6dfa743",
199 183 "b42a5ccec7457b44e89f7ed3b3afb1b375bb2093",
202 - [
203 - lint,
204 - github,
205 - mfussenegger/nvim-lint,
206 - master,
207 - "b47cbb249351873e3a571751c3fb66ed6369852f",
208 - null
209 - ],
211 187 virt-column,
212 188 github,
228 204 github,
229 205 "DNLHC/glance.nvim",
230 206 master,
231 - "1649b772a7216bfd55125c627e100d065ddf3de9",
207 + "bf86d8b79dce808e65fdb6e9269d0b4ed6d2eefc",
244 220 github,
245 221 chrisgrieser/nvim-rulebook,
247 - "b1aa87e80ba44e3346094be2f816f3f8fad2dd49",
223 + "923b65bc6830fd2684ac6322ab1558f77eda0d2c",
268 244 github,
269 245 "rachartier/tiny-inline-diagnostic.nvim",
271 - "b6ed8038dfd256eb963a2c79cb30f0f4683551a0",
247 + "7c1595733366d25ddd3a6785cf6327e2e460bae9",
276 252 github,
277 253 "MagicDuck/grug-far.nvim",
279 - "6fd719634c529bfbfe031a03b7af9d728d849dc7",
255 + "b3f9412b1ed76f14cfc68e1ee899873544330c80",
284 260 github,
285 261 mfussenegger/nvim-jdtls,
286 262 master,
287 - "c23f200fee469a415c77265ca55b496feb646992",
263 + "4d77ff02063cf88963d5cf10683ab1fd15d072de",
292 268 github,
293 269 windwp/nvim-autopairs,
294 270 master,
295 - "4d74e75913832866aa7de35e4202463ddf6efd1b",
271 + "23320e75953ac82e559c610bec5a90d9c6dfa743",
307 - hlchunk,
308 - github,
309 - shellRaining/hlchunk.nvim,
310 - main,
311 - "474ec5d0f220158afa83aaefab32402e710d3032",
312 - null
313 - ],
314 - [
315 - image,
316 - github,
317 - 3rd/image.nvim,
318 - master,
319 - "4c51d6202628b3b51e368152c053c3fb5c5f76f2",
320 - null
321 - ],
322 - [
323 - diagram,
324 - github,
325 - 3rd/diagram.nvim,
326 - master,
327 - "84fe677aa940605ef248f36c0ea23561690c95eb",
328 - null
329 - ]
283 + hlchunk,
284 + github,
285 + "shellRaining/hlchunk.nvim",
286 + main,
287 + "474ec5d0f220158afa83aaefab32402e710d3032",
288 + null
289 + ],
291 + image,
292 + github,
293 + "3rd/image.nvim",
294 + master,
295 + "4c51d6202628b3b51e368152c053c3fb5c5f76f2",
296 + null
297 + ],
299 + diagram,
300 + github,
301 + "3rd/diagram.nvim",
302 + master,
303 + "84fe677aa940605ef248f36c0ea23561690c95eb",
304 + null

wezterm/bugabinga/launch.lua

Modified
4 4 local wez = require 'wezterm'
6 6 return function ( cfg )
7 7 cfg.launch_menu = {
9 9 label = 'Anime (new)',
10 - args = { 'ani-cli', '--skip', },
10 + args = { 'ani-cli', },
11 11 cwd = wez.home_dir,
14 14 label = 'Anime (continue)',
15 - args = { 'ani-cli', '--skip', '--continue', },
15 + args = { 'ani-cli', '--continue', },
16 16 cwd = wez.home_dir,