repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

neovim: rescue operation for puk finished?

a2df4842e1cc2974c03832d9c80e462fd68a3630

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (64)

neovim/.lsp.settings.lua

Deleted
deleted file mode 100644
1 -local runtime_path = vim.split( package.path, ';' )
2 -table.insert( runtime_path, vim.fs.joinpath( 'lua', '?.lua' ) )
3 -table.insert( runtime_path, vim.fs.joinpath( 'lua', '?', 'init.lua' ) )
5 -return {
6 - lua_ls = {
7 - Lua = {
8 - runtime = {
9 - version = 'LuaJIT',
10 - path = runtime_path,
11 - },
12 - diagnostics = {
13 - globals = { 'vim', 'prequire' },
14 - workspaceDelay = -1,
15 - },
16 - workspace = {
17 - ignoreSubmodules = true,
18 - checkThirdParties = false,
19 - library = {
20 - unpack( vim.api.nvim_get_runtime_file( '', true ) ),
21 - },
22 - telemetry = {
23 - enable = false,
24 - },
25 - },
26 - },
27 - },
28 -}

neovim/README.md

Modified
31 31 : file type specific config
33 33 after\queries
34 -: additional treesiter queries
34 +: additional treesitter queries
51 51 * neoterm keymaps
52 52 * TODO highlights
53 53 * learn mini.operators
54 -* make highlights more visible when expanding snippets
55 -* make assignment to map.x fail, e.g. `map.normal = {}`...
56 -* check out `vim.snippet`
57 -* adapt config to respect `vim.g.nerdfont` (std.const?)
58 -* check out harper-ls
59 -* check out ast-grep
60 -* nvim spell for camel case words
61 54 * create skeleton-plugin for default file content based on file type
62 55 (BufNewFile?)
63 56 * add support for Java multi line string in autopairs
57 +* use a static treesitter config
58 +* setup LSP keybinds again

neovim/Untitled

Deleted
deleted file mode 100644

No text changes.

neovim/init.lua

Modified
1 --- A neovim configuration, again...
1 +-- A Neovim configuration, again...
3 3 -- ███ ▄ ▄▀ ██ ███ ▄█ ▄ ▄▀ ██
4 4 -- █ █ █ ▄▀ █ █ █ █ ██ █ ▄▀ █ █
8 8 -- ▀▀▀ █ █ ██ █
9 9 -- ▀ ▀
11 --- setup debug mode
11 +-- Setup debug mode
12 12 require 'std.dbg'.toggle()
14 14 local start_time = vim.uv.hrtime()
15 -local measure_startup_time = vim.api.nvim_create_augroup('measure_startup_time', { clear = true })
16 -vim.api.nvim_create_autocmd({ 'VimEnter' }, {
17 - group = measure_startup_time,
18 - desc = 'Measure startup time of neovim.',
15 +local auto = require 'std.auto'
16 +auto 'measure_startup_time' {
17 + events = 'VimEnter',
18 + description = 'Measure startup time of neovim.',
19 19 once = true,
20 - callback = function()
20 + command = function()
21 21 local end_time = vim.uv.hrtime()
22 22 local time_elapsed = end_time - start_time
23 - vim.notify(string.format('Neovim started in (%d ms).', time_elapsed / 1e6))
23 + vim.notify(string.format('Neovim started in (%d ms).', time_elapsed / 1e6),
24 + vim.log.levels.INFO)
24 25 end,
25 -})
27 28 vim.cmd.colorscheme 'nugu'
31 32 require 'bugabinga.options'
32 33 require 'bugabinga.sessions'
33 34 require 'bugabinga.treesitter'
35 +require 'bugabinga.bigfile'
34 36 require 'bugabinga.neovim_devel'
35 -require 'bugabinga.completion'
36 37 require 'bugabinga.lsp'
37 38 require 'bugabinga.editorconfig'
38 39 require 'bugabinga.save_actions'
43 44 require 'bugabinga.file_explorer'
44 45 require 'bugabinga.virtual_column'
45 46 require 'bugabinga.align'
46 -require 'bugabinga.autopairs'
47 47 require 'bugabinga.autotag'
48 48 require 'bugabinga.colorizer'
49 49 require 'bugabinga.cursorword'

neovim/lazy-lock.json

Deleted
deleted file mode 100644
1 -{
2 - "blink.cmp": { "branch": "main", "commit": "12d9ecd98055423fa76dfcf05b856967129b8847" },
3 - "conform.nvim": { "branch": "master", "commit": "6239d9986f51ca93ded99ecdb1af0e287eabb651" },
4 - "decisive.nvim": { "branch": "main", "commit": "a7251adebccbc9c899cff39a524b20d06e2b78b5" },
5 - "fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" },
6 - "glance.nvim": { "branch": "master", "commit": "17ee84e29ac33e7e5d91609f675cee8477586bda" },
7 - "heirline.nvim": { "branch": "master", "commit": "cc359b628266cb9a84b2d71c883f2b99e16473a0" },
8 - "lazy.nvim": { "branch": "main", "commit": "56ead98e05bb37a4ec28930a54d836d033cf00f2" },
9 - "mini.align": { "branch": "main", "commit": "26111a737494bc39576ad67b52bbc2638ca23553" },
10 - "mini.bracketed": { "branch": "main", "commit": "833d66df6e0588222312a963780c6ec42ed7437d" },
11 - "mini.cursorword": { "branch": "main", "commit": "7d1b38a17834acbbc4feff8e42aedc4ed0c6ff06" },
12 - "mini.diff": { "branch": "main", "commit": "24d46798be8a358d38d3adc92c7ebcbb2d6f67e0" },
13 - "mini.icons": { "branch": "main", "commit": "a2742459f0ee32806c2438ca06b4d8b331f3f4d4" },
14 - "mini.jump2d": { "branch": "main", "commit": "b0963aa2ec80b4b1ed1c7f93d9c969bb3f4b65b6" },
15 - "mini.operators": { "branch": "main", "commit": "35b12f54bd5acb860f4297fd6d12fd07b1b065e2" },
16 - "nvim-autopairs": { "branch": "master", "commit": "f158dcb865c36f72c92358f87787dab2c272eaf3" },
17 - "nvim-docs-view": { "branch": "master", "commit": "365593534e0acd762bfddce6e8313315ffa4fa36" },
18 - "nvim-gomove": { "branch": "main", "commit": "2b44ae7ac0804f4e3959228122f7c85bef1964e3" },
19 - "nvim-highlight-colors": { "branch": "main", "commit": "a411550ef85cae467b889ba7d1a96bd78332d90e" },
20 - "nvim-lint": { "branch": "master", "commit": "968a35d54b3a4c1ce66609cf80b14d4ae44fe77f" },
21 - "nvim-rulebook": { "branch": "main", "commit": "528857a6e522396c2ded41cb24e694fb3f177429" },
22 - "nvim-surround": { "branch": "main", "commit": "9f0cb495f25bff32c936062d85046fbda0c43517" },
23 - "nvim-treesitter": { "branch": "main", "commit": "fc940eaf106981a92829518e977e46ad4f306472" },
24 - "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
25 - "oil.nvim": { "branch": "master", "commit": "50c4bd4ee216f08907f64d0295c0663a69e58ffb" },
26 - "refjump.nvim": { "branch": "main", "commit": "92ec869724b949c40efbea54a560a835680d3de2" },
27 - "specs.nvim": { "branch": "main", "commit": "8a108c8b37dec1b184a1d3d76c6cf867bfbe9636" },
28 - "symbol-usage.nvim": { "branch": "main", "commit": "0f9b3da014b7e41559b643e7461fcabb2a7dc83a" },
29 - "treesj": { "branch": "main", "commit": "03415ac60791d48e120a80d37e080744faf3ac15" },
30 - "virt-column.nvim": { "branch": "master", "commit": "b87e3e0864211a32724a2ebf3be37e24e9e2fa99" }
31 -}

neovim/lua/bugabinga/align.lua

Added
new file mode 100644
1 +local puk = require 'std.puk'
3 +puk.defer 'mini.align' (function(align)
4 + align.setup {}
5 +end)

neovim/lua/bugabinga/autotag.lua

Added
new file mode 100644
1 +local puk = require 'std.puk'
2 +puk.defer 'nvim-ts-autotag' (function (autotag)
3 + autotag.setup {
4 + enable_close_on_tag = true,
5 + }
6 +end)

neovim/lua/bugabinga/bigfile.lua

Added
new file mode 100644
1 +-- Stolen from https://github.com/folke/snacks.nvim/blob/main/lua/snacks/bigfile.lua
3 +local auto = require 'std.auto'
5 +local defaults = {
6 + size = 1.5 * 1024 * 1024, -- 1.5MB
7 + -- Enable or disable features when big file detected
8 + ---@param ctx {buf: number, ft:string}
9 + setup = function(ctx)
10 + vim.cmd([[NoMatchParen]])
11 + vim.schedule(function()
12 + vim.bo[ctx.buf].syntax = ctx.ft
13 + end)
14 + end,
17 +vim.filetype.add({
18 + pattern = {
19 + [".*"] = {
20 + function(path, buf)
21 + return vim.bo[buf]
22 + and vim.bo[buf].filetype ~= "bigfile"
23 + and path
24 + and vim.fn.getfsize(path) > defaults.size
25 + and "bigfile"
26 + or nil
27 + end,
28 + },
29 + },
30 +})
32 +auto 'bigfile' {
33 + events = 'FileType',
34 + pattern = "bigfile",
35 + command = function(ev)
36 + local path = vim.fn.fnamemodify(vim.api.nvim_buf_get_name(ev.buf), ":p:~:.")
37 + vim.notify(("Big file detected `%s`."):format(path) .. "\nSome Neovim features have been **disabled**.",
38 + vim.log.levels.WARN,
39 + { title = 'bigfile' })
40 + vim.api.nvim_buf_call(ev.buf, function()
41 + defaults.setup({
42 + buf = ev.buf,
43 + ft = vim.filetype.match({ buf = ev.buf }) or "",
44 + })
45 + end)
46 + end,

neovim/lua/bugabinga/colorizer.lua

Added
new file mode 100644
1 +local puk = require 'std.puk'
2 +puk.defer 'nvim-highlight-colors' (function( colors )
3 + colors.setup {
4 + render = 'virtual',
5 + }
6 +end)

neovim/lua/bugabinga/completion.lua

Added
new file mode 100644
1 +local puk = require 'std.puk'
2 +local blink = puk 'blink.cmp'
3 +blink.setup {}
4 +return blink

neovim/lua/bugabinga/cursorword.lua

Added
new file mode 100644
1 +local puk = require 'std.puk'
2 +local table = require 'std.table'
3 +local auto = require 'std.auto'
5 +puk.defer 'mini.cursorword' (function (cursorword)
6 + cursorword.setup {
7 + delay = 4242,
8 + }
9 + vim.api.nvim_set_hl( 0, 'MiniCursorwordCurrent', { reverse = true } )
10 + local cursorword_blocklist = function ()
11 + local curword = vim.fn.expand '<cword>'
12 + local filetype = vim.bo.filetype
14 + -- Add any disabling global or filetype-specific logic here
15 + local blocklist = {
16 + 'if',
17 + 'else',
18 + 'switch',
19 + 'case',
20 + 'return',
21 + 'true', 'false',
22 + }
23 + if filetype == 'lua' then
24 + table.join( blocklist, {
25 + 'local',
26 + 'require',
27 + 'prequire',
28 + 'then',
29 + 'end',
30 + 'not',
31 + 'elseif',
32 + } )
33 + elseif filetype == 'java' then
34 + table.join( blocklist, {
35 + 'import',
36 + 'class',
37 + 'final',
38 + 'interface',
39 + 'record',
40 + 'abstract',
41 + 'static',
42 + 'public',
43 + 'private',
44 + } )
45 + end
47 + if #curword >= 2 then
48 + table.insert(blocklist, curword)
49 + end
51 + vim.b.minicursorword_disable = vim.tbl_contains( blocklist, curword )
52 + end
54 + -- Make sure to add this autocommand *before* calling module's `setup()`.
55 + auto 'mini_cursorword_blocklist_update' {
56 + description = 'Disable Cursorword for certain words.',
57 + events = 'CursorMoved',
58 + pattern = '*',
59 + command = cursorword_blocklist,
60 + }
61 +end)

neovim/lua/bugabinga/devicons.lua

Added
new file mode 100644
1 +local puk = require 'std.puk'
2 +local icons = puk 'mini.icons'
3 +icons.setup {}

neovim/lua/bugabinga/diff.lua

Added
new file mode 100644
1 +local puk = require 'std.puk'
2 +puk.defer 'mini.diff' (function(diff)
3 + diff.setup {}
4 +end)

neovim/lua/bugabinga/format.lua

Added
new file mode 100644
1 +local puk = require 'std.puk'
2 +local dbg = require 'std.dbg'
3 +local map = require 'std.map'
4 +local user_command = require 'std.user_command'
6 +local format = function ()
7 + require 'conform'.format( { async = false, lsp_fallback = true }, function ( err )
8 + if err and dbg.get() then
9 + vim.print( 'Format failed', err )
10 + end
11 + end )
12 +end
14 +map.N {
15 + description = 'Format buffer',
16 + category = 'format',
17 + keys = '=',
18 + command = format,
21 +user_command.Format 'Format the current buffer' ( format )
23 +vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
25 +puk.defer 'conform' (function (conform)
26 + conform.setup {
27 + formatters_by_ft = {
28 + toml = { 'taplo' },
29 + sh = { 'shfmt' },
30 + just = { 'just' },
31 + zig = { 'zigfmt' },
32 + -- Use the "*" file type to run formatters on all file types.
33 + ['*'] = { 'injected', 'typos' },
34 + -- Use the "_" file type to run formatters on file types that don't
35 + -- have other formatters configured.
36 + ['_'] = { 'trim_whitespace', 'trim_newlines' },
37 + },
38 + log_level = dbg.get() and vim.log.levels.TRACE or vim.log.levels.INFO,
39 + }
40 +end)

neovim/lua/bugabinga/in-and-out.lua

Deleted
deleted file mode 100644
1 --- Stolen from https://github.com/ysmb-wtsg/in-and-out.nvim
4 -local map = require 'std.map'
6 -local function escape_lua_pattern( s )
7 - local matches = {
8 - ['^'] = '%^',
9 - ['$'] = '%$',
10 - ['('] = '%(',
11 - [')'] = '%)',
12 - ['%'] = '%%',
13 - ['.'] = '%.',
14 - ['['] = '%[',
15 - [']'] = '%]',
16 - ['*'] = '%*',
17 - ['+'] = '%+',
18 - ['-'] = '%-',
19 - ['?'] = '%?',
20 - }
21 - return s:gsub( '.', matches )
22 -end
24 -local targets = { '"', "'", '(', ')', '{', '}', '[', ']', '`' }
26 -local in_and_out = function ()
27 - local current_row, current_col = unpack( vim.api.nvim_win_get_cursor( 0 ) )
28 - local lines_in_buf = vim.api.nvim_buf_get_lines( 0, current_row - 1, -1, false )
30 - local target_row = 0
31 - local target_col = nil
32 - for i, line in ipairs( lines_in_buf ) do
33 - for _, char in ipairs( targets ) do
34 - local found_col = string.find( line, escape_lua_pattern( char ), current_col + 1 )
35 - if found_col and (not target_col or found_col < target_col) then
36 - -- If char is a multibyte character, we need to take into account the extra bytes.
37 - target_col = found_col + vim.fn.strlen( char ) - 1
38 - end
39 - end
40 - if target_col then
41 - target_row = current_row + i - 1
42 - break
43 - end
44 - current_col = 0
45 - end
46 - if target_col then
47 - vim.api.nvim_win_set_cursor( 0, { target_row, target_col } )
48 - end
49 -end
51 -map.insert {
52 - description = 'Moves in or out of balanced tokens',
53 - category = 'editing',
54 - keys = '<C-CR>',
55 - command = in_and_out,
56 -}

neovim/lua/bugabinga/in_and_out.lua

Added
new file mode 100644
1 +-- Stolen from https://github.com/ysmb-wtsg/in-and-out.nvim
2 +local map = require 'std.map'
4 +local function escape_lua_pattern( s )
5 + local matches = {
6 + ['^'] = '%^',
7 + ['$'] = '%$',
8 + ['('] = '%(',
9 + [')'] = '%)',
10 + ['%'] = '%%',
11 + ['.'] = '%.',
12 + ['['] = '%[',
13 + [']'] = '%]',
14 + ['*'] = '%*',
15 + ['+'] = '%+',
16 + ['-'] = '%-',
17 + ['?'] = '%?',
18 + }
19 + return s:gsub( '.', matches )
20 +end
22 +local targets = { '"', "'", '(', ')', '{', '}', '[', ']', '`' }
24 +local in_and_out = function ()
25 + local current_row, current_col = unpack( vim.api.nvim_win_get_cursor( 0 ) )
26 + local lines_in_buf = vim.api.nvim_buf_get_lines( 0, current_row - 1, -1, false )
28 + local target_row = 0
29 + local target_col = nil
30 + for i, line in ipairs( lines_in_buf ) do
31 + for _, char in ipairs( targets ) do
32 + local found_col = string.find( line, escape_lua_pattern( char ), current_col + 1 )
33 + if found_col and (not target_col or found_col < target_col) then
34 + -- If char is a multibyte character, we need to take into account the extra bytes.
35 + target_col = found_col + vim.fn.strlen( char ) - 1
36 + end
37 + end
38 + if target_col then
39 + target_row = current_row + i - 1
40 + break
41 + end
42 + current_col = 0
43 + end
44 + if target_col then
45 + vim.api.nvim_win_set_cursor( 0, { target_row, target_col } )
46 + end
47 +end
49 +map.insert {
50 + description = 'Moves in or out of balanced tokens',
51 + category = 'editing',
52 + keys = '<C-CR>',
53 + command = in_and_out,

neovim/lua/bugabinga/incubator.lua

Added
new file mode 100644
1 +-- this file lists plugins in their "incubation" phase.
2 +-- that means i am testing those out of curiosity, but am not sure yet i wish
3 +-- to use and depend on them.
5 +local puk = require 'std.puk'
6 +local auto = require 'std.auto'
7 +local map = require 'std.map'
8 +local icon = require 'std.icon'
9 +local const = require 'std.const'
10 +local dbg = require 'std.dbg'
11 +local ignored = require 'std.ignored'
13 +-------------------------------------------------------------------------------
14 +--- does not yet restore well with session
15 +--- cannot navigate with C-w inside the DocsView
16 +--- it has a manual update mode, but which key to bind it to?
17 +puk.defer 'docs-view' (function(docsview)
18 + docsview.setup {
19 + position = 'right',
20 + width = 42,
21 + }
22 + map.normal {
23 + description = 'Toggle stable documentation panel.',
24 + keys = '<leader>tk',
25 + command = '<cmd>DocsViewToggle<cr>',
26 + }
27 +end)
28 +-------------------------------------------------------------------------------
29 +--- this is pretty great! i just need better binds and tell which key about them
30 +puk.defer 'rulebook' (function(rulebook)
31 + rulebook.setup ()
32 + map.normal {
33 + description = 'ignore rule',
34 + category = 'lint',
35 + keys = '<leader>ri',
36 + command = rulebook.ignoreRule,
37 + }
38 + map.normal {
39 + description = 'lookup rule',
40 + category = 'lint',
41 + keys = '<leader>rl',
42 + command = rulebook.lookupRule,
43 + }
44 + map.normal {
45 + description = 'yank diagnostic code',
46 + category = 'lint',
47 + keys = '<leader>ry',
48 + command = rulebook.yankDiagnosticCode,
49 + }
50 + map.normal {
51 + description = 'supress formatter',
52 + category = 'lint',
53 + keys = '<leader>rf',
54 + command = rulebook.suppressFormatter,
55 + }
56 +end)
57 +-------------------------------------------------------------------------------
58 +--- this plugin has some sick visual text formatting chops. check them out some time.
59 +puk.defer 'symbol-usage'(function(symbolusage)
60 + symbolusage.setup {
61 + hi = { link = 'LineNr' },
62 + vt_position = 'end_of_line',
63 + request_pending_text = false,
64 + disable = {
65 + filetypes = ignored.filetypes,
66 + },
67 + log = { enabled = dbg.get() },
68 + }
69 +end)
70 +-------------------------------------------------------------------------------
71 +--- Pretty NICE!
72 +--- fix highlights to match nugu.
73 +puk.defer 'glance' (function(glance)
74 + glance.setup()
75 + map.normal {
76 + description = 'peek definitions',
77 + category = 'lsp',
78 + keys = '<Leader>lpd',
79 + command = '<cmd>Glance definitions<cr>',
80 + }
81 + map.normal {
82 + description = 'Peek references',
83 + category = 'lsp',
84 + keys = '<Leader>lpr',
85 + command = '<cmd>Glance references<cr>',
86 + }
87 + map.normal {
88 + description = 'Peek type definitions',
89 + category = 'lsp',
90 + keys = '<Leader>lpt',
91 + command = '<cmd>Glance type_definitions<cr>',
92 + }
93 + map.normal {
94 + description = 'Peek implementations',
95 + keys = '<Leader>lpi',
96 + command = '<cmd>Glance implementations<cr>',
97 + }
98 +end)
99 +-------------------------------------------------------------------------------

neovim/lua/bugabinga/jump2d.lua

Added
new file mode 100644
1 +local puk = require 'std.puk'
2 +puk.defer 'mini.jump2d' (function(jump2d)
3 + jump2d.setup {}
4 +end)

neovim/lua/bugabinga/lazy.lua

Deleted
deleted file mode 100644
1 -local win32 = vim.uv.os_uname().sysname:match 'Win'
2 -local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
3 -if not vim.uv.fs_stat( lazypath ) then
4 - vim.fn.system {
5 - 'git',
6 - 'clone',
7 - '--filter=blob:none',
8 - 'https://github.com/folke/lazy.nvim.git',
9 - '--branch=stable', -- latest stable release
10 - lazypath,
11 - }
12 -end
13 -vim.opt.rtp:prepend( lazypath )
15 --- prevents lazy from setting up its highlights.
16 --- those will be setup manually later.
17 -require 'lazy.view.colors'.did_setup = true
19 -local lazy = require 'lazy'
20 -local icon = require 'std.icon'
22 -local overrides = require 'std.localrc' ( '.lazy.specs.lua', 'table' )
24 -lazy.setup {
25 - spec = { { import = 'bugabinga.plugins' }, overrides },
26 - defaults = {
27 - lazy = true,
28 - -- version = '*',
29 - -- useful to globally disable plugins
30 - cond = function ( plugin_spec )
31 - return true
32 - -- return plugin_spec.name:find 'virt'
33 - end,
34 - },
35 - install = {
36 - missing = true,
37 - colorscheme = { 'nugu', 'quiet' },
38 - },
39 - checker = {
40 - enabled = not win32,
41 - notify = true,
42 - },
43 - ui = {
44 - size = { width = 0.69, heigth = 0.69 },
45 - border = vim.g.border_style,
46 - icons = {
47 - lazy = icon.lazy,
48 - task = icon.terminal,
49 - ft = icon.file,
50 - },
51 - },
52 - change_detection = { notify = true },
53 - performance = {
54 - rtp = {
55 - disabled_plugins = {
56 - 'netrw',
57 - 'netrwPlugin',
58 - 'netrwSettings',
59 - 'netrwFileHandlers',
60 - 'gzip',
61 - 'zip',
62 - 'zipPlugin',
63 - 'tar',
64 - 'tarPlugin',
65 - 'getscript',
66 - 'getscriptPlugin',
67 - 'vimball',
68 - 'vimballPlugin',
69 - '2html_plugin',
70 - 'logipat',
71 - 'rrhelper',
72 - 'spellfile_plugin',
73 - 'matchit',
74 - 'matchparen',
75 - 'man',
76 - 'tohtml',
77 - 'tutor',
78 - },
79 - },
80 - },
81 - dev = {
82 - fallback = true,
83 - patterns = { 'bugabinga' },
84 - path = win32 and 'W:/' or '~/Workspace',
85 - },
86 - profiling = {
87 - loader = false,
88 - require = false,
89 - },
92 -local map = require 'std.map'
94 -local lazy_cmds = vim.iter {
95 - { 'Show', '', lazy.show },
96 - { 'Install', 'i', lazy.install },
97 - { 'Update', 'u', lazy.update },
98 - { 'Sync', 's', lazy.sync },
99 - { 'Clean', 'x', lazy.clean },
100 - { 'Check', 'c', lazy.check },
101 - { 'Log', 'l', lazy.log },
102 - { 'Restore', 'r', lazy.restore },
103 - { 'Profile', 'p', lazy.profile },
104 - { 'Debug', 'd', lazy.debug },
107 -local base_key = '<leader>z'
109 -lazy_cmds:each( function ( cmd )
110 - map.normal {
111 - description = cmd[1],
112 - category = 'plugins',
113 - keys = base_key .. cmd[2],
114 - command = cmd[3],
115 - }
116 -end )
118 -local auto = require 'std.auto'
120 -auto 'display_startup_time' {
121 - description = 'Display startup time on starter screen',
122 - events = 'User',
123 - pattern = 'LazyVimStarted',
124 - once = true,
125 - command = vim.schedule_wrap( function ()
126 - local startuptime = lazy.stats().startuptime
127 - vim.notify( 'neovim started in ' .. startuptime .. 'ms' )
128 - end ),

neovim/lua/bugabinga/lint.lua

Added
new 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 + timer:stop()
21 + timer:start( DEBOUNCE_MS, 0,
22 + vim.schedule_wrap( function ()
23 + if vim.api.nvim_buf_is_valid( bufnr ) then
24 + vim.api.nvim_buf_call( bufnr, function () lint.try_lint( nil, { ignore_errors = true } ) end )
25 + end
26 + end ))
27 + end
29 + auto 'Lint' {
30 + description = '',
31 + events = 'BufWritePost',
32 + command = try_lint,
33 + }
34 +end)

neovim/lua/bugabinga/lsp/init.lua

Modified
11 11 vim.lsp.set_log_level('debug')
14 - local settings_override = project_local_lsp_settings[language_server_name]
15 - if settings_override then
16 - return settings_override
17 - end
18 -end
20 - end
21 -end
23 14 local language_servers = {
24 15 lua_ls = {
25 16 root_dir = project.find_lua_project_root,
33 24 -- TODO: take some config from clients/ int here
34 25 jdtls = { root_dir = project.find_java_project_root, },
35 26 zls = { root_dir = project.find_zig_project_root, },
36 - ziggy = { root_dir = project.find_vcs_project_root, },
37 - ziggy_schema = { root_dir = project.find_vcs_project_root, },
38 - asm_lsp = { root_dir = project.find_vcs_project_root, },
39 - clangd = { root_dir = project.find_vcs_project_root, },
40 - denols = { root_dir = project.find_vcs_project_root, },
41 - dotls = { root_dir = project.find_vcs_project_root, },
42 - docker_compose_language_service = { root_dir = project.find_vcs_project_root, },
43 - dockerls = { root_dir = project.find_vcs_project_root, },
44 - ast_grep = { root_dir = project.find_vcs_project_root, },
45 - cssls = { root_dir = project.find_vcs_project_root, },
46 - css_variables = { root_dir = project.find_vcs_project_root, },
47 - emmet_language_server = { root_dir = project.find_vcs_project_root, },
48 - gopls = { root_dir = project.find_vcs_project_root, },
49 - gradle_ls = { root_dir = project.find_vcs_project_root, },
50 - harper_ls = { root_dir = project.find_vcs_project_root, },
51 - html = { root_dir = project.find_vcs_project_root, },
52 - htmx = { root_dir = project.find_vcs_project_root, },
53 - hyprls = { root_dir = project.find_vcs_project_root, },
54 - jsonls = { root_dir = project.find_vcs_project_root, },
55 - lemminx = { root_dir = project.find_vcs_project_root, },
56 - lsp_ai = { root_dir = project.find_vcs_project_root, },
57 - ltex = { root_dir = project.find_vcs_project_root, },
58 - marksman = { root_dir = project.find_vcs_project_root, },
59 - markdown_oxide = { root_dir = project.find_vcs_project_root, },
60 - nil_ls = { root_dir = project.find_vcs_project_root, },
61 - nixd = { root_dir = project.find_vcs_project_root, },
62 - nushell = { root_dir = project.find_vcs_project_root, },
63 - ocamllsp = { root_dir = project.find_vcs_project_root, },
64 - protols = { root_dir = project.find_vcs_project_root, },
65 - roc_ls = { root_dir = project.find_vcs_project_root, },
66 - rust_analyzer = { root_dir = project.find_vcs_project_root, },
67 - statix = { root_dir = project.find_vcs_project_root, },
68 - superhtml = { root_dir = project.find_vcs_project_root, },
69 - tabby_ml = { root_dir = project.find_vcs_project_root, },
70 - taplo = { root_dir = project.find_vcs_project_root, },
71 - ts_ls = { root_dir = project.find_vcs_project_root, },
72 - zk = { root_dir = project.find_vcs_project_root, },
27 + ziggy = { root_dir = project.find_zig_project_root, },
28 + ziggy_schema = { root_dir = project.find_zig_project_root, },
29 + harper_ls = {},
30 + asm_lsp = {
31 + linters = {
32 + spell_check = true,
33 + spelled_numbers = true,
34 + an_a = true,
35 + sentence_capitalization = true,
36 + unclosed_quotes = true,
37 + wrong_quotes = true,
38 + long_sentences = true,
39 + repeated_words = true,
40 + spaces = true,
41 + matcher = true,
42 + correct_number_suffix = true,
43 + number_suffix_capitalization = true,
44 + multiple_sequential_pronouns = true,
45 + linking_verbs = true,
46 + avoid_curses = true,
47 + terminating_conjunctions = true
48 + },
49 + codeActions = {
50 + forceStable = true
51 + },
52 + root_dir = project.find_vcs_project_root,
53 + },
54 + clangd = {},
55 + denols = {},
56 + dotls = {},
57 + docker_compose_language_service = {},
58 + dockerls = {},
59 + ast_grep = {},
60 + cssls = {},
61 + css_variables = {},
62 + emmet_language_server = {},
63 + gopls = {},
64 + gradle_ls = {},
65 + html = {},
66 + htmx = {},
67 + hyprls = {},
68 + jsonls = {},
69 + lemminx = {},
70 + ltex = {},
71 + marksman = {},
72 + markdown_oxide = {},
73 + nil_ls = {},
74 + nixd = {},
75 + nushell = {},
76 + ocamllsp = {},
77 + protols = {},
78 + roc_ls = {},
79 + rust_analyzer = {},
80 + statix = {},
81 + superhtml = {},
82 + taplo = {},
83 + ts_ls = {},
84 + zk = {},
75 -puk.defer 'lspconfig' (function(lspconfig)
76 - for server, config in pairs(language_servers) do
77 - local capabilities = vim.lsp.protocol.make_client_capabilities()
78 - config.capabilities = require('blink.cmp').get_lsp_capabilities(config.capabilities)
79 - capabilities = table.extend('force', capabilities, config.capabilities)
80 - local settings = config.settings or {}
81 - local settings_override = local_settings(server) or {}
82 - config.settings = table.extend('force', settings, settings_override)
83 - lspconfig[server].setup(config)
84 - end
85 -end)
87 +local lspconfig = puk 'lspconfig'
88 +for server, config in pairs(language_servers) do
89 + local capabilities = vim.lsp.protocol.make_client_capabilities()
90 + config.capabilities = require('bugabinga.completion').get_lsp_capabilities(config.capabilities)
91 + capabilities = table.extend('force', capabilities, config.capabilities)
92 + local settings = config.settings or {}
93 + -- TODO reimplement local settings overrides
94 + -- local settings_override = local_settings(server) or {}
95 + -- config.settings = table.extend('force', settings, settings_override)
96 + lspconfig[server].setup(config)
97 +end
87 99 local lsp_attach = function(args)
88 100 local bufnr = args.buf

neovim/lua/bugabinga/move.lua

Added
new file mode 100644
1 +local puk = require 'std.puk'
3 +puk.defer 'mini.move' (function( move )
4 + move.setup{}
5 +end)

neovim/lua/bugabinga/navigation.lua

Added
new file mode 100644
1 +local puk = require 'std.puk'
2 +puk.defer 'mini.bracketed' (function (bracketed)
3 + bracketed.setup {}
4 +end)

neovim/lua/bugabinga/neovim_devel.lua

Added
new file mode 100644
1 +local puk = require 'std.puk'
3 +puk.defer 'lazydev' (function(lazydev)
4 + vim.cmd.packadd 'wezterm-types'
5 + lazydev.setup {
6 + library = {
7 + -- See the configuration section for more details
8 + -- Load luvit types when the `vim.uv` word is found
9 + { path = "${3rd}/luv/library", words = { "vim%.uv" } },
10 + -- Load the wezterm types when the `wezterm` module is required
11 + -- Needs `justinsgithub/wezterm-types` to be installed
12 + { path = "wezterm-types", mods = { "wezterm" } },
13 + },
14 + -- disable when a .luarc.json file is found
15 + enabled = function(root_dir)
16 + return not vim.uv.fs_stat(root_dir .. "/.lsp.settings.lua")
17 + end,
18 + }
19 +end)

neovim/lua/bugabinga/notifications.lua

Added
new file mode 100644
1 +local puk = require 'std.puk'
2 +local user_command = require 'std.user_command'
3 +local fidget = puk 'fidget'
5 +fidget.setup {
6 + -- Options related to LSP progress subsystem
7 + progress = {
8 + suppress_on_insert = true, -- Suppress new messages while in insert mode
9 + },
11 + -- Options related to notification subsystem
12 + notification = {
13 + override_vim_notify = true, -- Automatically override vim.notify() with Fidget
14 + },
17 +user_command.Notifications 'Show past notifications' (function() vim.cmd.Fidget 'history' end)

neovim/lua/bugabinga/operators.lua

Added
new file mode 100644
1 +local puk = require 'std.puk'
2 +puk.defer 'mini.operators' (function (operators)
3 + operators.setup {}
4 +end)

neovim/lua/bugabinga/options/spelling.lua

Modified
3 3 local table = require 'std.table'
4 4 local joinpath = vim.fs.joinpath
6 6 -- disable spell checking initially
7 7 vim.opt.spell = false
8 +vim.opt.spelloptions:append 'camel'
8 9 vim.opt.spellcapcheck = ''
9 10 -- English, German, Polish and tech words
10 11 vim.opt.spelllang:append 'en'
11 12 vim.opt.spelllang:append 'nerd'
12 13 local config_dir = vim.fn.stdpath 'config'
13 14 ---@diagnostic disable-next-line: param-type-mismatch
14 -local spell_dir = joinpath( config_dir, 'spell' )
15 +local spell_dir = joinpath(config_dir, 'spell')
15 16 vim.opt.spellfile = table.concat(
17 - joinpath( spell_dir, 'nerd.utf-8.add' ),
18 - joinpath( spell_dir, 'en.utf-8.add' ),
19 - joinpath( spell_dir, 'de.utf-8.add' ),
20 - joinpath( spell_dir, 'pl.utf-8.add' ),
21 - }, ',' )
18 + joinpath(spell_dir, 'nerd.utf-8.add'),
19 + joinpath(spell_dir, 'en.utf-8.add'),
20 + joinpath(spell_dir, 'de.utf-8.add'),
21 + joinpath(spell_dir, 'pl.utf-8.add'),
22 + }, ',')
23 24 -- create new spl file with:
24 25 -- mkspell ~/.config/nvim/spell/[lang] ~/Downloads/[lang]

neovim/lua/bugabinga/plugins/align.lua

Deleted
deleted file mode 100644
1 -return {
2 - 'echasnovski/mini.align',
3 - version = 'v0.*',
4 - lazy = false,
5 - opts = {},
6 -}

neovim/lua/bugabinga/plugins/autopairs.lua

Deleted
deleted file mode 100644
1 -local ignored = require 'std.ignored'
3 -return {
4 - 'windwp/nvim-autopairs',
5 - commit = 'f158dcb865c36f72c92358f87787dab2c272eaf3',
6 - event = 'InsertEnter',
7 - opts = {
8 - disable_filetype = ignored.filetypes,
9 - check_ts = true,
10 - enable_check_bracket_line = true,
11 - },
12 -}

neovim/lua/bugabinga/plugins/autotag.lua

Deleted
deleted file mode 100644
1 -return {
2 - 'windwp/nvim-ts-autotag',
3 - branch = 'main',
4 - lazy = false,
5 - opts = {
6 - enable_close_on_tag = true,
7 - },
8 -}

neovim/lua/bugabinga/plugins/colorizer.lua

Deleted
deleted file mode 100644
1 -return {
2 - {
3 - 'brenoprata10/nvim-highlight-colors',
4 - commit = 'a411550ef85cae467b889ba7d1a96bd78332d90e',
5 - lazy = false,
6 - init = function ()
7 - vim.opt.termguicolors = true
8 - end,
9 - opts = {
10 - render = 'virtual',
11 - },
12 - },
13 -}

neovim/lua/bugabinga/plugins/cursorword.lua

Deleted
deleted file mode 100644
1 -local table = require 'std.table'
2 -local auto = require 'std.auto'
4 -return {
5 - 'echasnovski/mini.cursorword',
6 - version = '0.*',
7 - event = 'VeryLazy',
8 - opts = {
9 - delay = 4242,
10 - },
11 - config = function ( _, opts )
12 - local cursorword_blocklist = function ()
13 - local curword = vim.fn.expand '<cword>'
14 - local filetype = vim.bo.filetype
16 - -- Add any disabling global or filetype-specific logic here
17 - local blocklist = {
18 - '_',
19 - 'if',
20 - 'else',
21 - 'switch',
22 - 'case',
23 - 'return',
24 - 'true', 'false',
25 - }
26 - if filetype == 'lua' then
27 - table.join( blocklist, {
28 - 'local',
29 - 'require',
30 - 'prequire',
31 - 'then',
32 - 'end',
33 - 'not',
34 - 'elseif',
35 - } )
36 - elseif filetype == 'java' then
37 - table.join( blocklist, {
38 - 'import',
39 - 'class',
40 - 'final',
41 - 'interface',
42 - 'record',
43 - 'abstract',
44 - 'static',
45 - 'public',
46 - 'private',
47 - } )
48 - end
50 - vim.b.minicursorword_disable = vim.tbl_contains( blocklist, curword )
51 - end
53 - -- Make sure to add this autocommand *before* calling module's `setup()`.
54 - auto 'mini_cursorword_blocklist_update' {
55 - description = 'Disable Cursorword for certein words.',
56 - events = 'CursorMoved',
57 - pattern = '*',
58 - command = cursorword_blocklist,
59 - }
60 - prequire 'mini.cursorword'.setup( opts )
61 - vim.api.nvim_set_hl( 0, 'MiniCursorwordCurrent', { reverse = true } )
62 - end,
63 -}

neovim/lua/bugabinga/plugins/devicons.lua

Deleted
deleted file mode 100644
1 -return {
2 - 'echasnovski/mini.icons',
3 - version = 'v0.*',
4 - lazy = false,
5 - opts = {},
6 -}

neovim/lua/bugabinga/plugins/diff.lua

Deleted
deleted file mode 100644
1 -return {
2 - 'echasnovski/mini.diff',
3 - version = '0.*',
4 - event = 'VeryLazy',
5 - opts = {},
6 -}

neovim/lua/bugabinga/plugins/format.lua

Deleted
deleted file mode 100644
1 -local debug = require 'std.dbg'
2 -local map = require 'std.map'
3 -local user_command = require 'std.user_command'
5 -local format = function ()
6 - prequire 'conform'.format( { async = false, lsp_fallback = true }, function ( err )
7 - if err and debug.get() then
8 - vim.print( 'Format failed', err )
9 - end
10 - end )
11 -end
13 -map.N {
14 - description = 'Format buffer',
15 - category = 'format',
16 - keys = '=',
17 - command = format,
18 -}
20 -user_command.Format 'Format the current buffer' ( format )
22 -return {
23 - 'stevearc/conform.nvim',
24 - version = '8.*',
25 - cmd = { 'ConformInfo' },
26 - opts = {
27 - formatters_by_ft = {
28 - toml = { 'taplo' },
29 - sh = { 'shfmt' },
30 - just = { 'just' },
31 - zig = { 'zigfmt' },
32 - -- Use the "*" file type to run formatters on all file types.
33 - ['*'] = { 'injected', 'typos' },
34 - -- Use the "_" file type to run formatters on file types that don't
35 - -- have other formatters configured.
36 - ['_'] = { 'trim_whitespace', 'trim_newlines' },
37 - },
38 - log_level = debug.get() and vim.log.levels.TRACE or vim.log.levels.INFO,
39 - },
40 - init = function ()
41 - vim.o.formatexpr = "v:lua.require'conform'.formatexpr()"
42 - end,
43 -}

neovim/lua/bugabinga/plugins/incubator.lua

Deleted
deleted file mode 100644
1 --- this file lists plugins in their "incubation" phase.
2 --- that means i am testing those out of curiosity, but am not sure yet i wish
3 --- to use and depend on them.
5 -local puk = require 'std.puk'
6 -local auto = require 'std.auto'
7 -local map = require 'std.map'
8 -local icon = require 'std.icon'
9 -local const = require 'std.const'
10 -local dbg = require 'std.dbg'
11 -local ignored = require 'std.ignored'
13 --------------------------------------------------------------------------------
14 ---- does not yet restore well with session
15 ---- cannot navigate with C-w inside the DocsView
16 ---- it has a manual update mode, but which key to bind it to?
17 -puk.defer 'docs-view' (function(docsview)
18 - docsview.setup {
19 - position = 'right',
20 - width = 42,
21 - }
22 - map.normal {
23 - description = 'Toggle stable documentation panel.',
24 - keys = '<leader>tk',
25 - command = '<cmd>DocsViewToggle<cr>',
26 - }
27 -end)
28 --------------------------------------------------------------------------------
29 ---- this is pretty great! i just need better binds and tell which key about them
30 -puk.defer 'rulebook' (function(rulebook)
31 - rulebook.setup ()
32 - map.normal {
33 - description = 'ignore rule',
34 - category = 'lint',
35 - keys = '<leader>ri',
36 - command = rulebook.ignoreRule,
37 - }
38 - map.normal {
39 - description = 'lookup rule',
40 - category = 'lint',
41 - keys = '<leader>rl',
42 - command = rulebook.lookupRule,
43 - }
44 - map.normal {
45 - description = 'yank diagnostic code',
46 - category = 'lint',
47 - keys = '<leader>ry',
48 - command = rulebook.yankDiagnosticCode,
49 - }
50 - map.normal {
51 - description = 'supress formatter',
52 - category = 'lint',
53 - keys = '<leader>rf',
54 - command = rulebook.suppressFormatter,
55 - }
56 -end)
57 --------------------------------------------------------------------------------
58 ---- this plugin has some sick visual text formatting chops. check them out some time.
59 -puk.defer 'symbol-usage'(function(symbolusage)
60 - symbolusage.setup {
61 - hi = { link = 'LineNr' },
62 - vt_position = 'end_of_line',
63 - request_pending_text = false,
64 - disable = {
65 - filetypes = ignored.filetypes,
66 - },
67 - log = { enabled = dbg.get() },
68 - }
69 -end)
70 --------------------------------------------------------------------------------
71 ---- Pretty NICE!
72 ---- fix highlights to match nugu.
73 -puk.defer 'glance' (function(glance)
74 - glance.setup()
75 - map.normal {
76 - description = 'peek definitions',
77 - category = 'lsp',
78 - keys = '<Leader>lpd',
79 - command = '<cmd>Glance definitions<cr>',
80 - }
81 - map.normal {
82 - description = 'Peek references',
83 - category = 'lsp',
84 - keys = '<Leader>lpr',
85 - command = '<cmd>Glance references<cr>',
86 - }
87 - map.normal {
88 - description = 'Peek type definitions',
89 - category = 'lsp',
90 - keys = '<Leader>lpt',
91 - command = '<cmd>Glance type_definitions<cr>',
92 - }
93 - map.normal {
94 - description = 'Peek implementations',
95 - keys = '<Leader>lpi',
96 - command = '<cmd>Glance implementations<cr>',
97 - }
98 -end)
99 --------------------------------------------------------------------------------

neovim/lua/bugabinga/plugins/jump2d.lua

Deleted
deleted file mode 100644
1 -return {
2 - 'echasnovski/mini.jump2d',
3 - version = '0.*',
4 - event = 'VeryLazy',
5 - opts = {},
6 -}

neovim/lua/bugabinga/plugins/lint.lua

Deleted
deleted file mode 100644
1 --- FIXME: own this
2 -return {
3 - 'mfussenegger/nvim-lint',
4 - commit = '968a35d54b3a4c1ce66609cf80b14d4ae44fe77f',
5 - ft = {
6 - 'lua',
7 - 'sh',
8 - 'systemd',
9 - 'editorconfig',
10 - 'yaml',
11 - },
12 - opts = {
13 - linters_by_ft = {
14 - lua = { 'selene' },
15 - sh = { 'shellcheck', 'dotenv_linter' },
16 - systemd = { 'systemd-analyze' },
17 - editorconfig = { 'editorconfig-checker' },
18 - yaml = { 'yq' },
19 - },
20 - linters = {},
21 - },
22 - config = function ( _, opts )
23 - local lint = require 'lint'
24 - lint.linters_by_ft = opts.linters_by_ft
25 - for k, v in pairs( opts.linters ) do
26 - lint.linters[k] = v
27 - end
28 - ---@diagnostic disable-next-line: undefined-field
29 - local timer = assert( vim.uv.new_timer() )
30 - local DEBOUNCE_MS = 500
31 - local aug = vim.api.nvim_create_augroup( 'Lint', { clear = true } )
32 - vim.api.nvim_create_autocmd( { 'BufWritePost' }, {
33 - group = aug,
34 - callback = function ()
35 - local bufnr = vim.api.nvim_get_current_buf()
36 - timer:stop()
37 - timer:start( DEBOUNCE_MS, 0,
38 - vim.schedule_wrap( function ()
39 - if vim.api.nvim_buf_is_valid( bufnr ) then
40 - vim.api.nvim_buf_call( bufnr, function () lint.try_lint( nil, { ignore_errors = true } ) end )
41 - end
42 - end )
43 - )
44 - end,
45 - } )
46 - end,
47 -}

neovim/lua/bugabinga/plugins/move.lua

Deleted
deleted file mode 100644
1 -local map = require 'std.map'
3 -return {
4 - {
5 - 'booperlv/nvim-gomove',
6 - commit = '2b44ae7ac0804f4e3959228122f7c85bef1964e3',
7 - event = 'VeryLazy',
8 - config = function ()
9 - local move = require 'gomove'
11 - move.setup {
12 - -- whether or not to map default key bindings, (true/false)
13 - map_defaults = false,
14 - -- whether or not to reindent lines moved vertically (true/false)
15 - reindent = true,
16 - -- whether or not to undojoin same direction moves (true/false)
17 - undojoin = true,
18 - -- whether to not to move past end column when moving blocks horizontally, (true/false)
19 - move_past_end_col = false,
20 - }
22 - -- default mappings in gomove set no options, but use old keymap api.
23 - -- recreating old defaults here:
24 - local options = { remap = true }
26 - -- i have tried using the lua functions directly for the commands below.
27 - -- the behaviour was slightly buggy in respects to block selections though.
28 - -- unsure why that is.
30 - -- NORMAL MOVE
31 - map.normal {
32 - description = 'Move character left',
33 - category = 'editing',
34 - keys = '<A-h>',
35 - options = options,
36 - command = '<Plug>GoNSMLeft',
37 - }
38 - map.normal {
39 - description = 'Move line down',
40 - category = 'editing',
41 - keys = '<A-j>',
42 - options = options,
43 - command = '<Plug>GoNSMDown',
44 - }
45 - map.normal {
46 - description = 'Move line up',
47 - category = 'editing',
48 - keys = '<A-k>',
49 - options = options,
50 - command = '<Plug>GoNSMUp',
51 - }
52 - map.normal {
53 - description = 'Move character right',
54 - category = 'editing',
55 - keys = '<A-l>',
56 - options = options,
57 - command = '<Plug>GoNSMRight',
58 - }
60 - -- VISUAL MOVE
61 - map.visual {
62 - description = 'Move block left',
63 - category = 'editing',
64 - keys = '<A-h>',
65 - options = options,
66 - command = '<Plug>GoVSMLeft',
67 - }
68 - map.visual {
69 - description = 'Move block down',
70 - category = 'editing',
71 - keys = '<A-j>',
72 - options = options,
73 - command = '<Plug>GoVSMDown',
74 - }
75 - map.visual {
76 - description = 'Move block up',
77 - category = 'editing',
78 - keys = '<A-k>',
79 - options = options,
80 - command = '<Plug>GoVSMUp',
81 - }
82 - map.visual {
83 - description = 'Move block right',
84 - category = 'editing',
85 - keys = '<A-l>',
86 - options = options,
87 - command = '<Plug>GoVSMRight',
88 - }
90 - -- NORMAL DUPLICATE
91 - map.normal {
92 - description = 'Duplicate character left',
93 - category = 'editing',
94 - keys = '<A-H>',
95 - options = options,
96 - command = '<Plug>GoNSDLeft',
97 - }
98 - map.normal {
99 - description = 'Duplicate line down',
100 - category = 'editing',
101 - keys = '<A-J>',
102 - options = options,
103 - command = '<Plug>GoNSDDown',
104 - }
105 - map.normal {
106 - description = 'Duplicate line up',
107 - category = 'editing',
108 - keys = '<A-K>',
109 - options = options,
110 - command = '<Plug>GoNSDUp',
111 - }
112 - map.normal {
113 - description = 'Duplicate character right',
114 - category = 'editing',
115 - keys = '<A-L>',
116 - options = options,
117 - command = '<Plug>GoNSDRight',
118 - }
120 - -- VISUAL DUPLICATE
121 - map.visual {
122 - description = 'Duplicate block left',
123 - category = 'editing',
124 - keys = '<A-H>',
125 - options = options,
126 - command = '<Plug>GoVSDLeft',
127 - }
128 - map.visual {
129 - description = 'Duplicate block down',
130 - category = 'editing',
131 - keys = '<A-J>',
132 - options = options,
133 - command = '<Plug>GoVSDDown',
134 - }
135 - map.visual {
136 - description = 'Duplicate block up',
137 - category = 'editing',
138 - keys = '<A-K>',
139 - options = options,
140 - command = '<Plug>GoVSDUp',
141 - }
142 - map.visual {
143 - description = 'Duplicate block right',
144 - category = 'editing',
145 - keys = '<A-L>',
146 - options = options,
147 - command = '<Plug>GoVSDRight',
148 - }
149 - end,
150 - },

neovim/lua/bugabinga/plugins/navigation.lua

Deleted
deleted file mode 100644
1 -return {
2 - 'echasnovski/mini.bracketed',
3 - version = '0.*',
4 - event = 'VeryLazy',
5 - opts = {},
6 -}

neovim/lua/bugabinga/plugins/notifications.lua

Deleted
deleted file mode 100644
1 -return {
2 - 'j-hui/fidget.nvim',
3 - version = 'v1.*',
4 - lazy = false,
5 - opts = {
6 - -- Options related to LSP progress subsystem
7 - progress = {
8 - suppress_on_insert = true, -- Suppress new messages while in insert mode
9 - },
11 - -- Options related to notification subsystem
12 - notification = {
13 - override_vim_notify = true, -- Automatically override vim.notify() with Fidget
15 - -- Options related to the notification window and buffer
16 - window = {
17 - winblend = vim.o.winblend, -- Background color opacity in the notification window
18 - border = vim.g.border_style, -- Border around the notification window
19 - },
20 - },
21 - },
22 -}

neovim/lua/bugabinga/plugins/oil.lua

Deleted
deleted file mode 100644
1 -local map = require 'std.map'
2 -local icon = require 'std.icon'
4 -map.normal {
5 - description = 'Open parent directory in buffer.',
6 - category = 'files',
7 - keys = '-',
8 - command = function () require 'oil'.open() end,
9 -}
11 -map.normal {
12 - description = 'Open parent directory in a float.',
13 - category = 'files',
14 - keys = '--',
15 - command = function () require 'oil'.open_float() end,
16 -}
18 -return {
19 - 'stevearc/oil.nvim',
20 - lazy = false,
21 - version = '2.*',
22 - cmd = { 'Oil' },
23 - opts = {
24 - -- default_file_explorer = true,
25 - -- Set to true to watch the filesystem for changes and reload oil
26 - -- experimental_watch_for_changes = true,
27 - skip_confirm_for_simple_edits = true,
28 - prompt_save_on_select_new_entry = false,
29 - delete_to_trash = true,
31 - columns = { 'icon' },
32 - win_options = {
33 - cursorline = true,
34 - },
35 - keymaps = {
36 - ['q'] = 'actions.close',
37 - ['<C-v>'] = 'actions.select_vsplit',
38 - ['<C-s>'] = 'actions.select_split',
39 - ['`'] = 'actions.tcd',
40 - ['~'] = '<cmd>edit $HOME<CR>',
41 - ['<F7>'] = 'actions.open_terminal',
42 - ['gd'] = {
43 - desc = 'Toggle detail view',
44 - callback = function ()
45 - local oil = require 'oil'
46 - local config = require 'oil.config'
47 - if #config.columns == 1 then
48 - oil.set_columns { 'icon', 'permissions', 'size', { 'mtime', format = '%d/%m/%y %T' } }
49 - else
50 - oil.set_columns { 'icon' }
51 - end
52 - end,
53 - },
54 - },
55 - float = {
56 - max_width = 69,
57 - min_width = 69,
58 - border = vim.g.border_style,
59 - padding = 2,
60 - },
61 - -- Configuration for the floating keymaps help window
62 - keymaps_help = {
63 - border = vim.g.border_style,
64 - },
65 - view_options = {
66 - is_always_hidden = function ( name, bufnr ) return name == '..' end,
67 - show_hidden = true,
68 - },
69 - },
70 -}

neovim/lua/bugabinga/plugins/operators.lua

Deleted
deleted file mode 100644
1 -return {
2 - 'echasnovski/mini.operators',
3 - version = '0.*',
4 - event = 'VeryLazy',
5 - opts = {},
6 -}

neovim/lua/bugabinga/plugins/parsers.lua

Deleted
deleted file mode 100644
1 -require 'bugabinga.health'.add_dependency
2 -{ name_of_executable = 'zig' }
3 - { name = 'TreeSitter CLI', name_of_executable = 'tree-sitter' }
4 - { name_of_executable = 'tar' }
5 - { name_of_executable = 'curl' }
7 -return {
8 - 'nvim-treesitter/nvim-treesitter',
9 - branch = 'main',
10 - lazy = false,
11 - build = ':TSUpdate',
12 - opts = {},
13 -}

neovim/lua/bugabinga/plugins/specs.lua

Deleted
deleted file mode 100644
1 -local map = require 'std.map'
2 -local ignored = require 'std.ignored'
4 -map.normal {
5 - description = 'Find cursor!',
6 - category = 'fun',
7 - keys = '<leader><leader>',
8 - command = function () require 'specs'.show_specs() end,
9 -}
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,
18 -}
20 -return {
21 - 'KevinSilvester/specs.nvim',
22 - commit = '8a108c8b37dec1b184a1d3d76c6cf867bfbe9636',
23 - lazy = false,
24 - opts = function ()
25 - return {
26 - show_jumps = true,
27 - min_jump = 10,
28 - popup = {
29 - delay_ms = 10, -- delay before popup displays
30 - inc_ms = 10, -- time increments used for fade/resize effects
31 - blend = 10, -- starting blend, between 0-100 (fully transparent), see :h winblend
32 - width = 10,
33 - winhl = 'Cursor',
34 - fader = require 'specs'.exp_fader,
35 - resizer = require 'specs'.shrink_resizer,
36 - },
37 - ignore_filetypes = ignored.filetypes_kv,
38 - ignore_buftypes = ignored.buftypes_kv,
39 - }
40 - end,
41 -}

neovim/lua/bugabinga/plugins/statusbar.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 - version = '2.*',
12 - lazy = false,
13 - config = function ()
14 - local heirline = require 'heirline'
15 - local conditions = require 'heirline.conditions'
16 - local utils = require 'heirline.utils'
18 - local nugu = require 'bugabinga.nugu.palette'
19 - heirline.load_colors( nugu )
21 - auto 'reload_heirline_colors' {
22 - description = 'Reload dark/light nugu colors for Heirline',
23 - events = 'ColorScheme',
24 - command = function ()
25 - utils.on_colorscheme( nugu )
26 - end,
27 - }
29 - local vi_mode = {
30 - init = function ( self )
31 - self.mode = vim.fn.mode( 1 ) -- :h mode()
32 - end,
34 - static = {
35 - mode_names = {
36 - n = icon.normal,
37 - no = icon.normal .. '?',
38 - nov = icon.normal .. '?',
39 - noV = icon.normal .. '?',
40 - ['no\22'] = icon.normal .. '?',
41 - niI = icon.normal .. 'i',
42 - niR = icon.normal .. 'r',
43 - niV = icon.normal .. 'v',
44 - nt = icon.normal .. 't',
45 - v = icon.visual,
46 - vs = icon.visual .. 's',
47 - V = icon.visual .. '_',
48 - Vs = icon.visual .. 's',
49 - ['\22'] = '^' .. icon.visual,
50 - ['\22s'] = '^' .. icon.visual,
51 - s = icon.select,
52 - S = icon.select .. '_',
53 - ['\19'] = '^' .. icon.select,
54 - i = icon.insert,
55 - ic = icon.insert .. 'c',
56 - ix = icon.insert .. 'x',
57 - R = icon.replace,
58 - Rc = icon.replace .. 'c',
59 - Rx = icon.replace .. 'x',
60 - Rv = icon.replace .. 'v',
61 - Rvc = icon.replace .. 'v',
62 - Rvx = icon.replace .. 'v',
63 - c = icon.command,
64 - cv = icon.command .. 'x',
65 - r = icon.pending,
66 - rm = icon.pending .. 'm',
67 - ['r?'] = icon.pending .. '?',
68 - ['!'] = icon.exclaim,
69 - t = icon.terminal,
70 - },
71 - mode_colors = {
72 - n = 'ui_normal',
73 - i = 'ui_accent',
74 - v = 'ui_important_global',
75 - V = 'ui_important_global',
76 - ['\22'] = 'ui_important_global',
77 - c = 'ui_important_global',
78 - s = 'ui_important_global',
79 - S = 'ui_important_global',
80 - ['\19'] = 'ui_important_global',
81 - R = 'ui_important_global',
82 - r = 'ui_important_global',
83 - ['!'] = 'ui_important_global',
84 - t = 'ui_important_global',
85 - },
86 - },
88 - provider = function ( self )
89 - local mode_name = self.mode_names[self.mode]
90 - return ' ' .. icon.vim .. ' %3(' .. mode_name .. '%) '
91 - end,
93 - hl = function ( self )
94 - local mode = self.mode:sub( 1, 1 ) -- get only the first mode character
95 - return { fg = self.mode_colors[mode], bold = true }
96 - end,
98 - update = {
99 - 'ModeChanged',
100 - pattern = '*:*',
101 - callback = vim.schedule_wrap( function ()
102 - vim.cmd.redrawstatus()
103 - 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 = MiniIcons.get( 'file', filename )
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
123 - self.lfilename = NEW_FILE
124 - end
125 - end,
127 - flexible = 2,
129 - {
130 - provider = function ( self )
131 - return self.lfilename
132 - end,
133 - },
134 - {
135 - provider = function ( self )
136 - return vim.fs.normalize( vim.fn.pathshorten( self.lfilename ) )
137 - end,
138 - },
139 - }
141 - local file_flags = {
142 - {
143 - condition = function ()
144 - return vim.bo.modified
145 - end,
146 - provider = string.format( ' %s ', icon.modified ),
147 - hl = 'Comment',
148 - },
149 - {
150 - condition = function ()
151 - return not vim.bo.modifiable or vim.bo.readonly
152 - end,
153 - provider = string.format( ' %s ', icon.lock ),
154 - hl = 'ErrorMsg',
155 - },
156 - }
158 - local file_name_block = {
159 - init = function ( self )
160 - self.filename = vim.fs.normalize( vim.api.nvim_buf_get_name( 0 ) )
161 - end,
163 - file_icon,
164 - { provider = ' ' },
165 - file_name,
166 - file_flags,
167 - { provider = '%<' }, -- this means that the statusline is cut here when there's not enough space
168 - }
170 - local file_type = {
171 - provider = function ()
172 - return icon.file .. ' ' .. string.lower( vim.bo.filetype )
173 - end,
174 - }
176 - local file_encoding = {
177 - provider = function ()
178 - local enc = (vim.bo.fenc ~= '' and vim.bo.fenc) or vim.o.enc -- :h 'enc'
179 - return enc ~= 'utf-8' and enc:upper()
180 - end,
181 - }
183 - local file_format = {
184 - static = {
185 - dos = icon.newline .. icon.carriage_return,
186 - unix = icon.newline,
187 - mac = icon.carriage_return,
188 - },
189 - provider = function ( self )
190 - local fileformat = vim.bo.fileformat
191 - return self[fileformat]
192 - end,
193 - }
195 - local file_size = {
196 - provider = function ()
197 - -- stackoverflow, compute human readable file size
198 - -- i want to see vim opening a 1EiB file 󰱯
199 - local suffix = { 'b', 'k', 'M', 'G', 'T', 'P', 'E' }
200 - local fsize = vim.fn.getfsize( vim.api.nvim_buf_get_name( 0 ) )
201 - fsize = (fsize < 0 and 0) or fsize
202 - if fsize < 1024 then
203 - return fsize .. suffix[1]
204 - end
205 - local i = math.floor( (math.log( fsize ) / math.log( 1024 )) )
206 - return string.format( '%.2g%s', fsize / math.pow( 1024, i ), suffix[i + 1] )
207 - end,
208 - }
210 - local file_last_modified = {
211 - provider = function ()
212 - local ftime = vim.fn.getftime( vim.api.nvim_buf_get_name( 0 ) )
213 - if ftime > 0 then
214 - local timeago = require 'std.timeago'
215 - return timeago.format( ftime )
216 - end
217 - end,
218 - }
220 - local lsp_active = {
221 - condition = conditions.lsp_attached,
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 = {
234 - condition = conditions.has_diagnostics,
236 - static = {
237 - error_icon = icon.error,
238 - warn_icon = icon.warn,
239 - info_icon = icon.info,
240 - hint_icon = icon.hint,
241 - },
243 - init = function ( self )
244 - self.errors = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.ERROR } )
245 - self.warnings = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.WARN } )
246 - self.hints = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.HINT } )
247 - self.info = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.INFO } )
248 - end,
250 - update = { 'DiagnosticChanged', 'BufEnter', 'BufLeave' },
252 - {
253 - provider = function ( self )
254 - -- 0 is just another output, we can decide to print it or not!
255 - return self.errors > 0 and (self.error_icon .. ' ' .. self.errors .. ' ')
256 - end,
257 - hl = 'DiagnosticError',
258 - },
259 - {
260 - provider = function ( self )
261 - return self.warnings > 0 and (self.warn_icon .. ' ' .. self.warnings .. ' ')
262 - end,
263 - hl = 'DiagnosticWarn',
264 - },
265 - {
266 - provider = function ( self )
267 - return self.info > 0 and (self.info_icon .. ' ' .. self.info .. ' ')
268 - end,
269 - hl = 'DiagnosticInfo',
270 - },
271 - {
272 - provider = function ( self )
273 - return self.hints > 0 and (self.hint_icon .. ' ' .. self.hints)
274 - end,
275 - hl = 'DiagnosticHint',
276 - },
277 - }
279 - local is_svn_repo = function ()
280 - local svn_dir = vim.fs.find( '.svn', {
281 - upward = true,
282 - stop = vim.uv.os_homedir(),
283 - path = vim.fs.dirname( vim.api.nvim_buf_get_name( 0 ) ),
284 - type = 'directory',
285 - } )
287 - return not vim.tbl_isempty( svn_dir )
288 - end
290 - local svn_get_relative_url = function ()
291 - -- FIXME: replace with vim.system
292 - local job = require 'plenary.job'
293 - local relative_url = { '[ERR]' }
295 - job
296 - :new {
297 - command = 'svn',
298 - args = { 'info', '--show-item', 'relative-url', '--no-newline' },
299 - on_exit = function ( current_job, exit_code )
300 - if exit_code == 0 then
301 - relative_url = current_job:result()
302 - end
303 - end,
304 - }
305 - :sync()
307 - return relative_url[1]
308 - end
310 - local svn = {
311 - condition = is_svn_repo,
313 - update = 'BufEnter',
315 - init = function ( self )
316 - self.relative_url = svn_get_relative_url()
317 - end,
319 - {
320 - provider = function ( self )
321 - return icon.subversion .. ' ' .. icon.branch .. ' ' .. self.relative_url
322 - end,
323 - },
324 - }
326 - local git = {
327 - condition = conditions.is_git_repo,
329 - init = function ( self )
330 - self.status_dict = vim.b.minidiff_summary
331 - end,
333 - {
334 - provider = function ( self )
335 - return icon.git .. ' ' .. icon.branch .. ' ' .. self.status_dict.source_name .. ' '
336 - end,
337 - },
338 - {
339 - provider = function ( self )
340 - local count = self.status_dict.add or 0
341 - return count > 0 and (icon.diff_add .. ' ' .. count .. ' ')
342 - end,
343 - hl = 'DiffAdd',
344 - },
345 - {
346 - provider = function ( self )
347 - local count = self.status_dict.delete or 0
348 - return count > 0 and (icon.diff_remove .. ' ' .. count .. ' ')
349 - end,
350 - hl = 'DiffDelete',
351 - },
352 - {
353 - provider = function ( self )
354 - local count = self.status_dict.change or 0
355 - return count > 0 and (icon.diff_change .. ' ' .. count .. ' ')
356 - end,
357 - hl = 'DiffChange',
358 - },
359 - }
361 - local work_dir = {
362 - init = function ( self )
363 - self.icon = (vim.fn.haslocaldir( 0 ) == 1 and icon['local'] or '') .. ' ' .. icon.global .. ' '
364 - self.cwd = vim.fs.normalize( vim.uv.cwd() ):gsub( vim.fs.normalize( vim.uv.os_homedir() ), '~' )
365 - end,
367 - flexible = 1,
369 - {
370 - provider = function ( self )
371 - return self.icon .. self.cwd
372 - end,
373 - },
374 - {
375 - provider = function ( self )
376 - local cwd = vim.fn.pathshorten( self.cwd )
377 - return self.icon .. cwd
378 - end,
379 - },
380 - {
381 - provider = '',
382 - },
383 - }
385 - local help_file_name = {
386 - condition = function ()
387 - return vim.bo.filetype == 'help'
388 - end,
389 - provider = function ()
390 - local filename = vim.api.nvim_buf_get_name( 0 )
391 - return vim.fn.fnamemodify( filename, ':t' )
392 - end,
393 - hl = 'Question',
394 - }
396 - local terminal_name = {
397 - provider = function ()
398 - local name, _ = vim.api.nvim_buf_get_name( 0 ):gsub( '.*:', '' )
399 - local basename = vim.fs.basename( name )
400 - return icon.terminal .. ' ' .. (basename or 'noname')
401 - end,
402 - hl = 'Bold',
403 - }
405 - local macro_recording = {
406 - condition = function ()
407 - return vim.fn.reg_recording() ~= '' and vim.o.cmdheight == 0
408 - end,
409 - provider = icon.macro .. ' ',
410 - hl = 'PreProc',
411 - utils.surround( { '░▒▓ ', ' ▓▒░' }, nil, {
412 - provider = function ()
413 - return vim.fn.reg_recording()
414 - end,
415 - hl = 'Bold',
416 - } ),
417 - update = {
418 - 'RecordingEnter',
419 - 'RecordingLeave',
420 - },
421 - }
423 - local align = { provider = '%=' }
424 - local space = { provider = ' ' }
426 - local default_statusline = {
427 - vi_mode,
428 - macro_recording,
429 - work_dir,
430 - space,
431 - git,
432 - svn,
433 - align,
434 - diagnostic,
435 - align,
436 - space,
437 - space,
438 - lsp_active,
439 - space,
440 - file_encoding,
441 - space,
442 - file_format,
443 - space,
444 - file_type,
445 - space,
446 - file_size,
447 - space,
448 - file_last_modified,
449 - }
451 - local special_statusline = {
452 - condition = function ()
453 - return conditions.buffer_matches {
454 - buftype = ignored.buftypes,
455 - filetype = ignored.filetypes,
456 - }
457 - end,
459 - file_type,
460 - space,
461 - help_file_name,
462 - align,
463 - }
465 - local terminal_statusline = {
467 - condition = function ()
468 - return conditions.buffer_matches { buftype = { 'terminal' } }
469 - end,
471 - { condition = conditions.is_active, vi_mode, space },
472 - file_type,
473 - space,
474 - terminal_name,
475 - align,
476 - }
478 - local inactive_statusline = {
479 - condition = conditions.is_not_active,
480 - file_type,
481 - space,
482 - file_name,
483 - align,
484 - }
486 - local statuslines = {
487 - hl = function ()
488 - if conditions.is_active() then
489 - return 'StatusLine'
490 - else
491 - return 'StatusLineNC'
492 - end
493 - end,
495 - fallthrough = false,
497 - special_statusline,
498 - terminal_statusline,
499 - inactive_statusline,
500 - default_statusline,
501 - }
503 - local winbars = {
504 - hl = function ()
505 - if conditions.is_active() then
506 - return 'Winbar'
507 - else
508 - return 'WinbarNC'
509 - end
510 - end,
512 - fallthrough = false,
514 - {
515 - condition = function ()
516 - return conditions.buffer_matches { buftype = { 'terminal' } }
517 - end,
519 - space,
520 - file_type,
521 - space,
522 - terminal_name,
523 - },
525 - {
526 - file_name_block,
527 - },
528 - }
530 - local tabpage = {
531 - provider = function ( self )
532 - return '%' .. self.tabnr .. 'T ' .. self.tabpage .. ' %T'
533 - end,
534 - hl = function ( self )
535 - if self.is_active then
536 - return 'TabLineSel'
537 - else
538 - return 'TabLine'
539 - end
540 - end,
541 - }
543 - local tab_pages = {
544 - { provider = '%=' },
545 - utils.make_tablist( tabpage ),
546 - }
548 - heirline.setup {
549 - statusline = statuslines,
550 - winbar = winbars,
551 - tabline = tab_pages,
553 - opts = {
554 - colors = nugu,
555 - disable_winbar_cb = function ( args )
556 - return conditions.buffer_matches( {
557 - buftype = ignored.buftypes,
558 - filetype = ignored.filetypes,
559 - }, args.buf )
560 - end,
561 - },
562 - }
563 - end,
564 - },

neovim/lua/bugabinga/plugins/surround.lua

Deleted
deleted file mode 100644
1 -return {
2 - 'kylechui/nvim-surround',
3 - event = 'VeryLazy',
4 - version = '2.*',
5 - opts = {
6 - -- setting key maps for this plugin is pretty intricate.
7 - -- normally I would set them myself, but in this case not...
8 - keymaps = {
9 - insert = '<C-g>s',
10 - insert_line = '<C-g>S',
12 - normal = 'sa',
13 - normal_line = 'sA',
14 - normal_cur = 'sc',
15 - normal_cur_line = 'sC',
17 - visual = 'sa',
18 - visual_line = 'sA',
20 - delete = 'sd',
22 - change = 'sr',
23 - change_line = 'sR',
24 - },
25 - surrounds = {
26 - ['R'] = {
27 - add = { "require '", "'" },
28 - find = "require%b''",
29 - --FIXME: find out how to craft these, those cannot be correct right now
30 - delete = "^(require')().-(')()$",
31 - change = {
32 - target = "^(require')().-('()$",
33 - },
34 - },
35 - ['P'] = {
36 - add = { 'vim.print(', ')' },
37 - find = 'vim%.print%b()',
38 - delete = '^(vim%.print%()().-(%))()$',
39 - change = {
40 - target = '^(vim%.print%()().-(%))()$',
41 - },
42 - },
43 - },
44 - },
45 - dependencies = {
46 - 'nvim-treesitter/nvim-treesitter',
47 - },
48 -}

neovim/lua/bugabinga/plugins/textobjects.lua.todo

Deleted
deleted file mode 100644
1 -return {
2 - 'nvim-treesitter/nvim-treesitter-textobjects',
3 - branch = 'master',
4 - event = 'VeryLazy',
5 - dependencies = 'nvim-treesitter/nvim-treesitter',
6 - config = function ()
7 - ---@diagnostic disable-next-line: missing-fields
8 - require 'nvim-treesitter.configs'.setup {
9 - textobjects = {
10 - select = {
11 - enable = true,
12 - lookahead = true,
13 - keymaps = {
14 - ['af'] = { query = '@call.outer', desc = 'outer function call' },
15 - ['if'] = { query = '@call.inner', desc = 'inner function call' },
17 - ['am'] = { query = '@function.outer', desc = 'outer function definition' },
18 - ['im'] = { query = '@function.inner', desc = 'inner function definition' },
20 - ['ai'] = { query = '@conditional.outer', desc = 'outer conditional' },
21 - ['ii'] = { query = '@conditional.inner', desc = 'inner conditional' },
23 - ['aa'] = { query = '@parameter.outer', desc = 'outer parameter' },
24 - ['ia'] = { query = '@parameter.inner', desc = 'inner parameter' },
26 - ['ac'] = { query = '@comment.outer', desc = 'outer comment' },
27 - ['ic'] = { query = '@comment.inner', desc = 'inner comment' },
29 - ['aS'] = { query = '@statement.outer', desc = 'outer statement' },
30 - ['iS'] = { query = '@statement.inner', desc = 'inner statement' },
32 - -- Nushell only
33 - ['aP'] = { query = '@pipeline.outer', desc = 'outer pipeline' },
34 - ['iP'] = { query = '@pipeline.inner', desc = 'inner pipeline' },
35 - },
36 - selection_modes = {
37 - ['@parameter.outer'] = 'v',
38 - ['@function.outer'] = 'v',
39 - ['@class.outer'] = '<c-v>',
40 - ['@scope'] = 'v',
41 - },
42 - include_surroundig_whitespace = true,
43 - },
45 - move = {
46 - enable = true,
47 - set_jumps = true,
48 - goto_next = {
49 - [']m'] = { query = '@function.outer', desc = 'goto next function definition' },
50 - },
51 - goto_previous = {
52 - ['[m'] = { query = '@function.outer', desc = 'goto previous function definition' },
53 - },
54 - },
55 - },
56 - }
57 - end,
58 -}

neovim/lua/bugabinga/plugins/treesj.lua

Deleted
deleted file mode 100644
1 -local map = require 'std.map'
3 -map.normal {
4 - description = 'Toggle Tree Join/Split',
5 - category = 'editing',
6 - keys = '<leader>j',
7 - command = function ()
8 - prequire 'treesj'.toggle { split = { recursive = false } }
9 - end,
10 -}
12 -map.normal {
13 - description = 'Join Tree',
14 - category = 'editing',
15 - keys = '<leader>jj',
16 - command = function ()
17 - prequire 'treesj'.join()
18 - end,
19 -}
21 -map.normal {
22 - description = 'Split Tree',
23 - category = 'editing',
24 - keys = '<leader>js',
25 - command = function ()
26 - prequire 'treesj'.split()
27 - end,
28 -}
30 -return {
31 - 'Wansmer/treesj',
32 - dependencies = { 'nvim-treesitter/nvim-treesitter' },
33 - opts = {
34 - use_default_keymaps = false,
35 - max_join_length = 360,
36 - },
37 -}

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

Deleted
deleted file mode 100644
1 -local ignored = require 'std.ignored'
2 -local icon = require 'std.icon'
4 -return {
5 - 'lukas-reineke/virt-column.nvim',
6 - version = '2.*',
7 - event = 'VeryLazy',
8 - opts = {
9 - char = { icon.vertical_bar },
10 - exclude = {
11 - filetypes = ignored.filetypes,
12 - buftypes = ignored.buftypes,
13 - },
14 - },
15 -}

neovim/lua/bugabinga/specs.lua

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

neovim/lua/bugabinga/statusbar.lua

Added
new 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,
124 + provider = function ( self )
125 + return self.lfilename
126 + end,
127 + },
129 + provider = function ( self )
130 + return vim.fs.normalize( vim.fn.pathshorten( self.lfilename ) )
131 + end,
132 + },
135 +local file_flags = {
137 + condition = function ()
138 + return vim.bo.modified
139 + end,
140 + provider = string.format( ' %s ', icon.modified ),
141 + hl = 'Comment',
142 + },
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' },
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 + },
254 + provider = function ( self )
255 + return self.warnings > 0 and (self.warn_icon .. ' ' .. self.warnings .. ' ')
256 + end,
257 + hl = 'DiagnosticWarn',
258 + },
260 + provider = function ( self )
261 + return self.info > 0 and (self.info_icon .. ' ' .. self.info .. ' ')
262 + end,
263 + hl = 'DiagnosticInfo',
264 + },
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 + -- FIXME: replace with vim.system
286 + local job = require 'plenary.job'
287 + local relative_url = { '[ERR]' }
289 + job
290 + :new {
291 + command = 'svn',
292 + args = { 'info', '--show-item', 'relative-url', '--no-newline' },
293 + on_exit = function ( current_job, exit_code )
294 + if exit_code == 0 then
295 + relative_url = current_job:result()
296 + end
297 + end,
299 + :sync()
301 + return relative_url[1]
302 +end
304 +local svn = {
305 + condition = is_svn_repo,
307 + update = 'BufEnter',
309 + init = function ( self )
310 + self.relative_url = svn_get_relative_url()
311 + end,
314 + provider = function ( self )
315 + return icon.subversion .. ' ' .. icon.branch .. ' ' .. self.relative_url
316 + end,
317 + },
320 +local git = {
321 + condition = conditions.is_git_repo,
323 + init = function ( self )
324 + self.status_dict = vim.b.minidiff_summary
325 + end,
328 + provider = function ( self )
329 + return icon.git .. ' ' .. icon.branch .. ' ' .. self.status_dict.source_name .. ' '
330 + end,
331 + },
333 + provider = function ( self )
334 + local count = self.status_dict.add or 0
335 + return count > 0 and (icon.diff_add .. ' ' .. count .. ' ')
336 + end,
337 + hl = 'DiffAdd',
338 + },
340 + provider = function ( self )
341 + local count = self.status_dict.delete or 0
342 + return count > 0 and (icon.diff_remove .. ' ' .. count .. ' ')
343 + end,
344 + hl = 'DiffDelete',
345 + },
347 + provider = function ( self )
348 + local count = self.status_dict.change or 0
349 + return count > 0 and (icon.diff_change .. ' ' .. count .. ' ')
350 + end,
351 + hl = 'DiffChange',
352 + },
355 +local work_dir = {
356 + init = function ( self )
357 + self.icon = (vim.fn.haslocaldir( 0 ) == 1 and icon['local'] or '') .. ' ' .. icon.global .. ' '
358 + self.cwd = vim.fs.normalize( vim.uv.cwd() ):gsub( vim.fs.normalize( vim.uv.os_homedir() ), '~' )
359 + end,
361 + flexible = 1,
364 + provider = function ( self )
365 + return self.icon .. self.cwd
366 + end,
367 + },
369 + provider = function ( self )
370 + local cwd = vim.fn.pathshorten( self.cwd )
371 + return self.icon .. cwd
372 + end,
373 + },
375 + provider = '',
376 + },
379 +local help_file_name = {
380 + condition = function ()
381 + return vim.bo.filetype == 'help'
382 + end,
383 + provider = function ()
384 + local filename = vim.api.nvim_buf_get_name( 0 )
385 + return vim.fn.fnamemodify( filename, ':t' )
386 + end,
387 + hl = 'Question',
390 +local terminal_name = {
391 + provider = function ()
392 + local name, _ = vim.api.nvim_buf_get_name( 0 ):gsub( '.*:', '' )
393 + local basename = vim.fs.basename( name )
394 + return icon.terminal .. ' ' .. (basename or 'noname')
395 + end,
396 + hl = 'Bold',
399 +local macro_recording = {
400 + condition = function ()
401 + return vim.fn.reg_recording() ~= '' and vim.o.cmdheight == 0
402 + end,
403 + provider = icon.macro .. ' ',
404 + hl = 'PreProc',
405 + utils.surround( { '░▒▓ ', ' ▓▒░' }, nil, {
406 + provider = function ()
407 + return vim.fn.reg_recording()
408 + end,
409 + hl = 'Bold',
410 + } ),
411 + update = {
412 + 'RecordingEnter',
413 + 'RecordingLeave',
414 + },
417 +local align = { provider = '%=' }
418 +local space = { provider = ' ' }
420 +local default_statusline = {
421 + vi_mode,
422 + macro_recording,
423 + work_dir,
424 + space,
425 + git,
426 + svn,
427 + align,
428 + diagnostic,
429 + align,
430 + space,
431 + space,
432 + lsp_active,
433 + space,
434 + file_encoding,
435 + space,
436 + file_format,
437 + space,
438 + file_type,
439 + space,
440 + file_size,
441 + space,
442 + file_last_modified,
445 +local special_statusline = {
446 + condition = function ()
447 + return conditions.buffer_matches {
448 + buftype = ignored.buftypes,
449 + filetype = ignored.filetypes,
451 + end,
453 + file_type,
454 + space,
455 + help_file_name,
456 + align,
459 +local terminal_statusline = {
461 + condition = function ()
462 + return conditions.buffer_matches { buftype = { 'terminal' } }
463 + end,
465 + { condition = conditions.is_active, vi_mode, space },
466 + file_type,
467 + space,
468 + terminal_name,
469 + align,
472 +local inactive_statusline = {
473 + condition = conditions.is_not_active,
474 + file_type,
475 + space,
476 + file_name,
477 + align,
480 +local statuslines = {
481 + hl = function ()
482 + if conditions.is_active() then
483 + return 'StatusLine'
484 + else
485 + return 'StatusLineNC'
486 + end
487 + end,
489 + fallthrough = false,
491 + special_statusline,
492 + terminal_statusline,
493 + inactive_statusline,
494 + default_statusline,
497 +local winbars = {
498 + hl = function ()
499 + if conditions.is_active() then
500 + return 'Winbar'
501 + else
502 + return 'WinbarNC'
503 + end
504 + end,
506 + fallthrough = false,
509 + condition = function ()
510 + return conditions.buffer_matches { buftype = { 'terminal' } }
511 + end,
513 + space,
514 + file_type,
515 + space,
516 + terminal_name,
517 + },
520 + file_name_block,
521 + },
524 +local tabpage = {
525 + provider = function ( self )
526 + return '%' .. self.tabnr .. 'T ' .. self.tabpage .. ' %T'
527 + end,
528 + hl = function ( self )
529 + if self.is_active then
530 + return 'TabLineSel'
531 + else
532 + return 'TabLine'
533 + end
534 + end,
537 +local tab_pages = {
538 + { provider = '%=' },
539 + utils.make_tablist( tabpage ),
542 +heirline.setup {
543 + statusline = statuslines,
544 + winbar = winbars,
545 + tabline = tab_pages,
547 + opts = {
548 + colors = nugu,
549 + disable_winbar_cb = function ( args )
550 + return conditions.buffer_matches( {
551 + buftype = ignored.buftypes,
552 + filetype = ignored.filetypes,
553 + }, args.buf )
554 + end,
555 + },

neovim/lua/bugabinga/surround.lua

Added
new file mode 100644
1 +local puk = require 'std.puk'
3 +puk.defer 'nvim-surround' (function(surround)
4 + surround.setup {
5 + -- setting key maps for this plugin is pretty intricate.
6 + -- normally I would set them myself, but in this case not...
7 + keymaps = {
8 + insert = '<C-g>s',
9 + insert_line = '<C-g>S',
11 + normal = 'sa',
12 + normal_line = 'sA',
13 + normal_cur = 'sc',
14 + normal_cur_line = 'sC',
16 + visual = 'sa',
17 + visual_line = 'sA',
19 + delete = 'sd',
21 + change = 'sr',
22 + change_line = 'sR',
23 + },
24 + }
25 +end)

neovim/lua/bugabinga/textobjects.lua

Added
new file mode 100644
1 +local puk = require 'std.puk'
2 +local map = require 'std.map'
4 +local textobject_select_keymaps = {
5 + ['af'] = { query = '@call.outer', description = 'outer function call' },
6 + ['if'] = { query = '@call.inner', description = 'inner function call' },
8 + ['am'] = { query = '@function.outer', description = 'outer function definition' },
9 + ['im'] = { query = '@function.inner', description = 'inner function definition' },
11 + ['ai'] = { query = '@conditional.outer', description = 'outer conditional' },
12 + ['ii'] = { query = '@conditional.inner', description = 'inner conditional' },
14 + ['aa'] = { query = '@parameter.outer', description = 'outer parameter' },
15 + ['ia'] = { query = '@parameter.inner', description = 'inner parameter' },
17 + ['ac'] = { query = '@comment.outer', description = 'outer comment' },
18 + ['ic'] = { query = '@comment.inner', description = 'inner comment' },
21 +for keys, maps in pairs(textobject_select_keymaps) do
22 + map.visual.operator_pending {
23 + description = maps.description,
24 + category = 'operator',
25 + keys = keys,
26 + command = function()
27 + require 'nvim-treesitter-textobjects.select'.select_textobject(maps.query, 'textobjects')
28 + end,
29 + }
30 +end
32 +map.normal {
33 + description = 'swap inner parameter',
34 + category = 'operator',
35 + keys = '<M-l>',
36 + command = function()
37 + require 'nvim-treesitter-textobjects.swap'.swap_next '@parameter.inner'
38 + end,
41 +map.normal {
42 + description = 'swap outer parameter',
43 + category = 'operator',
44 + keys = '<M-h>',
45 + command = function()
46 + require 'nvim-treesitter-textobjects.swap'.swap_previous '@parameter.outer'
47 + end,
50 +local textobject_move_keymaps = {
51 + ['m'] = { query = '@function.outer', description = 'to %s function definition' },
52 + ['i'] = { query = '@conditional.outer', description = 'to %s conditional' },
53 + ['a'] = { query = '@parameter.outer', description = 'to %s parameter' },
56 +for keys, maps in pairs(textobject_move_keymaps) do
57 + map.normal.visual.operator_pending {
58 + description = string.format(maps.description, 'next'),
59 + category = 'operator',
60 + keys = ']' .. keys,
61 + command = function()
62 + require 'nvim-treesitter-textobjects.move'.goto_next(maps.query, 'textobjects')
63 + end,
64 + }
65 + map.normal.visual.operator_pending {
66 + description = string.format(maps.description, 'previous'),
67 + category = 'operator',
68 + keys = '[' .. keys,
69 + command = function()
70 + require 'nvim-treesitter-textobjects.move'.goto_previous(maps.query, 'textobjects')
71 + end,
72 + }
73 +end
75 +puk.defer 'nvim-treesitter-textobjects' (function(textobjects)
76 + textobjects.setup {
77 + select = {
78 + -- Automatically jump forward to textobj, similar to targets.vim
79 + lookahead = true,
80 + -- You can choose the select mode (default is charwise 'v')
81 + --
82 + -- Can also be a function which gets passed a table with the keys
83 + -- * query_string: eg '@function.inner'
84 + -- * method: eg 'v' or 'o'
85 + -- and should return the mode ('v', 'V', or '<c-v>') or a table
86 + -- mapping query_strings to modes.
87 + selection_modes = {
88 + ['@parameter.outer'] = 'v', -- charwise
89 + ['@function.outer'] = 'V', -- linewise
90 + ['@class.outer'] = '<c-v>', -- blockwise
91 + },
92 + -- If you set this to `true` (default is `false`) then any textobject is
93 + -- extended to include preceding or succeeding whitespace. Succeeding
94 + -- whitespace has priority in order to act similarly to eg the built-in
95 + -- `ap`.
96 + --
97 + -- Can also be a function which gets passed a table with the keys
98 + -- * query_string: eg '@function.inner'
99 + -- * selection_mode: eg 'v'
100 + -- and should return true of false
101 + include_surrounding_whitespace = false,
102 + },
104 + move = {
105 + -- whether to set jumps in the jumplist
106 + set_jumps = true,
107 + },
109 +end)

neovim/lua/bugabinga/treesitter.lua

Modified
1 +local puk = require 'std.puk'
1 2 local auto = require 'std.auto'
2 3 local ignored = require 'std.ignored'
3 4 local table = require 'std.table'
6 +require 'bugabinga.health'.add_dependency
7 +{ name_of_executable = 'zig' }
8 + { name = 'TreeSitter CLI', name_of_executable = 'tree-sitter' }
9 + { name_of_executable = 'tar' }
10 + { name_of_executable = 'curl' }
12 +local treesitter = puk 'nvim-treesitter'
13 +treesitter.setup {}
5 15 auto 'look_for_treesitter_parser' {
6 16 description = 'Try loading a treesitter parser, if available.',
7 17 events = 'FileType',
8 18 pattern = '*',
9 - command = function ( data )
19 + command = function(data)
10 20 local match = data.match
11 - if table.contains( ignored.filetypes, match ) then
12 - vim.notify( 'Ingore ' .. match .. ' for treesitter.' )
21 + if table.contains(ignored.filetypes, match) then
22 + vim.notify('Ingore ' .. match .. ' for treesitter.')
13 23 return
15 25 -- try highlights
16 - local ok, err = pcall( vim.treesitter.start )
26 + local ok, err = pcall(vim.treesitter.start)
17 27 if not ok then
18 28 local available = require 'nvim-treesitter.parsers'
19 29 local potential_parser = available[match]
20 30 if potential_parser then
21 - vim.notify( 'Found potential treesitter parser for current filetype. Trying to install it. ' .. match )
22 - -- TSInstall/TSUpdate seems borked?
23 - -- vim.cmd.TSInstall( match )
31 + vim.notify('Found potential treesitter parser for current filetype. Trying to install it. ' .. match)
32 + vim.cmd.TSInstall(match)
33 + require 'nvim-treesitter.install'.install(match, { force = false }, function()
34 + vim.treesitter.start()
35 + -- vim.cmd.edit()
36 + end)
24 37 else
25 - vim.notify( err, vim.log.levels.ERROR )
38 + vim.notify(err, vim.log.levels.ERROR)
27 40 return
32 45 vim.wo.foldexpr = 'v:lua.vim.treesitter.foldexpr()'
33 46 end,
36 --- old code from nvim-treesitter master
37 ---
38 --- if config.auto_install then
39 --- vim.api.nvim_create_autocmd('FileType', {
40 --- callback = function(args)
41 --- local buf = args.buf --- @type integer
42 --- local ft = vim.bo[buf].filetype
43 --- local lang = vim.treesitter.language.get_lang(ft) or ft
44 --- if
45 --- require('nvim-treesitter.parsers')[lang]
46 --- and not vim.list_contains(M.installed_parsers(), lang)
47 --- and not vim.list_contains(config.ignore_install, lang)
48 --- then
49 --- require('nvim-treesitter.install').install(lang, nil, function()
50 --- -- Need to pcall since 'FileType' can be triggered multiple times
51 --- -- per buffer
52 --- pcall(vim.treesitter.start, buf, lang)
53 --- end)
54 --- end
55 --- end,
56 --- })
57 --- end

neovim/lua/bugabinga/virtual_column.lua

Added
new file mode 100644
1 +local puk = require 'std.puk'
2 +local ignored = require 'std.ignored'
3 +local icon = require 'std.icon'
5 +puk.defer 'virt-column' (function(virt_column)
6 + virt_column.setup {
7 + char = { icon.vertical_bar },
8 + exclude = {
9 + filetypes = ignored.filetypes,
10 + buftypes = ignored.buftypes,
11 + },
12 + }
13 +end)

neovim/lua/std/auto.lua

Modified
10 10 list_of_autocommands = { list_of_autocommands, }
12 12 for _, autocommand in pairs( list_of_autocommands ) do
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 + }
13 22 -- command and callback are mutually exclusive.
14 23 -- one of them has to be nil
15 24 local command = nil

neovim/lua/std/defer.lua

Deleted
deleted file mode 100644
1 --- taken from https://gist.github.com/runiq/31aa5c4bf00f8e0843cd267880117201
3 -local _ = {}
5 ----Validates args for `throttle()` and `debounce()`.
6 -local function td_validate( fn, ms )
7 - vim.validate {
8 - fn = { fn, 'f' },
9 - ms = {
10 - ms,
11 - function ( ms )
12 - return type( ms ) == 'number' and ms > 0
13 - end,
14 - 'number > 0',
15 - },
16 - }
17 -end
19 ---- Throttles a function on the leading edge. Automatically `schedule_wrap()`s.
20 ----
21 ---@param fn (function) Function to throttle
22 ---@param timeout (number) Timeout in ms
23 ---@returns (function, timer) throttled function and timer. Remember to call
24 ----`timer:close()` at the end or you will leak memory!
25 -function _.throttle_leading( fn, ms )
26 - td_validate( fn, ms )
27 - local timer = vim.loop.new_timer()
28 - local running = false
30 - local function wrapped_fn( ... )
31 - if not running then
32 - timer:start( ms, 0, function ()
33 - running = false
34 - end )
35 - running = true
36 - pcall( vim.schedule_wrap( fn ), select( 1, ... ) )
37 - end
38 - end
39 - return wrapped_fn, timer
40 -end
42 ---- Throttles a function on the trailing edge. Automatically
43 ---- `schedule_wrap()`s.
44 ----
45 ---@param fn (function) Function to throttle
46 ---@param timeout (number) Timeout in ms
47 ---@param last (boolean, optional) Whether to use the arguments of the last
48 ----call to `fn` within the timeframe. Default: Use arguments of the first call.
49 ---@returns (function, timer) Throttled function and timer. Remember to call
50 ----`timer:close()` at the end or you will leak memory!
51 -function _.throttle_trailing( fn, ms, last )
52 - td_validate( fn, ms )
53 - local timer = vim.loop.new_timer()
54 - local running = false
56 - local wrapped_fn
57 - if not last then
58 - function wrapped_fn( ... )
59 - if not running then
60 - local argv = { ... }
61 - local argc = select( '#', ... )
63 - timer:start( ms, 0, function ()
64 - running = false
65 - pcall( vim.schedule_wrap( fn ), unpack( argv, 1, argc ) )
66 - end )
67 - running = true
68 - end
69 - end
70 - else
71 - local argv, argc
72 - function wrapped_fn( ... )
73 - argv = { ... }
74 - argc = select( '#', ... )
76 - if not running then
77 - timer:start( ms, 0, function ()
78 - running = false
79 - pcall( vim.schedule_wrap( fn ), unpack( argv, 1, argc ) )
80 - end )
81 - running = true
82 - end
83 - end
84 - end
85 - return wrapped_fn, timer
86 -end
88 ---- Debounces a function on the leading edge. Automatically `schedule_wrap()`s.
89 ----
90 ---@param fn (function) Function to debounce
91 ---@param timeout (number) Timeout in ms
92 ---@returns (function, timer) Debounced function and timer. Remember to call
93 ----`timer:close()` at the end or you will leak memory!
94 -function _.debounce_leading( fn, ms )
95 - td_validate( fn, ms )
96 - local timer = vim.loop.new_timer()
97 - local running = false
99 - local function wrapped_fn( ... )
100 - timer:start( ms, 0, function ()
101 - running = false
102 - end )
104 - if not running then
105 - running = true
106 - pcall( vim.schedule_wrap( fn ), select( 1, ... ) )
107 - end
108 - end
109 - return wrapped_fn, timer
110 -end
112 ---- Debounces a function on the trailing edge. Automatically
113 ---- `schedule_wrap()`s.
114 ----
115 ---@param fn (function) Function to debounce
116 ---@param timeout (number) Timeout in ms
117 ---@param first (boolean, optional) Whether to use the arguments of the first
118 ----call to `fn` within the timeframe. Default: Use arguments of the last call.
119 ---@returns (function, timer) Debounced function and timer. Remember to call
120 ----`timer:close()` at the end or you will leak memory!
121 -function _.debounce_trailing( fn, ms, first )
122 - td_validate( fn, ms )
123 - local timer = vim.loop.new_timer()
124 - local wrapped_fn
126 - if not first then
127 - function wrapped_fn( ... )
128 - local argv = { ... }
129 - local argc = select( '#', ... )
131 - timer:start( ms, 0, function ()
132 - pcall( vim.schedule_wrap( fn ), unpack( argv, 1, argc ) )
133 - end )
134 - end
135 - else
136 - local argv, argc
137 - function wrapped_fn( ... )
138 - argv = argv or { ... }
139 - argc = argc or select( '#', ... )
141 - timer:start( ms, 0, function ()
142 - pcall( vim.schedule_wrap( fn ), unpack( argv, 1, argc ) )
143 - end )
144 - end
145 - end
146 - return wrapped_fn, timer
147 -end
149 ---- Test deferment methods (`{throttle,debounce}_{leading,trailing}()`).
150 ----
151 ---@param bouncer (string) Bouncer function to test
152 ---@param ms (number, optional) Timeout in ms, default 2000.
153 ---@param firstlast (bool, optional) Whether to use the 'other' fn call
154 ----strategy.
155 -function _.test_defer( bouncer, ms, firstlast )
156 - local bouncers = {
157 - tl = _.throttle_leading,
158 - tt = _.throttle_trailing,
159 - dl = _.debounce_leading,
160 - dt = _.debounce_trailing,
161 - }
163 - local timeout = ms or 2000
165 - local bounced = bouncers[bouncer](
166 - function ( i ) vim.cmd( 'echom "' .. bouncer .. ': ' .. i .. '"' ) end,
167 - timeout,
168 - firstlast
169 - )
171 - for i, _ in ipairs { 1, 2, 3, 4, 5 } do
172 - bounced( i )
173 - vim.schedule( function () vim.cmd( 'echom ' .. i ) end )
174 - vim.fn.call( 'wait', { 1000, 'v:false' } )
175 - end
176 -end
178 -return _

neovim/lua/std/ignored.lua

Modified
4 4 -- TODO: add functions to add stuff to lists so that plugins can register these
5 5 -- and they get cleaned up when plugins get removed
6 6 local filetypes = {
7 7 'Outline',
8 8 'WhichKey',
9 9 '^git.*',
10 + 'bigfile',
10 11 'help',
11 12 'ivy',
12 13 'lazy',
22 23 'nofile',
25 -local as_kv = function ( list )
26 +local as_kv = function(list)
26 27 local tbl = {}
27 - for _, value in ipairs( list ) do
28 + for _, value in ipairs(list) do
28 29 vim.validate { value = { value, 'string' } }
29 30 tbl[value] = true
31 32 return tbl
34 -local filetypes_kv = as_kv( filetypes )
35 -local buftypes_kv = as_kv( buftypes )
35 +local filetypes_kv = as_kv(filetypes)
36 +local buftypes_kv = as_kv(buftypes)
37 38 return {
38 39 filetypes = filetypes,

neovim/lua/std/puk.lua

Modified
1 1 local load_pack = function ( plugin_name )
2 2 vim.validate( 'plugin_name', plugin_name, 'string' )
4 - local ok, err = pcall( vim.cmd.packadd, { plugin_name, bang = true } )
5 - if not ok then
6 - vim.notify( 'Unable to load package ' .. plugin_name .. '!\nReason: ' .. err, vim.log.levels.ERROR )
7 - return
8 - else
9 - vim.notify( 'loaded package ' .. plugin_name .. '.' )
10 - end
12 - local found, plugin = pcall( require, plugin_name )
13 - if not found then
14 - vim.notify( 'Unable to find plugin ' .. plugin_name .. '!\nReason: ' .. plugin, vim.log.levels.ERROR )
15 - return
16 - else
17 - vim.notify( 'loaded plugin ' .. plugin_name .. '.' )
18 - end
20 - return plugin
3 + vim.cmd.packadd { plugin_name, bang = true }
4 + return require( plugin_name )
23 -local puk = setmetatable(
7 +return setmetatable(
25 - defer = vim.schedule_wrap( function ( plugin_name )
26 - return function ( f )
9 + defer = function ( plugin_name )
10 + return vim.schedule_wrap(function ( f )
27 11 f( load_pack( plugin_name ) )
28 - end
29 - end ),
12 + end)
13 + end ,
32 16 __call = function ( _, plugin_name )
33 17 return load_pack( plugin_name )
34 18 end,
35 - } )
37 -return puk
19 + }

neovim/puk.nu

Modified
1 1 #!/usr/bin/env nu
3 -# TODO:
4 -# XXX use rss feeds of forges to find latest commit
3 +# TODO: reimplement in lua?
6 5 # an out-of-band plugin manager for neovim.
7 6 # cannot do a lot, compared to "normal" neovim plugin managers, but:
18 17 $plugin_specs | par-each { install-spec $in $plugins_path $cache_path }
19 18 print 'Cleaning plugins, that are not part of puk.plugins.nuon.'
20 19 clean-plugins $plugins_path $plugin_specs
20 + # plugins need to be packedded before helptagscan be generated
21 21 print 'Generating helptags.'
22 22 nvim --headless -u NONE +'helptags ALL' +q
100 100 let feed = generate-commit-feed-url $spec
101 101 let commit = match $spec.source {
102 102 github => {
103 - http get $feed | lines | parse --regex "Commit/(?<commit>[a-z0-9]+)" | first | get commit
103 + # http get $feed | lines | parse --regex "Commit/(?<commit>[a-z0-9]+)" | first | get commit
104 + curl --silent --location $feed | lines | parse --regex "Commit/(?<commit>[a-z0-9]+)" | first | get commit
105 106 codeberg => { 'TODO' },
106 107 srht => { 'TODO' },
175 176 let tmp_path = mktemp --directory
176 177 # hopefully strip-componets works on win32 as well
177 - run-external tar '--extract' '--file' $archive_path '--directory' $tmp_path '--strip-components=1'
178 + print $archive_path $tmp_path
179 + tar --extract --file $archive_path --directory $tmp_path --strip-components=1
179 181 if $spec.build != null {
180 182 print $"Build step for plugin ($spec.name) detected! Executing now..."

neovim/puk.plugins.nuon

Modified
11 11 lspconfig,
12 12 github,
13 13 neovim/nvim-lspconfig,
14 - main,
15 - "1aa9f36b6d542dafc0b4a38c48969d036003b00a",
14 + master,
15 + "47f236c058f0511702286a21ba53bbf42abbd8a8",
20 20 github,
21 21 nvim-treesitter/nvim-treesitter,
22 22 main,
23 - "c4a22ce846d8c15cfe86469ef557d5b9860ab535",
23 + "75904bdff7da13cb54e05f53f25f25a924fe28a6",
25 25 nvim,
26 26 --headless,
27 + -u,
28 + NONE,
27 29 "+\"packadd nvim-treesitter\"",
28 30 "+\":TSUpdate",
50 52 github,
51 53 "stevearc/oil.nvim",
52 54 master,
53 - "3c2de37accead0240fbe812f5ccdedfe0b973557",
55 + "9a59256c8e88b29d2150e99b5960b2f111e51f75",
57 - blink.cmp,
59 + "blink.cmp",
58 60 github,
59 61 "Saghen/blink.cmp",
60 62 main,
61 - "7ceff61595aae682b421a68e208719b1523c7b44",
63 + "765ee4cfb6d71e9d88a27f64f406251f3aa85fac",
63 65 cargo,
64 66 build,
98 100 github,
99 101 "stevearc/conform.nvim",
100 102 master,
101 - "a203480a350b03092e473bf3001733d547160a73",
103 + "02fd64fb3d4b18ec029c0e0683c3dc3ec6d2c5b8",
162 164 github,
163 165 "echasnovski/mini.diff",
165 - "65c59f9967fec965d8759a88c1baa43147699035",
167 + "5947342c95a9c2e24c659b54bb8ef083da4495ad",
258 260 github,
259 261 "DNLHC/glance.nvim",
260 262 master,
261 - "17ee84e29ac33e7e5d91609f675cee8477586bda",
263 + "04f7325d46eb3b450f2e2ba96d13dbf0b00aba0b",
274 276 github,
275 277 chrisgrieser/nvim-rulebook,
277 - "528857a6e522396c2ded41cb24e694fb3f177429",
279 + "e57a154b316a986a10d98f14acb2f822d0153029",
297 299 wezterm-types,
298 300 github,
299 - "justinsgithub/wezterm-types",
301 + justinsgithub/wezterm-types,
301 303 "1518752906ba3fac0060d9efab6e4d3ec15d4b5a",

nushell/completions/jj-completions.nu

Modified
35 35 --help(-h) # Print help (see more with '--help')
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 - ]
57 38 # Apply the reverse of a revision on top of another revision
58 39 export extern "jj backout" [
59 40 --revisions(-r): string # The revision(s) to apply the reverse of
71 52 --help(-h) # Print help (see more with '--help')
74 - # Manage bookmarks [default alias: b]
55 + # Manage bookmarks
75 56 export extern "jj bookmark" [
76 57 --repository(-R): string # Path to repository to operate on
77 58 --ignore-working-copy # Don't snapshot the working copy, and don't update it
245 226 --help(-h) # Print help (see more with '--help')
248 - # Manage bookmarks [default alias: b]
229 + # Manage bookmarks
249 230 export extern "jj branch" [
250 231 --repository(-R): string # Path to repository to operate on
251 232 --ignore-working-copy # Don't snapshot the working copy, and don't update it
436 417 --help(-h) # Print help (see more with '--help')
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')
439 438 def "nu-complete jj chmod mode" [] {
440 439 [ "n" "x" ]
892 891 # Compare file contents between two revisions
893 892 export extern "jj diff" [
894 893 --revision(-r): string # Show changes in this revision, compared to its parent(s)
895 - --from(-f): string # Show changes from this revision
896 - --to(-t): string # Show changes to this revision
894 + --from: string # Show changes from this revision
895 + --to: string # Show changes to this revision
897 896 ...paths: string # Restrict the diff to these paths
898 897 --summary(-s) # For each path, show only whether it was modified, added, or deleted
899 898 --stat # Show a histogram of the changes
921 920 # Touch up the content changes in a revision with a diff editor
922 921 export extern "jj diffedit" [
923 922 --revision(-r): string # The revision to touch up
924 - --from(-f): string # Show changes from this revision
925 - --to(-t): string # Edit changes in this revision
923 + --from: string # Show changes from this revision
924 + --to: string # Edit changes in this revision
926 925 --tool: string # Specify diff editor to be used
927 926 --restore-descendants # Preserve the content (not the diff) when rebasing descendants
928 927 --repository(-R): string # Path to repository to operate on
938 937 --help(-h) # Print help (see more with '--help')
941 - # Create new changes with the same content as existing ones
940 + # Create a new change with the same content as an existing one
942 941 export extern "jj duplicate" [
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)
942 + ...revisions: string # The revision(s) to duplicate
943 + -r # Ignored (but lets you pass `-r` for consistency with other commands)
950 944 --repository(-R): string # Path to repository to operate on
951 945 --ignore-working-copy # Don't snapshot the working copy, and don't update it
952 946 --ignore-immutable # Allow rewriting immutable commits
1268 1262 export extern "jj git push" [
1269 1263 --remote: string # The remote to push to (only named remotes are supported)
1270 1264 --bookmark(-b): string # Push only this bookmark, or bookmarks matching a pattern (can be repeated)
1271 - --all # Push all bookmarks (including new and deleted bookmarks)
1265 + --all # Push all bookmarks (including deleted bookmarks)
1272 1266 --tracked # Push all tracked bookmarks (including deleted bookmarks)
1273 1267 --deleted # Push all deleted bookmarks
1274 - --allow-new(-N) # Allow pushing new bookmarks
1275 1268 --allow-empty-description # Allow pushing commits with empty descriptions
1276 1269 --allow-private # Allow pushing commits that are private
1277 1270 --revisions(-r): string # Push bookmarks pointing to these commits (can be repeated)
1460 1453 # Compare the changes of two commits
1461 1454 export extern "jj interdiff" [
1462 - --from(-f): string # Show changes from this revision
1463 - --to(-t): string # Show changes to this revision
1455 + --from: string # Show changes from this revision
1456 + --to: string # Show changes to this revision
1464 1457 ...paths: string # Restrict the diff to these paths
1465 1458 --summary(-s) # For each path, show only whether it was modified, added, or deleted
1466 1459 --stat # Show a histogram of the changes
1518 1511 --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')
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')
1521 1558 # Create a new, empty change and (by default) edit it in the working copy
1522 1559 export extern "jj new" [
1523 1560 ...revisions: string # Parent(s) of the new change
1596 1633 export extern "jj operation diff" [
1597 1634 --operation: string # Show repository changes in this operation, compared to its parent
1598 1635 --op: string # Show repository changes in this operation, compared to its parent
1599 - --from(-f): string # Show repository changes from this operation
1600 - --to(-t): string # Show repository changes to this operation
1636 + --from: string # Show repository changes from this operation
1637 + --to: string # Show repository changes to this operation
1601 1638 --no-graph # Don't show the graph, show a flat list of modified changes
1602 1639 --patch(-p) # Show patch of modifications to changes
1603 1640 --summary(-s) # For each path, show only whether it was modified, added, or deleted
1806 1843 # Restore paths from another revision
1807 1844 export extern "jj restore" [
1808 1845 ...paths: string # Restore only these paths (instead of all paths)
1809 - --from(-f): string # Revision to restore from (source)
1810 - --to(-t): string # Revision to restore into (destination)
1846 + --from: string # Revision to restore from (source)
1847 + --to: string # Revision to restore into (destination)
1811 1848 --changes-in(-c): string # Undo the changes in a revision as compared to the merge of its parents
1812 1849 --revision(-r): string # Prints an error. DO NOT USE
1813 1850 --restore-descendants # Preserve the content (not the diff) when rebasing descendants
2143 2180 --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')
2163 2183 # Run backend-dependent garbage collection
2164 2184 export extern "jj util gc" [
2165 2185 --expire: string # Time threshold

nushell/scripts/sy.nu

Modified
23 23 let git_push_notes = [ '-C' $env.NOTES push '-ff' ]
24 24 let git_add_dotfiles = [ '-C' $env.DOTFILES add '--all' ]
25 25 let git_commit_dotfiles = [ '-C' $env.DOTFILES commit '--all' ]
26 - let git_push_dotfiles = [ '-C' $env.DOTFILES push '-ff' ]
26 + let git_push_dotfiles = [ '-C' $env.DOTFILES push ]
28 28 run-external git ...$git_add_notes
29 29 try { run-external git ...$git_commit_notes }
38 38 export def down [] {
39 39 check-deps
41 - let git_pull_notes = [ '-C' $env.NOTES pull '-ff' '--rebase' ]
42 - let git_pull_dotfiles = [ '-C' $env.DOTFILES pull '-ff' '--rebase' ]
41 + let git_pull_notes = [ '-C' $env.NOTES pull ]
42 + let git_pull_dotfiles = [ '-C' $env.DOTFILES pull ]
44 44 # print git $git_pull_notes
45 45 run-external git ...$git_pull_notes