repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

Merge branch 'trunk' of github.com:bugabinga/dotfiles into trunk

2e342045326202988a6c9af193144409a1d9f670

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (10)

+189 / −157 text lines

Diff layout

neovim/init.lua

Modified

+22 / −11 text lines

99-- ▀ ▀
1111-- Setup debug mode
12vim.g.bugabinga_debug_mode = false
12vim.g.bugabinga_debug_mode = true
13-- start `profiler.nvim` with `NVIM_PROFILE=1 nvim ...`
14-- or `NVIM_PROFILE=start nvim ...`
15-- then hit <F12> to save profile.
16-- inspect profile on https://ui.perfetto.dev
17require 'bugabinga.profile'
14local start_time = vim.uv.hrtime()
19local start_time = vim.uv.hrtime() ---@diagnostic disable-line: undefined-field
1520local auto = require 'std.auto'
1621auto 'measure_startup_time' {
1722 events = 'VimEnter',
1823 description = 'Measure startup time of neovim.',
1924 once = true,
20 command = function()
21 local end_time = vim.uv.hrtime()
25 command = function ()
26 local end_time = vim.uv.hrtime() ---@diagnostic disable-line: undefined-field
2227 local time_elapsed = end_time - start_time
23 vim.notify(string.format('Neovim started in (%d ms).', time_elapsed / 1e6),
24 vim.log.levels.INFO)
28 vim.notify( string.format( 'Neovim started in (%d ms).', time_elapsed / 1e6 ),
29 vim.log.levels.INFO )
2530 end,
3035require 'patches'
37--[[ MY STUFF ]] --
3238require 'bugabinga.options'
3339require 'bugabinga.sessions'
3440require 'bugabinga.treesitter'
3541require 'bugabinga.bigfile'
36require 'bugabinga.neovim_devel'
37require 'bugabinga.lsp'
3842require 'bugabinga.editorconfig'
3943require 'bugabinga.save_actions'
40require 'bugabinga.diagnostic'
41require 'bugabinga.in_and_out'
42require 'bugabinga.mkdir'
44vim.schedule( function ()
45 require 'bugabinga.in_and_out'
46 require 'bugabinga.mkdir'
47 require 'bugabinga.diagnostic'
48 -- FIXME why does LSP not start, when scheduled?
49 require 'bugabinga.lsp'
50end )
52--[[ PLUGINS ]] --
53require 'bugabinga.neovim_devel'
4454require 'bugabinga.file_explorer'
4555require 'bugabinga.virtual_column'
4656require 'bugabinga.align'
5262require 'bugabinga.format'
5363require 'bugabinga.jump2d'
5464require 'bugabinga.lint'
65require 'bugabinga.search_and_replace'
5566require 'bugabinga.move'
5667require 'bugabinga.navigation'
5768require 'bugabinga.notifications'

neovim/lua/bugabinga/incubator.lua

Modified

+20 / −8 text lines

1414--- does not yet restore well with session
1515--- cannot navigate with C-w inside the DocsView
1616--- it has a manual update mode, but which key to bind it to?
17puk.defer 'docs-view' (function(docsview)
17puk.defer 'docs-view' ( function ( docsview )
1818 docsview.setup {
1919 position = 'right',
2020 width = 42,
2424 keys = '<leader>tk',
2525 command = '<cmd>DocsViewToggle<cr>',
2626 }
27end)
27end )
2828-------------------------------------------------------------------------------
2929--- this is pretty great! i just need better binds and tell which key about them
30puk.defer 'rulebook' (function(rulebook)
30puk.defer 'rulebook' ( function ( rulebook )
3131 rulebook.setup()
3232 map.normal {
3333 description = 'ignore rule',
5353 keys = '<leader>rf',
5454 command = rulebook.suppressFormatter,
5555 }
56end)
56end )
5757-------------------------------------------------------------------------------
5858--- this plugin has some sick visual text formatting chops. check them out some time.
59puk.defer 'symbol-usage' (function(symbolusage)
59puk.defer 'symbol-usage' ( function ( symbolusage )
6060 symbolusage.setup {
6161 hi = { link = 'LineNr' },
6262 vt_position = 'end_of_line',
6666 },
6767 log = { enabled = dbg.get() },
6868 }
69end)
69end )
7070-------------------------------------------------------------------------------
7171--- Pretty NICE!
7272--- fix highlights to match nugu.
73puk.defer 'glance' (function(glance)
73puk.defer 'glance' ( function ( glance )
7474 glance.setup()
7575 map.normal {
7676 description = 'peek definitions',
9595 keys = 'grpi',
9696 command = '<cmd>Glance implementations<cr>',
9797 }
98end)
98end )
99-------------------------------------------------------------------------------
100puk.defer 'tiny-inline-diagnostic' ( function ( tiny )
101 tiny.setup {
102 options = {
103 -- Show the source of the diagnostic.
104 show_source = true,
106 -- Use your defined signs in the diagnostic config table.
107 use_icons_from_diagnostic = true,
108 },
109 }
110end )
99111-------------------------------------------------------------------------------

neovim/lua/bugabinga/patterns.lua

Modified

+3 / −3 text lines

11local puk = require 'std.puk'
3puk.defer 'mini.hipatterns' (function(patterns)
3puk.defer 'mini.hipatterns' ( function ( patterns )
44 patterns.setup {
55 highlighters = {
66 -- Highlight standalone 'FIXME', 'HACK', 'TODO', 'NOTE'
1212 -- Highlight hex color strings (`#rrggbb`) using that color
1313 hex_color = patterns.gen_highlighter.hex_color(),
1414 },
15 -- Delays (in ms) defining asynchronous highlighting process
15 -- Delays (in milliseconds) defining asynchronous highlighting process
1616 delay = {
1717 -- How much to wait for update after every text change
1818 text_change = 690,
2121 scroll = 420,
2222 },
2323 }
24end)
24end )

neovim/lua/bugabinga/profile.lua

Added
new file mode 100644

+30 / −0 text lines

1--- Starts `profile.nvim`, if special `NVIM_PROFILE` environment variable is set.
2--- This file intentionally does not import any other Lua files, in order to not
3--- skew the later profiling results with cached modules.
4
5local should_profile = os.getenv 'NVIM_PROFILE'
6if should_profile then
7 vim.cmd.packadd 'profile'
8 require 'profile'.instrument_autocmds()
9 if should_profile:lower():match '^start' then
10 require 'profile'.start '*'
11 else
12 require 'profile'.instrument '*'
13 end
14end
16local function toggle_profile()
17 local prof = require 'profile'
18 if prof.is_recording() then
19 prof.stop()
20 vim.ui.input( { prompt = 'Save profile to:', completion = 'file', default = 'profile.json' }, function ( filename )
21 if filename then
22 prof.export( filename )
23 vim.notify( string.format( 'Wrote %s', filename ) )
24 end
25 end )
26 else
27 prof.start '*'
28 end
29end
30vim.keymap.set( '', '<F12>', toggle_profile )

neovim/lua/bugabinga/search_and_replace.lua

Added
new file mode 100644

+15 / −0 text lines

1local puk = require 'std.puk'
2local map = require 'std.map'
3
4puk.defer 'grug-far' ( function ( grug )
5 grug.setup {}
6
7 map.normal {
8 description = 'search and replace current word',
9 category = 'find',
10 keys = '<F4>',
11 command = function () grug.open { prefills = { search = vim.fn.expand '<cword>' } } end,
12 }
13end )
15-- TODO: check grug-far README for binding in oil.nvim

neovim/lua/bugabinga/splitjoin.lua

Modified

+10 / −31 text lines

11local puk = require 'std.puk'
22local map = require 'std.map'
3local auto = require 'std.auto'
3puk.defer 'mini.splitjoin' ( function ( splitjoin )
4 splitjoin.setup()
5local treesj = puk 'treesj'
6local splitjoin = puk 'mini.splitjoin'
7
8treesj.setup {
9 use_default_keymaps = false,
10 max_join_length = 360,
11}
13splitjoin.setup {
14 -- Module mappings. Use `''` (empty string) to disable one.
15 -- Created for both Normal and Visual modes.
16 mappings = {
17 toggle = '',
18 split = '',
19 join = '',
20 },
21}
23map.normal {
24 description = 'Toggle Tree Join/Split',
25 category = 'editing',
26 keys = '<c-j>',
27 command = function()
28 local langs = require 'treesj.langs'['presets']
29 if langs[vim.bo.filetype] then
30 treesj.toggle { split = { recursive = false } }
31 else
6 map.normal {
7 description = 'Toggle Tree Join/Split',
8 category = 'editing',
9 keys = '<c-j>',
10 command = function ()
3211 splitjoin.toggle()
33 end
34 end,
35}
12 end,
13 }
14end )

neovim/lua/std/const.lua

Modified

+2 / −2 text lines

11local uname = vim.uv.os_uname()
2local win32 = vim.uv.os_uname().sysname:match 'Win' and true or false
3local wsl = vim.uv.os_uname().release:match 'WSL2' and true or false
2local win32 = uname.sysname:match 'Win' and true or false
3local wsl = uname.release:match 'WSL2' and true or false
55local os_background = function ()
66 -- Default value

neovim/puk.plugins.nuon

Modified

+24 / −24 text lines

1212 github,
1313 neovim/nvim-lspconfig,
1414 master,
15 "9f2c279cf9abe584f03bfeb37c6658d68e3ff49d",
15 "040001d85e9190a904d0e35ef5774633e14d8475",
1616 null
1717 ],
1818 [
2020 github,
2121 nvim-treesitter/nvim-treesitter,
2222 main,
23 "67e40d570e4eb3f3ded89f9378c8cb00c0df12db",
23 "df8f45c4878ce9c1fc9e2a473f790e111a160a4f",
2424 [
2525 nvim,
2626 --headless,
6060 github,
6161 "Saghen/blink.cmp",
6262 main,
63 "46eb5f3fd3dba0a3bb3d026fb2b7462f4a0656b7",
63 "07665c3caeba0acb9731a4d7135b92fb2e3e1a88",
6464 [
6565 cargo,
6666 build,
224224 github,
225225 mfussenegger/nvim-lint,
226226 master,
227 "6b46370d02cd001509a765591a3ffc481b538794",
228 null
229 ],
230 [
231 treesj,
232 github,
233 Wansmer/treesj,
234 main,
235 "94f6df623f2d15630b1b617abff39962024cb501",
227 "1fea92f1d9908eaa5eb8bafe08b4293d7aadaa55",
236228 null
237229 ],
238230 [
300292 null
301293 ],
302294 [
303 plenary,
295 profile,
304296 github,
305297 "nvim-lua/plenary.nvim",
306298 master,
307 "2d9b06177a975543726ce5c73fca176cedbffe9d",
308 null
309 ],
310 [
311 nui,
312 github,
313 "MunifTanjim/nui.nvim",
314 main,
315 "53e907ffe5eedebdca1cd503b00aa8692068ca46",
299 "d57df512bdade4c7a04a1bb6c89c8b54c5dce52a",
316300 null
317301 ],
318302 [
328312 github,
329313 rafamadriz/friendly-snippets,
330314 main,
331 "efff286dd74c22f731cdec26a70b46e5b203c619",
315 "11d0fbd6fff6f4e394af95319deeaab4ef88ce97",
316 null
317 ],
318 [
319 tiny-inline-diagnostic,
320 github,
321 "rachartier/tiny-inline-diagnostic.nvim",
322 main,
323 "66d9166520a0cb3392a5ef68946fd3980d57383f",
324 null
325 ],
326 [
327 grug-far,
328 github,
329 "MagicDuck/grug-far.nvim",
330 main,
331 "11d0fbd6fff6f4e394af95319deeaab4ef88ce97",
332332 null
333333 ]
334]No final newline
334]

nushell/completions/jj-completions.nu

Modified

+58 / −78 text lines

3535 --help(-h) # Print help (see more with '--help')
3636 ]
38 # Move changes from a revision into the stack of mutable revisions
39 export extern "jj absorb" [
40 --from(-f): string # Source revision to absorb from
41 --into(-t): string # Destination revisions to absorb into
42 --to: string # Destination revisions to absorb into
43 ...paths: string # Move only changes to these paths (instead of all paths)
44 --repository(-R): string # Path to repository to operate on
45 --ignore-working-copy # Don't snapshot the working copy, and don't update it
46 --ignore-immutable # Allow rewriting immutable commits
47 --at-operation: string # Operation to load the repo at
48 --at-op: string # Operation to load the repo at
49 --debug # Enable debug logging
50 --color: string # When to colorize output (always, never, debug, auto)
51 --quiet # Silence non-primary command output
52 --no-pager # Disable the pager
53 --config-toml: string # Additional configuration options (can be repeated)
54 --help(-h) # Print help (see more with '--help')
55 ]
3857 # Apply the reverse of a revision on top of another revision
3958 export extern "jj backout" [
4059 --revisions(-r): string # The revision(s) to apply the reverse of
5271 --help(-h) # Print help (see more with '--help')
5372 ]
55 # Manage bookmarks
74 # Manage bookmarks [default alias: b]
5675 export extern "jj bookmark" [
5776 --repository(-R): string # Path to repository to operate on
5877 --ignore-working-copy # Don't snapshot the working copy, and don't update it
226245 --help(-h) # Print help (see more with '--help')
227246 ]
229 # Manage bookmarks
248 # Manage bookmarks [default alias: b]
230249 export extern "jj branch" [
231250 --repository(-R): string # Path to repository to operate on
232251 --ignore-working-copy # Don't snapshot the working copy, and don't update it
417436 --help(-h) # Print help (see more with '--help')
418437 ]
420 # Create a new, empty change and edit it in the working copy (DEPRECATED, use `jj new`)
421 export extern "jj checkout" [
422 revision: string # The revision to update to
423 -r # Ignored (but lets you pass `-r` for consistency with other commands)
424 --message(-m): string # The change description to use
425 --repository(-R): string # Path to repository to operate on
426 --ignore-working-copy # Don't snapshot the working copy, and don't update it
427 --ignore-immutable # Allow rewriting immutable commits
428 --at-operation: string # Operation to load the repo at
429 --at-op: string # Operation to load the repo at
430 --debug # Enable debug logging
431 --color: string # When to colorize output (always, never, debug, auto)
432 --quiet # Silence non-primary command output
433 --no-pager # Disable the pager
434 --config-toml: string # Additional configuration options (can be repeated)
435 --help(-h) # Print help (see more with '--help')
436 ]
438439 def "nu-complete jj chmod mode" [] {
439440 [ "n" "x" ]
440441 }
891892 # Compare file contents between two revisions
892893 export extern "jj diff" [
893894 --revision(-r): string # Show changes in this revision, compared to its parent(s)
894 --from: string # Show changes from this revision
895 --to: string # Show changes to this revision
895 --from(-f): string # Show changes from this revision
896 --to(-t): string # Show changes to this revision
896897 ...paths: string # Restrict the diff to these paths
897898 --summary(-s) # For each path, show only whether it was modified, added, or deleted
898899 --stat # Show a histogram of the changes
920921 # Touch up the content changes in a revision with a diff editor
921922 export extern "jj diffedit" [
922923 --revision(-r): string # The revision to touch up
923 --from: string # Show changes from this revision
924 --to: string # Edit changes in this revision
924 --from(-f): string # Show changes from this revision
925 --to(-t): string # Edit changes in this revision
925926 --tool: string # Specify diff editor to be used
926927 --restore-descendants # Preserve the content (not the diff) when rebasing descendants
927928 --repository(-R): string # Path to repository to operate on
937938 --help(-h) # Print help (see more with '--help')
938939 ]
940 # Create a new change with the same content as an existing one
941 # Create new changes with the same content as existing ones
941942 export extern "jj duplicate" [
942 ...revisions: string # The revision(s) to duplicate
943 -r # Ignored (but lets you pass `-r` for consistency with other commands)
943 ...revisions_pos: string # The revision(s) to duplicate (default: @)
944 -r: string
945 --destination(-d): string # The revision(s) to duplicate onto (can be repeated to create a merge commit)
946 --insert-after(-A): string # The revision(s) to insert after (can be repeated to create a merge commit)
947 --after: string # The revision(s) to insert after (can be repeated to create a merge commit)
948 --insert-before(-B): string # The revision(s) to insert before (can be repeated to create a merge commit)
949 --before: string # The revision(s) to insert before (can be repeated to create a merge commit)
944950 --repository(-R): string # Path to repository to operate on
945951 --ignore-working-copy # Don't snapshot the working copy, and don't update it
946952 --ignore-immutable # Allow rewriting immutable commits
12621268 export extern "jj git push" [
12631269 --remote: string # The remote to push to (only named remotes are supported)
12641270 --bookmark(-b): string # Push only this bookmark, or bookmarks matching a pattern (can be repeated)
1265 --all # Push all bookmarks (including deleted bookmarks)
1271 --all # Push all bookmarks (including new and deleted bookmarks)
12661272 --tracked # Push all tracked bookmarks (including deleted bookmarks)
12671273 --deleted # Push all deleted bookmarks
1274 --allow-new(-N) # Allow pushing new bookmarks
12681275 --allow-empty-description # Allow pushing commits with empty descriptions
12691276 --allow-private # Allow pushing commits that are private
12701277 --revisions(-r): string # Push bookmarks pointing to these commits (can be repeated)
14531460 # Compare the changes of two commits
14541461 export extern "jj interdiff" [
1455 --from: string # Show changes from this revision
1456 --to: string # Show changes to this revision
1462 --from(-f): string # Show changes from this revision
1463 --to(-t): string # Show changes to this revision
14571464 ...paths: string # Restrict the diff to these paths
14581465 --summary(-s) # For each path, show only whether it was modified, added, or deleted
14591466 --stat # Show a histogram of the changes
15111518 --help(-h) # Print help (see more with '--help')
1514 # Merge work from multiple bookmarks (DEPRECATED, use `jj new`)
1515 export extern "jj merge" [
1516 ...revisions: string # Parent(s) of the new change
1517 -d # Ignored (but lets you pass `-d`/`-r` for consistency with other commands)
1518 --message(-m): string # The change description to use
1519 --no-edit # Do not edit the newly created change
1520 --edit # No-op flag to pair with --no-edit
1521 --insert-after(-A): string # Insert the new change after the given commit(s)
1522 --after: string # Insert the new change after the given commit(s)
1523 --insert-before(-B): string # Insert the new change before the given commit(s)
1524 --before: string # Insert the new change before the given commit(s)
1525 --repository(-R): string # Path to repository to operate on
1526 --ignore-working-copy # Don't snapshot the working copy, and don't update it
1527 --ignore-immutable # Allow rewriting immutable commits
1528 --at-operation: string # Operation to load the repo at
1529 --at-op: string # Operation to load the repo at
1530 --debug # Enable debug logging
1531 --color: string # When to colorize output (always, never, debug, auto)
1532 --quiet # Silence non-primary command output
1533 --no-pager # Disable the pager
1534 --config-toml: string # Additional configuration options (can be repeated)
1535 --help(-h) # Print help (see more with '--help')
1536 ]
1538 # Move changes from one revision into another (DEPRECATED, use `jj squash`)
1539 export extern "jj move" [
1540 --from(-f): string # Move part of this change into the destination
1541 --to(-t): string # Move part of the source into this change
1542 --interactive(-i) # Interactively choose which parts to move
1543 --tool: string # Specify diff editor to be used (implies --interactive)
1544 ...paths: string # Move only changes to these paths (instead of all paths)
1545 --repository(-R): string # Path to repository to operate on
1546 --ignore-working-copy # Don't snapshot the working copy, and don't update it
1547 --ignore-immutable # Allow rewriting immutable commits
1548 --at-operation: string # Operation to load the repo at
1549 --at-op: string # Operation to load the repo at
1550 --debug # Enable debug logging
1551 --color: string # When to colorize output (always, never, debug, auto)
1552 --quiet # Silence non-primary command output
1553 --no-pager # Disable the pager
1554 --config-toml: string # Additional configuration options (can be repeated)
1555 --help(-h) # Print help (see more with '--help')
1556 ]
15581521 # Create a new, empty change and (by default) edit it in the working copy
15591522 export extern "jj new" [
15601523 ...revisions: string # Parent(s) of the new change
16331596 export extern "jj operation diff" [
16341597 --operation: string # Show repository changes in this operation, compared to its parent
16351598 --op: string # Show repository changes in this operation, compared to its parent
1636 --from: string # Show repository changes from this operation
1637 --to: string # Show repository changes to this operation
1599 --from(-f): string # Show repository changes from this operation
1600 --to(-t): string # Show repository changes to this operation
16381601 --no-graph # Don't show the graph, show a flat list of modified changes
16391602 --patch(-p) # Show patch of modifications to changes
16401603 --summary(-s) # For each path, show only whether it was modified, added, or deleted
18431806 # Restore paths from another revision
18441807 export extern "jj restore" [
18451808 ...paths: string # Restore only these paths (instead of all paths)
1846 --from: string # Revision to restore from (source)
1847 --to: string # Revision to restore into (destination)
1809 --from(-f): string # Revision to restore from (source)
1810 --to(-t): string # Revision to restore into (destination)
18481811 --changes-in(-c): string # Undo the changes in a revision as compared to the merge of its parents
18491812 --revision(-r): string # Prints an error. DO NOT USE
18501813 --restore-descendants # Preserve the content (not the diff) when rebasing descendants
21802143 --help(-h) # Print help (see more with '--help')
2146 # Execute an external command via jj
2147 export extern "jj util exec" [
2148 command: string # External command to execute
2149 ...args: string # Arguments to pass to the external command
2150 --repository(-R): string # Path to repository to operate on
2151 --ignore-working-copy # Don't snapshot the working copy, and don't update it
2152 --ignore-immutable # Allow rewriting immutable commits
2153 --at-operation: string # Operation to load the repo at
2154 --at-op: string # Operation to load the repo at
2155 --debug # Enable debug logging
2156 --color: string # When to colorize output (always, never, debug, auto)
2157 --quiet # Silence non-primary command output
2158 --no-pager # Disable the pager
2159 --config-toml: string # Additional configuration options (can be repeated)
2160 --help(-h) # Print help (see more with '--help')
2161 ]
21832163 # Run backend-dependent garbage collection
21842164 export extern "jj util gc" [
21852165 --expire: string # Time threshold

wezterm/bugabinga/launch.lua

Modified

+5 / −0 text lines

33return function ( cfg )
44 cfg.launch_menu = {
5 {
6 label = 'Upgrade',
7 args = { 'topgrade', },
8 cwd = wez.home_dir,
9 },
510 {
611 label = 'Editor',
712 args = { 'nvim', },