repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

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

2a02f88cfdd57f93a8075aa90f9c0df1f63e6099

Oliver Krylow <o.krylow@isp-insoft.de> ·

unsigned

Browse filesCompare with HEAD

Changed files (70)

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 - LuaLS = {
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 - checkThridParties = 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
8 8 init.lua
9 9 : main entry point
11 +puk.nu
12 +: out-of-band plugin manager
14 +lua/patches
15 +: overrides to built-in lua functions of neovim
11 17 lua/std
12 18 : standard lib. can only depend on itself and neovim apis.
24 30 ftplugin
25 31 : file type specific config
33 +after\queries
34 +: additional treesitter queries
39 49 # todo
41 -* inline simple plugins into config (in-and-out, refjump)
42 -* merge mini-nvim with main config
51 +* neoterm keymaps
52 +* TODO highlights
43 53 * learn mini.operators
44 -* use in-and-out
45 -* get rid of
46 - - cmp
47 - - lazy
48 - - treesj
49 - - gomove
50 - - devicons
51 - - heirline
52 - - luasnip
53 - - nui
54 - - telescope
55 - - surround
56 -* fix nugu floating highlight border background
57 -* indent line bg overwrites visual selection bg
58 -* fix bg highlight of treesitter-context
59 -* stabilize plugins that are only dependencies. move to own file?
60 -* fix markdown rendering in doc popup
61 -* make highlights more visible when expanding snippets
62 -* kill mason again and get lsps via packages.nu
63 -* simplify lsp config
64 - - make my config identical to vim.lsp.ClientConfig
65 - - fuck all that single file and workspace stuff
66 - - move start function and config creation from lsp/init.lua to ftplugin/*.lua
67 -* make assignment to map.x fail, e.g. `map.normal = {}`...
68 -* figure out desirable cmp key maps
69 -* try loading lsp async for better startup perf
70 -* check out `vim.snippet`
71 -* replace cmp with vim.lsp.completion when 0.11 comes out
72 -* adapt config to respect `vim.g.nerdfont` (std.const?)
73 -* check out harper-ls
74 -* check out ast-grep
75 -* nvim spell for camel case words
76 54 * create skeleton-plugin for default file content based on file type
77 55 (BufNewFile?)
78 -* make lsp config extensible, so that plugin configs can hook into it (e.g.
79 - on_attach)
80 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
12 --- require 'std.dbg'.toggle()
11 +-- Setup debug mode
12 +require 'std.dbg'.toggle()
14 +local start_time = vim.uv.hrtime()
15 +local auto = require 'std.auto'
16 +auto 'measure_startup_time' {
17 + events = 'VimEnter',
18 + description = 'Measure startup time of neovim.',
19 + once = true,
20 + command = function()
21 + local end_time = vim.uv.hrtime()
22 + local time_elapsed = end_time - start_time
23 + vim.notify(string.format('Neovim started in (%d ms).', time_elapsed / 1e6),
24 + vim.log.levels.INFO)
25 + end,
14 28 vim.cmd.colorscheme 'nugu'
16 --- create special global, that serves as a more graceful alternative to `require`
17 -prequire = require 'std.prequire'
19 30 require 'patches'
21 32 require 'bugabinga.options'
22 -require 'bugabinga.lazy'
23 33 require 'bugabinga.sessions'
24 34 require 'bugabinga.treesitter'
35 +require 'bugabinga.bigfile'
36 +require 'bugabinga.neovim_devel'
25 37 require 'bugabinga.lsp'
26 38 require 'bugabinga.editorconfig'
27 39 require 'bugabinga.save_actions'
28 40 require 'bugabinga.diagnostic'
29 -require 'bugabinga.in-and-out'
41 +require 'bugabinga.in_and_out'
30 42 require 'bugabinga.mkdir'
44 +require 'bugabinga.file_explorer'
45 +require 'bugabinga.virtual_column'
46 +require 'bugabinga.align'
47 +require 'bugabinga.autotag'
48 +require 'bugabinga.colorizer'
49 +require 'bugabinga.cursorword'
50 +require 'bugabinga.devicons'
51 +require 'bugabinga.diff'
52 +require 'bugabinga.format'
53 +require 'bugabinga.jump2d'
54 +require 'bugabinga.lint'
55 +require 'bugabinga.move'
56 +require 'bugabinga.navigation'
57 +require 'bugabinga.notifications'
58 +require 'bugabinga.operators'
59 +require 'bugabinga.specs'
60 +require 'bugabinga.splitjoin'
61 +require 'bugabinga.statusbar'
62 +require 'bugabinga.surround'
63 +require 'bugabinga.textobjects'
64 +require 'bugabinga.key_preview'
66 +require 'bugabinga.incubator'

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/file_explorer.lua

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

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/key_preview.lua

Added
new file mode 100644
1 +local puk = require 'std.puk'
3 +puk.defer 'mini.clue' (function(clue)
4 + clue.setup {
5 + triggers = {
6 + -- Leader triggers
7 + { mode = 'n', keys = '<Leader>' },
8 + { mode = 'x', keys = '<Leader>' },
10 + -- Built-in completion
11 + { mode = 'i', keys = '<C-x>' },
13 + -- `g` key
14 + { mode = 'n', keys = 'g' },
15 + { mode = 'x', keys = 'g' },
17 + -- Marks
18 + { mode = 'n', keys = "'" },
19 + { mode = 'n', keys = '`' },
20 + { mode = 'x', keys = "'" },
21 + { mode = 'x', keys = '`' },
23 + -- Registers
24 + { mode = 'n', keys = '"' },
25 + { mode = 'x', keys = '"' },
26 + { mode = 'i', keys = '<C-r>' },
27 + { mode = 'c', keys = '<C-r>' },
29 + -- Window commands
30 + { mode = 'n', keys = '<C-w>' },
32 + -- `z` key
33 + { mode = 'n', keys = 'z' },
34 + { mode = 'x', keys = 'z' },
35 + },
37 + clues = {
38 + -- Enhance this by adding descriptions for <Leader> mapping groups
39 + { mode = 'n', keys = '<Leader>t', desc = '+Toggle' },
40 + { mode = 'n', keys = '<Leader>l', desc = '+LSP' },
41 + { mode = 'n', keys = '<Leader>lp', desc = '+Peek' },
42 + { mode = 'n', keys = '<Leader>r', desc = '+Rules' },
43 + clue.gen_clues.builtin_completion(),
44 + clue.gen_clues.g(),
45 + clue.gen_clues.marks(),
46 + clue.gen_clues.registers(),
47 + clue.gen_clues.windows(),
48 + clue.gen_clues.z(),
49 + },
50 + }
51 +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/clients/c.lua

Modified
2 2 local project = require 'std.project'
4 4 return {
5 5 name = 'clangd',
6 - command = 'clangd',
7 - filetypes = 'c',
8 6 root_dir = project.find_vcs_project_root,
9 - single_file_support = true,
10 - workspaces = true,
11 7 capabilities = {
12 8 textDocument = {
13 9 completion = {

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

Modified
2 2 local project = require 'std.project'
4 4 return {
5 5 name = 'LuaLS',
6 - filetypes = 'lua',
7 - command = 'lua-language-server',
8 6 root_dir = project.find_lua_project_root,
9 - single_file_support = true,
10 - workspaces = true,
11 7 settings = {
12 8 Lua = {
13 - addonManager = { enable = false, },
14 - completion = { callSnippet = 'Both', },
15 9 hint = { enable = true, setType = true, },
16 10 telemetry = { enable = false, },
17 - window = { progressBar = false, statusBar = false, },
18 - workspace = {
19 - checkThirdParty = false,
20 - library = nil,
21 - },

neovim/lua/bugabinga/lsp/init.lua

Modified
1 -local dbg = require 'std.dbg'
2 -local icon = require 'std.icon'
3 -local defer = require 'std.defer'
4 -local map = require 'std.map'
5 -local auto = require 'std.auto'
6 -local table = require 'std.table'
7 -local ignored = require 'std.ignored'
8 -local user_command = require 'std.user_command'
9 -local lsp_client_configs = require 'bugabinga.lsp.clients'
10 -local localrc = require 'std.localrc'
1 +local puk = require 'std.puk'
2 +local project = require 'std.project'
3 +local dbg = require 'std.dbg'
4 +local icon = require 'std.icon'
5 +local map = require 'std.map'
6 +local auto = require 'std.auto'
7 +local table = require 'std.table'
8 +local localrc = require 'std.localrc'
12 -local _ = {}
14 -local token_update = function ( lsp_client )
15 - local token = lsp_client.data.token
16 - local buffer = lsp_client.buffer
17 - local client_id = lsp_client.data.client_id
18 - local mutable_variable_highlight = 'MutableVariable'
20 - if token.type == 'variable' and not token.modifiers.readonly then
21 - vim.lsp.semantic_tokens.highlight_token( token, buffer, client_id, mutable_variable_highlight )
22 - end
24 - --TODO: find more use cases for semantic tokens
25 - --* global variables
26 - --* functions with side effects
27 - --* closures that capture something
10 +if dbg.get() then
11 + vim.lsp.set_log_level('debug')
30 -local expand_path = function ( path )
31 - if vim.fn.executable( path ) == 1 then
32 - return vim.fn.exepath( path )
33 - else
34 - return path
35 - end
14 +local language_servers = {
15 + lua_ls = {
16 + root_dir = project.find_lua_project_root,
17 + settings = {
18 + Lua = {
19 + hint = { enable = true, setType = true, },
20 + telemetry = { enable = false, },
21 + },
22 + },
23 + },
24 + -- TODO: take some config from clients/ int here
25 + jdtls = { root_dir = project.find_java_project_root, },
26 + zls = { root_dir = project.find_zig_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 = {},
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)
38 -local expand_command = function ( command )
39 - vim.validate { command = { command, { 'string', 'table' } } }
41 - if type( command ) == 'table' then
42 - command[1] = expand_path( command[1] )
43 - return command
44 - end
46 - return expand_path( command )
47 -end
49 -local lsp_start = function ( file_type_event )
50 - dbg.print 'trying to start lsp'
51 - local match = file_type_event.match
53 - dbg.print( 'filetypes to ignore', ignored.filetypes, 'current filetype', match )
54 - if vim.iter( ignored.filetypes ):find( match ) then return end
56 - local bufnr = file_type_event.buf
57 - local buftype = vim.api.nvim_get_option_value( 'buftype', { buf = bufnr } )
58 - dbg.print( 'buftypes to ignore', ignored.buftypes, 'current buftype', buftype )
59 - if vim.iter( ignored.buftypes ):find( buftype ) then return end
61 - local buffer_path = vim.api.nvim_buf_get_name( bufnr )
63 - dbg.print( string.format( 'searching lsp client for: match: %s, buffer: %s, path: %s', match, bufnr, buffer_path ) )
65 - local potential_client_configs = vim.iter( lsp_client_configs )
66 - :map( function ( config )
67 - vim.validate {
68 - ['config'] = { config, 'table' },
69 - ['config.name'] = { config.name, 'string' },
70 - ['config.filetypes'] = { config.filetypes, { 'string', 'table' } },
71 - ['config.command'] = { config.command, { 'string', 'table' } },
72 - ['config.environment'] = { config.environment, 'table', true },
73 - ['config.root_dir'] = { config.root_dir, 'function', 'string' },
74 - ['config.single_file_support'] = { config.single_file_support, 'boolean', true },
75 - ['config.settings'] = { config.settings, 'table', true },
76 - ['config.workspaces'] = { config.workspaces, 'boolean', true },
77 - ['config.before_init'] = { config.before_init, { 'function', 'table' }, true },
78 - ['config.init_options'] = { config.init_options, 'table', true },
79 - ['config.capabilities'] = { config.capabilities, 'table', true },
80 - ['config.custom_start'] = { config.custom_start, 'function', true },
81 - }
82 - -- normalize scalar values to its vector alternative for easier processing later on
83 - -- this mutates the lsp client configs! careful!
84 - config.command = type( config.command ) == 'string' and { expand_command( config.command ) } or
85 - expand_command( config.command )
86 - config.environment = config.environment or {}
87 - config.filetypes = type( config.filetypes ) == 'string' and { config.filetypes } or config.filetypes
88 - config.single_file_support = config.single_file_support == nil and false or config.single_file_support
89 - config.workspaces = config.workspaces == nil and false or config.workspaces
90 - config.capabilities = config.capabilities or {}
91 - config.init_options = config.init_options or {}
93 - return config
94 - end )
95 - :filter( function ( config )
96 - return vim.iter( config.filetypes ):find( match )
97 - end )
98 - :totable()
100 - dbg.print( 'POTENTIAL CLIENTS',
101 - vim.iter( potential_client_configs ):map( function ( config )
102 - return {
103 - name = config.name,
104 - command =
105 - config.command,
106 - }
107 - end )
108 - :totable() )
110 - if table.is_empty( potential_client_configs ) then
111 - dbg.print( 'found no lsp client for', buffer_path )
112 - return
113 - end
115 - --NOTE: this is super kool but has the limitation, that only lsp clients
116 - -- configured via my special lsp module are affected.
117 - local project_local_lsp_settings = localrc( '.lsp.settings.lua', 'table' ) or {}
118 - local project_local_workspace_folders = localrc( '.lsp.workspace_folders.lua', 'table' ) or {}
120 - -- expand relative workspace paths into lsp.workspaceFolders (name + uri)
121 - for lsp, folders in pairs( project_local_workspace_folders ) do
122 - for idx, path in ipairs( folders ) do
123 - local cwd = vim.uv.cwd()
124 - local abs_path = vim.fs.normalize( vim.fs.joinpath( cwd, path ) )
126 - local exists = vim.uv.fs_stat( abs_path )
127 - if not exists or exists.type ~= 'directory' then
128 - vim.error( 'the project local workspace folder ' ..
129 - abs_path .. ' does not exist or is not a directory.' )
130 - end
132 - project_local_workspace_folders[lsp][idx] = { uri = 'file://' .. abs_path, name = path }
133 - end
134 - end
136 - dbg.print( 'patched project local workspace folders', project_local_workspace_folders )
138 - for _, config in ipairs( potential_client_configs ) do
139 - local path = type( config.command ) == 'table' and config.command[1] or config.command
140 - if vim.fn.executable( path ) ~= 1 then
141 - vim.notify( 'The LSP ' .. config.name .. ' does not seem to be installed!' )
142 - break
143 - end
145 - local capabilities = vim.lsp.protocol.make_client_capabilities()
146 - capabilities = table.extend( 'force', capabilities, config.capabilities )
148 - local settings = config.settings
149 - local settings_override = project_local_lsp_settings[config.name]
150 - if settings_override then
151 - dbg.print( 'overriding settings with project local settings', settings, settings_override )
152 - settings = vim.tbl_deep_extend( 'force', settings, settings_override )
153 - end
155 - local root_dir = type( config.root_dir ) == 'string' and config.root_dir or config.root_dir( buffer_path )
156 - local root_workspace = root_dir and { uri = 'file://' .. root_dir, name = root_dir } or nil
157 - local workspace_folders = root_workspace and { root_workspace } or nil
158 - local workspace_folders_local = project_local_workspace_folders[config.name]
159 - if not workspace_folders_local then dbg.print( 'no local workspace folders found for ' .. config.name ) end
160 - if workspace_folders_local and config.workspaces then
161 - dbg.print( 'setting workspace folders to project local workspace folders', workspace_folders_local )
162 - workspace_folders = workspace_folders and
163 - vim.tbl_deep_extend( 'force', workspace_folders, workspace_folders_local ) or workspace_folders_local
164 - end
166 - dbg.print( 'starting command:', config.command )
168 - local start_config = {
169 - cmd = config.command,
170 - cmd_cwd = root_dir,
171 - -- cmd_env = config.environment,
172 - detached = false, -- do i want this?
173 - root_dir = root_dir,
174 - workspace_folders = workspace_folders,
175 - capabilities = capabilities,
176 - -- handlers = vim.lsp.handlers,
177 - settings = settings,
178 - -- commands = nil, -- what is this?
179 - init_options = config.init_options,
180 - name = config.name,
181 - -- get_language_id = nil,
182 - -- offset_encoding = nil,
183 - on_error = function ( code, ... ) vim.print( 'LSP ERROR', code, ... ) end,
184 - before_init = config.before_init,
185 - -- on_init = nil, -- should i send workspace/didChangeConfiguration here?
186 - on_exit = function ( code, signal, client_id ) dbg.print( 'LSP CLIENT EXIT', code, signal, client_id ) end,
187 - on_attach = function ( client, attach_bufnr ) dbg.print( 'LSP CLIENT ATTACH', client, attach_bufnr ) end,
188 - trace = dbg.get() and 'on' or 'off',
189 - flags = { allow_incremental_sync = true, debounce_text_changes = 250, exit_timeout = 200 },
190 - }
192 - local lsp_starter = config.custom_start or vim.lsp.start
194 - dbg.print( 'starting lsp', start_config.name, root_dir )
196 - lsp_starter( start_config, {
197 - bufnr = bufnr,
198 - -- TODO: reuse if workspaces
199 - -- local supported = vim.tbl_get(client, 'server_capabilities', 'workspace', 'workspaceFolders', 'supported')
200 - reuse_client = function ( existing_client, new_config )
201 - dbg.print(
202 - 'lsp reuse client',
203 - existing_client.name,
204 - existing_client.workspace_folders,
205 - new_config.name,
206 - new_config.root_dir
207 - )
209 - --TODO lsps with single file or worksopaces support do not need smame root dir. instead add_workspace_folder
210 - local same_name = existing_client.name == new_config.name
212 - local new_root_raw = new_config.root_dir or nil
213 - local existing_root_raw = existing_client.workspace_folders and #existing_client.workspace_folders >= 1 and
214 - existing_client.workspace_folders[1].name or nil
216 - if not (new_root_raw and existing_root_raw) then return false end
218 - local new_root = vim.fs.normalize( new_root_raw )
219 - local existing_root = vim.fs.normalize( existing_root_raw )
220 - local same_root = new_root == existing_root
222 - local reuse = same_name and same_root
223 - dbg.print( 'reusing lsp client?', reuse )
224 - return reuse
225 - end,
226 - } )
228 - dbg.print( 'STARTING LSP CLIENT', config.name )
229 - end
230 -end
233 --- FIXME: move to own file with LspAttach instead, so that those settings are
234 --- applied to all LSPs, not only those managed by my configs.
235 -local lsp_attach = function ( args )
99 +local lsp_attach = function(args)
236 100 local bufnr = args.buf
237 101 local client_id = args.data.client_id
238 - local client = vim.lsp.get_client_by_id( client_id )
102 + local client = vim.lsp.get_client_by_id(client_id)
239 103 if not client then return end
241 - dbg.print( client.server_capabilities )
243 - if client.server_capabilities.definitionProvider then
244 - vim.bo[bufnr].tagfunc = 'v:lua.vim.lsp.tagfunc'
245 - end
247 - if client.server_capabilities.documentFormattingProvider then
248 - vim.bo[bufnr].formatexpr = 'v:lua.vim.lsp.formatexpr'
249 - end
251 - if client.server_capabilities.completionProvider then
252 - vim.bo[bufnr].omnifunc = 'v:lua.vim.lsp.omnifunc'
253 - end
105 + vim.lsp.completion.enable(true, client_id, bufnr)
255 107 if client.server_capabilities.inlayHintProvider then
256 108 map.normal {
258 110 category = 'lsp',
259 111 buffer = bufnr,
260 112 keys = '<leader>ti',
261 - command = function ()
262 - vim.lsp.inlay_hint.enable( not vim.lsp.inlay_hint.is_enabled() )
113 + command = function()
114 + vim.lsp.inlay_hint.enable(not vim.lsp.inlay_hint.is_enabled())
267 - map.normal {
268 - description = 'Show hover documentation above cursor.',
269 - category = 'lsp',
270 - buffer = bufnr,
271 - keys = { 'K', '<leader>lk' },
272 - command = vim.lsp.buf.hover,
273 - }
275 - map.insert {
276 - description = 'Show signature help under cursor.',
277 - category = 'lsp',
278 - buffer = bufnr,
279 - keys = { '<C-h>' },
280 - command = vim.lsp.buf.signature_help,
281 - }
283 - map.normal {
284 - description = 'Show available code actions on current line.',
285 - category = 'lsp',
286 - buffer = bufnr,
287 - keys = '<leader>la',
288 - command = vim.lsp.buf.code_action,
289 - }
291 - map.normal {
292 - description = 'Goto to definition of symbol under cursor.',
293 - category = 'lsp',
294 - buffer = bufnr,
295 - keys = '<leader>ld',
296 - command = vim.lsp.buf.definition,
297 - }
299 - map.normal {
300 - description = 'Show implementations of symbol under cursor.',
301 - category = 'lsp',
302 - buffer = bufnr,
303 - keys = '<leader>li',
304 - command = vim.lsp.buf.implementation,
305 - }
307 - map.normal {
308 - description = 'Show incoming calls of symbol under cursor.',
309 - category = 'lsp',
310 - buffer = bufnr,
311 - keys = '<leader>lc',
312 - command = vim.lsp.buf.incoming_calls,
313 - }
315 - map.normal {
316 - description = 'Show outgoing calls of symbol under cursor.',
317 - category = 'lsp',
318 - buffer = bufnr,
319 - keys = '<leader>lC',
320 - command = vim.lsp.buf.outgoing_calls,
321 - }
323 - map.normal {
324 - description = 'Show references of symbol under cursor.',
325 - category = 'lsp',
326 - buffer = bufnr,
327 - keys = '<leader>ln',
328 - command = vim.lsp.buf.references,
329 - }
331 - map.normal {
332 - description = 'Rename symbol under cursor.',
333 - category = 'lsp',
334 - buffer = bufnr,
335 - keys = { '<f2>', '<leader>lr' },
336 - command = vim.lsp.buf.rename,
337 - }
340 120 auto 'lsp' {
341 - {
342 - description = 'Start or reuse LSP client',
343 - events = 'FileType',
344 - command = lsp_start,
345 - },
346 - {
347 - description = 'Hook: LSP client attached to buffer',
348 - events = 'LspAttach',
349 - command = lsp_attach,
350 - },
351 - {
352 - description = 'Semantic Tokens from the LSP',
353 - events = 'LspTokenUpdate',
354 - command = token_update,
355 - },
121 + description = 'lsp: client attached to buffer',
122 + events = 'LspAttach',
123 + command = lsp_attach,
358 -local lsp_info = function ( command )
359 - local all_or_current = command.args and command.args == 'all' and {} or { bufnr = 0 }
360 - local active_clients = vim.lsp.get_clients( all_or_current )
362 - local infos = vim.iter( active_clients )
363 - :map( function ( client )
364 - local name = client.name
365 - local config = vim.iter( lsp_client_configs ):find( function ( config ) return config.name == name end )
366 - assert( config, ('How did we not find a config for %s ?!?!'):format( name ) )
368 - local full_cmd = table.deep_copy( client.config.cmd )
369 - full_cmd[1] = vim.fn.exepath( full_cmd[1] )
370 - local basic = {
371 - id = client.id,
372 - name = name,
373 - cmd = table.concat( full_cmd, ' ' ),
374 - workspace_folders = vim.iter( client.workspace_folders ):map( function ( w ) return vim.fs.normalize( w.name ) end )
375 - :totable(),
376 - filetypes = table.concat( config.filetypes, ', ' ),
377 - single_file_support = config.single_file_support,
378 - workspaces = config.workspaces,
379 - }
380 - return basic
381 - end )
382 - :totable()
384 - vim.print( vim.inspect( infos ) )
385 -end
387 -local lsp_info_extended = function ( command )
388 - local all_or_current = command.args and command.args == 'all' and {} or { bufnr = 0 }
389 - local active_clients = vim.lsp.get_clients( all_or_current )
390 - vim.print( vim.inspect( active_clients ) )
391 -end
393 -user_command.LspInfo
394 -'Shows basic information about running LSP clients.'
395 - { nargs = '?', complete = function () return { 'all' } end } (
396 - lsp_info
397 - )
399 -user_command.LspInfoExtended
400 -'Shows detailed information about running LSP clients.'
401 - { nargs = '?', complete = function () return { 'all' } end } (
402 - lsp_info_extended
403 - )
405 --- TODO: LspStart
406 --- TODO: LspStop
407 --- TODO: LspRestart ? Maybe good after changing project local settings?
409 126 local completion_icons = {
410 127 Class = icon.class,
411 128 Color = icon.color,
433 150 local completion_kinds = vim.lsp.protocol.CompletionItemKind
434 -for i, kind in ipairs( completion_kinds ) do
151 +for i, kind in ipairs(completion_kinds) do
435 152 completion_kinds[i] = completion_icons[kind] or kind
438 --- style the lsp hover window
439 -vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(
440 - vim.lsp.handlers.hover, {
441 - border = vim.g.border_style,
442 - title = ' ' .. icon.hover .. ' ',
443 - }
446 -return setmetatable( _, {} )

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 --- global toggle for all incubating plugins. set to false to quickly, but
6 --- temporarily, get rid of all incubating plugins.
7 -local FUCK_STABILITY = true
9 -local icon = require 'std.icon'
10 -local const = require 'std.const'
11 -local dbg = require 'std.dbg'
12 -local ignored = require 'std.ignored'
14 -return {
15 - -------------------------------------------------------------------------------
16 - --- does not yet restore well with session
17 - --- cannot navigate with C-w inside the DocsView
18 - --- it has a manual update mode, but which key to bind it to?
19 - {
20 - 'amrbashir/nvim-docs-view',
21 - keys = {
22 - {
23 - '<leader>tk',
24 - '<cmd>DocsViewToggle<cr>',
25 - mode = { 'n' },
26 - desc = 'Toggle stable documentation panel.',
27 - },
28 - },
29 - cmd = 'DocsViewToggle',
30 - opts = {
31 - position = 'right',
32 - width = 42,
33 - },
34 - enabled = FUCK_STABILITY,
35 - },
36 - -------------------------------------------------------------------------------
37 - --- look into demicolon.nvim for ,; repition
38 - {
39 - 'mawkler/refjump.nvim',
40 - dependencies = {
42 - },
43 - keys = { ']r', '[r' },
44 - opts = {},
45 - enabled = FUCK_STABILITY,
46 - },
47 - -------------------------------------------------------------------------------
48 - --- this is pretty great! i just need better binds and tell which key about them
49 - {
50 - 'chrisgrieser/nvim-rulebook',
51 - keys = {
52 - { '<leader>ri', function () require 'rulebook'.ignoreRule() end },
53 - { '<leader>rl', function () require 'rulebook'.lookupRule() end },
54 - { '<leader>ry', function () require 'rulebook'.yankDiagnosticCode() end },
55 - { '<leader>sf', function () require 'rulebook'.suppressFormatter() end, mode = { 'n', 'x' } },
56 - },
57 - enabled = FUCK_STABILITY,
58 - },
59 - -------------------------------------------------------------------------------
60 - --- this plugin has some sick visual text formatting chops. check them out some time.
61 - {
62 - 'Wansmer/symbol-usage.nvim',
63 - event = 'LspAttach',
64 - opts = {
65 - hi = { link = 'LineNr' },
66 - vt_position = 'end_of_line',
67 - request_pending_text = false,
68 - disable = {
69 - filetypes = ignored.filetypes,
70 - },
71 - log = { enabled = dbg.get() },
72 - },
73 - enabled = FUCK_STABILITY,
74 - },
75 - -------------------------------------------------------------------------------
76 - --- Pretty NICE!
77 - --- fix highlights to match nugu.
78 - {
79 - 'dnlhc/glance.nvim',
80 - event = 'LspAttach',
81 - keys = {
82 - { '<Leader>gd', '<cmd>Glance definitions<cr>', { silent = true }, desc = 'Peek definitions', mode = 'n' },
83 - { '<Leader>gr', '<cmd>Glance references<cr>', { silent = true }, desc = 'Peek refernces', mode = 'n' },
84 - { '<Leader>gy', '<cmd>Glance type_definitions<cr>', { silent = true }, desc = 'Peek type definitions', mode = 'n' },
85 - { '<Leader>gm', '<cmd>Glance implementations<cr>', { silent = true }, desc = 'Peek implementations', mode = 'n' },
86 - },
87 - config = true,
88 - enabled = FUCK_STABILITY,
89 - },
90 - -------------------------------------------------------------------------------
91 - {
92 - 'emmanueltouzery/decisive.nvim',
93 - config = function ()
94 - require 'decisive'.setup {}
95 - end,
96 - ft = { 'csv' },
97 - keys = {
98 - { '<leader>cca', ":lua require('decisive').align_csv({})<cr>", { silent = true }, desc = 'Align CSV', mode = 'n' },
99 - { '<leader>ccA', ":lua require('decisive').align_csv_clear({})<cr>", { silent = true }, desc = 'Align CSV clear', mode = 'n' },
100 - { '[c', ":lua require('decisive').align_csv_prev_col()<cr>", { silent = true }, desc = 'Align CSV prev col', mode = 'n' },
101 - { ']c', ":lua require('decisive').align_csv_next_col()<cr>", { silent = true }, desc = 'Align CSV next col', mode = 'n' },
102 - },
103 - enabled = FUCK_STABILITY,
104 - },
105 - -------------------------------------------------------------------------------
106 - --- fix nugu highlights (also snippet highlights)
107 - --- configure with custom snippets?
108 - {
109 - 'saghen/blink.cmp',
110 - lazy = false, -- lazy loading handled internally
111 - -- use a release tag to download pre-built binaries
112 - version = 'v0.*',
113 - ---@module 'blink.cmp'
114 - ---@type blink.cmp.Config
115 - opts = {
116 - -- 'default' for mappings similar to built-in completion
117 - -- 'super-tab' for mappings similar to vscode (tab to accept, arrow keys to navigate)
118 - -- 'enter' for mappings similar to 'super-tab' but with 'enter' to accept
119 - -- see the "default configuration" section below for full documentation on how to define
120 - -- your own keymap.
121 - keymap = { preset = 'default' },
123 - highlight = {
124 - -- sets the fallback highlight groups to nvim-cmp's highlight groups
125 - -- useful for when your theme doesn't support blink.cmp
126 - -- will be removed in a future release, assuming themes add support
127 - use_nvim_cmp_as_default = true,
128 - },
129 - -- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
130 - -- adjusts spacing to ensure icons are aligned
131 - nerd_font_variant = 'normal',
133 - -- default list of enabled providers defined so that you can extend it
134 - -- elsewhere in your config, without redefining it, via `opts_extend`
135 - sources = {
136 - completion = {
137 - enabled_providers = { 'lsp', 'path', 'snippets', 'buffer' },
138 - },
139 - },
141 - -- experimental auto-brackets support
142 - accept = { auto_brackets = { enabled = true } },
144 - -- experimental signature help support
145 - trigger = { signature_help = { enabled = true } },
146 - },
147 - -- allows extending the enabled_providers array elsewhere in your config
148 - -- without having to redefine it
149 - opts_extend = { 'sources.completion.enabled_providers' },
150 - },
151 - -------------------------------------------------------------------------------

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/splitjoin.lua

Added
new file mode 100644
1 +local puk = require 'std.puk'
2 +local map = require 'std.map'
3 +local auto = require 'std.auto'
5 +local treesj = puk 'treesj'
6 +local splitjoin = puk 'mini.splitjoin'
8 +treesj.setup {
9 + use_default_keymaps = false,
10 + max_join_length = 360,
12 +splitjoin.setup()
14 +map.normal {
15 + description = 'Toggle Tree Join/Split',
16 + category = 'editing',
17 + keys = '<c-j>',
18 + command = function()
19 + local langs = require 'treesj.langs'['presets']
20 + if langs[vim.bo.filetype] then
21 + treesj.toggle { split = { recursive = false } }
22 + else
23 + splitjoin.toggle()
24 + end
25 + 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/project.lua

Modified
1 -local debug = require 'std.dbg'
2 1 local table = require 'std.table'
4 3 local join = table.join
10 9 local cache = {}
11 10 local hasher = vim.fn.sha256
12 -local markers_to_string = function ( markers )
13 - return vim.inspect( markers )
11 +local markers_to_string = function(markers)
12 + return vim.inspect(markers)
15 -local create_hash = function ( path, markers, stop )
16 - local path_hash = hasher( path )
17 - local stop_hash = hasher( stop )
18 - local markers_hash = hasher( markers_to_string( markers ) )
14 +local create_hash = function(path, markers, stop)
15 + local path_hash = hasher(path)
16 + local stop_hash = hasher(stop)
17 + local markers_hash = hasher(markers_to_string(markers))
19 18 local hash = path_hash .. '|' .. markers_hash .. '|' .. stop_hash
20 19 return hash
22 -local cache_get = function ( path, markers, stop )
23 - local hash = create_hash( path, markers, stop )
21 +local cache_get = function(path, markers, stop)
22 + local hash = create_hash(path, markers, stop)
24 23 local hit = cache[hash]
25 24 return hit
27 -local cache_set = function ( project_root, path, markers, stop )
28 - local hash = create_hash( path, markers, stop )
26 +local cache_set = function(project_root, path, markers, stop)
27 + local hash = create_hash(path, markers, stop)
29 28 cache[hash] = project_root
32 -local expand = function ( path ) return vim.fn.fnamemodify( path, ':p' ) end
31 +local expand = function(path) return vim.fn.fnamemodify(path, ':p') end
34 33 --- number of max loop iterations when searching for markers
35 34 local MAX_TRAVERSAL_COUNT = 100
70 69 ---@param stop string? The last directory on the path to root, when to stop searching. if `nil`, the users home
71 70 ---directory is used.
72 71 ---@return string? # Directory, that contains the `markers` and lies on the path from `path` to `stop`.
73 -local function find_root( path, markers, stop )
72 +local function find_root(path, markers, stop)
74 73 validate {
75 74 path = { path, 'string', true, },
76 75 markers = { markers, 'table', },
77 76 stop = { stop, 'string', true, },
80 - path = path or dirname( vim.api.nvim_buf_get_name( 0 ) )
81 - path = dirname( normalize( expand( path ) ) )
79 + path = path or dirname(vim.api.nvim_buf_get_name(0))
80 + path = dirname(normalize(expand(path)))
82 81 stop = stop or vim.uv.os_homedir()
83 - stop = normalize( stop )
82 + stop = normalize(stop)
85 - if not exists( stop ) then error( ('the stop directory %s does not exist!'):format( stop ) ) end
84 + if not exists(stop) then error(('the stop directory %s does not exist!'):format(stop)) end
87 86 if #path == 0 then return nil end
89 - local cache_hit = cache_get( path, markers, stop )
88 + local cache_hit = cache_get(path, markers, stop)
90 89 if cache_hit then
91 - debug.print( 'CACHE HIT', cache_hit )
92 90 return cache_hit
104 102 local current_path = path
105 103 while current_path ~= stop do
106 104 if loop_count > MAX_TRAVERSAL_COUNT then
107 - debug.print( ('searching for markers reached the max traversal count for path %s !'):format( path ) )
115 112 markers = {},
118 - for _, marker in ipairs( markers ) do
115 + for _, marker in ipairs(markers) do
119 116 local marker_path = current_path .. '/' .. marker.name
120 - if exists( marker_path ) then
117 + if exists(marker_path) then
121 118 score.marker_count = score.marker_count + marker.weight
122 - table.insert( score.markers, marker_path )
119 + table.insert(score.markers, marker_path)
126 123 if score.marker_count > 0 then
127 - table.insert( directory_scores, score )
124 + table.insert(directory_scores, score)
130 - current_path = dirname( current_path )
127 + current_path = dirname(current_path)
132 129 current_distance_to_buffer = current_distance_to_buffer + 1
133 130 loop_count = loop_count + 1
141 138 -- then it could be a nested project structure (multi-module).
142 139 -- in those cases we are looking for the root project folder, instead the nearest
143 140 -- child project root folder.
144 - for _, score in ipairs( directory_scores ) do
141 + for _, score in ipairs(directory_scores) do
145 142 local likelyhood = score.marker_count * (1 / score.distance_to_buffer_file)
146 - if debug.get() then score.likelyhood = likelyhood end
147 143 if likelyhood > max_likelyhood then
148 144 max_likelyhood = likelyhood
149 145 project_root = score.path
152 148 if project_root then
153 - cache_set( project_root, path, markers, stop )
149 + cache_set(project_root, path, markers, stop)
155 - debug.print( 'found project root', project_root, directory_scores )
156 151 return project_root
163 158 ---@return string? # The project root of the current buffer, or `nil`, if none could be determined.
165 -local function find_project_root( path, markers )
160 +local function find_project_root(path, markers)
166 161 -- define some language-independent markers
167 162 local default_markers = {
168 163 { name = '.save.actions.lua', weight = DEFINITELY, },
189 184 markers = markers or {}
190 - return find_root( path, join( default_markers, markers ) )
185 + return find_root(path, join(default_markers, markers))
193 -local function find_vcs_project_root( path )
194 - return find_project_root( path, {} )
188 +local function find_vcs_project_root(path)
189 + return find_project_root(path, {})
197 -local function find_java_project_root( path )
192 +local function find_java_project_root(path)
198 193 local java_markers = {
199 194 { name = '.idea', weight = LIKELY, },
200 195 { name = '.classpath', weight = LIKELY, },
211 206 { name = 'gradlew', weight = DEFINITELY, },
212 207 { name = 'gradlew.bat', weight = DEFINITELY, },
214 - return find_project_root( path, java_markers )
209 + return find_project_root(path, java_markers)
217 -local find_lua_project_root = function ( path )
212 +local find_lua_project_root = function(path)
218 213 local lua_markers = {
219 214 { name = '.luarc.json', weight = MAYBE, },
220 215 { name = '.luarc.jsonc', weight = MAYBE, },
227 222 { name = 'lua', weight = MAYBE, },
230 - return find_project_root( path, lua_markers )
225 + return find_project_root(path, lua_markers)
233 -local find_zig_project_root = function ( path )
228 +local find_zig_project_root = function(path)
234 229 local zig_markers = {
235 230 { name = 'build.zig', weight = DEFINITELY, },
236 231 { name = 'zls.build.json', weight = DEFINITELY, },
241 236 --FIXME: can we ask the zig build system for this info?
242 - return find_project_root( path, zig_markers )
237 + return find_project_root(path, zig_markers)
245 -local find_rust_project_root = function ( path )
240 +local find_rust_project_root = function(path)
246 241 local markers = {
247 242 { name = 'Cargo.toml', weight = DEFINITELY, },
249 - local cargo_crate_dir = find_project_root( path, markers )
244 + local cargo_crate_dir = find_project_root(path, markers)
250 245 if cargo_crate_dir == nil then return nil end
252 247 local cmd = {
256 251 '--format-version',
258 253 '--manifest-path',
259 - vim.fs.joinpath( cargo_crate_dir, 'Cargo.toml' ),
254 + vim.fs.joinpath(cargo_crate_dir, 'Cargo.toml'),
262 - local result = vim.system( cmd, { text = true, } ):wait()
257 + local result = vim.system(cmd, { text = true, }):wait()
263 258 local cargo_workspace_root
265 260 if result.code == 0 then
266 - local json = vim.json.decode( result.stdout )
261 + local json = vim.json.decode(result.stdout)
267 262 if json['workspace_root'] then
268 - cargo_workspace_root = vim.fs.normalize( json['workspace_root'] )
263 + cargo_workspace_root = vim.fs.normalize(json['workspace_root'])
272 267 return cargo_workspace_root or cargo_crate_dir
275 -local fallback_rooter = function ( path )
276 - return find_vcs_project_root( path ) or find_project_root( path )
270 +local fallback_rooter = function(path)
271 + return find_vcs_project_root(path) or find_project_root(path)
278 273 local rooters = {
279 274 java = find_java_project_root,
282 277 zig = find_zig_project_root,
285 -local find_root_by_filetype = function ( path, filetype )
280 +local find_root_by_filetype = function(path, filetype)
286 281 local rooter = rooters[filetype]
287 - return rooter and rooter( path ) or fallback_rooter( path )
282 + return rooter and rooter(path) or fallback_rooter(path)
290 285 return {

neovim/lua/std/puk.lua

Added
new file mode 100644
1 +local load_pack = function ( plugin_name )
2 + vim.validate( 'plugin_name', plugin_name, 'string' )
3 + vim.cmd.packadd { plugin_name, bang = true }
4 + return require( plugin_name )
5 +end
7 +return setmetatable(
8 + {
9 + defer = function ( plugin_name )
10 + return vim.schedule_wrap(function ( f )
11 + f( load_pack( plugin_name ) )
12 + end)
13 + end ,
14 + },
15 + {
16 + __call = function ( _, plugin_name )
17 + return load_pack( plugin_name )
18 + end,
19 + }

neovim/puk.nu

Modified
1 1 #!/usr/bin/env nu
3 -# TODO:
4 -# treesj for nushell
5 -# setup new nvim-treesitter and nvim-treesitter-textobjects
6 -# clean unspecified plugins
7 -# XXX use rss feeds of forges to find latest commit
3 +# TODO: reimplement in lua?
9 5 # an out-of-band plugin manager for neovim.
10 6 # cannot do a lot, compared to "normal" neovim plugin managers, but:
17 13 let cache_path = nvim --headless --clean +'lua print(vim.fn.stdpath "cache")' +q | complete | get stderr
18 14 let plugins_path = [ $data_path site pack puk opt ] | path join
19 15 let plugin_specs = open puk.plugins.nuon
16 + print 'Installing plugins from puk.plugins.nuon.'
20 17 $plugin_specs | par-each { install-spec $in $plugins_path $cache_path }
18 + print 'Cleaning plugins, that are not part of puk.plugins.nuon.'
19 + clean-plugins $plugins_path $plugin_specs
20 + # plugins need to be packedded before helptagscan be generated
21 + print 'Generating helptags.'
21 22 nvim --headless -u NONE +'helptags ALL' +q
25 +# check online for fresh commits. Does not actually mutate or update anything.
26 +# updated plugin specs will be written to a new file.
27 +def 'main update' [] {
28 + let plugin_specs = open puk.plugins.nuon
30 + let updated = $plugin_specs |
31 + update commit {
32 + |spec|
33 + let fresh_commit = find-latest-commit $spec
34 + if ($fresh_commit != $spec.commit) {
35 + print $"Found fresh commit for ($spec.name):($fresh_commit)!"
36 + return $fresh_commit
37 + }
38 + return $spec.commit
39 + }
41 + if not ($plugin_specs == $updated) {
42 + $plugin_specs |
43 + merge $updated |
44 + to nuon --indent 2 |
45 + save --force puk.plugins.updated.nuon
46 + print "Written updated puk.plugins into puk.plugins.updated.nuon!"
47 + } else {
48 + print "Nothing to do."
49 + }
52 +# deletes all existing plugins, that are NOT in the specs!
53 +def clean-plugins [
54 + plugins_path: path # folder to install plugins into
55 + plugin_specs: list<any> # all known plugins
56 +] {
57 + ls $plugins_path | each {
58 + | row |
59 + let existing_plugin_name = $row.name | path basename
60 + if ( $plugin_specs | where name == $existing_plugin_name | is-empty) {
61 + print $"Found plugin, that is not part of the specs: ($existing_plugin_name)"
62 + rm --interactive --trash --recursive $row.name
63 + }
64 + }
24 67 # given a plugin spec, and a plugins base install directory, this method generates
25 68 # a new path, that points to the location the plugin should be installed into.
26 69 def make-plugin-path [
48 91 return false
50 93 let commit = open --raw $commit_file_path | str trim
51 - $commit == $spec.commit
94 + return ($commit == $spec.commit)
97 +def find-latest-commit [
98 + spec: record # a plugin to install
99 +] {
100 + let feed = generate-commit-feed-url $spec
101 + let commit = match $spec.source {
102 + github => {
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' },
107 + srht => { 'TODO' },
108 + _ => { error make {
109 + msg: 'unknown plugin source given'
110 + label: {
111 + text: 'dunno this one'
112 + span: (metadata $spec.source).span
117 + $commit
120 +def generate-commit-feed-url [
121 + spec: record # a plugin to install
122 +] {
123 + let url_format = match $spec.source {
124 + github => { 'https://github.com/{repo}/commits/{branch}.atom' },
125 + codeberg => { 'TODO' },
126 + srht => { 'TODO' },
127 + _ => { error make {
128 + msg: 'unknown plugin source given'
129 + label: {
130 + text: 'dunno this one'
131 + span: (metadata $spec.source).span
136 + $spec | format pattern $url_format
54 139 def generate-download-url [
77 162 let archive_path = [ $cache_path ($spec.name + '.tar.gz') ] | path join
78 163 if ($archive_path | path exists) {
164 + print $"($spec.name) already cached in ($archive_path)"
79 165 return $archive_path
81 167 let url = generate-download-url $spec
90 176 let tmp_path = mktemp --directory
91 177 # hopefully strip-componets works on win32 as well
92 - 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
94 181 if $spec.build != null {
95 182 print $"Build step for plugin ($spec.name) detected! Executing now..."
99 186 $tmp_path
189 +let allowed_shared_lib_type = match ( sys host | get name ) {
190 + $name if $name =~ 'Windows' => { 'dll' },
191 + $name if $name =~ 'Linux' => { 'so' },
192 + $name if $name =~ 'Mac' => { 'dylib' },
193 + _ => { error make { msg: 'unknown operating system' } },
195 +let allowed_filetypes = [ lua vim scm txt $allowed_shared_lib_type ]
102 197 def install-plugin [
103 198 spec: record # a plugin to install
104 199 folder_path: path # unpacked path to plugin folder
108 203 try { rm --trash --recursive $plugin_path }
109 204 mkdir $plugin_path
110 205 cd $folder_path
111 - let allowed_shared_lib_type = match ( sys host | get name ) {
112 - 'Windows' => { 'dll' },
113 - 'Linux' => { 'so' },
114 - 'Mac' => { 'dylib' },
115 - }
116 - let allowed_filetypes = [ lua vim scm txt $allowed_shared_lib_type ]
117 206 let exclusions = [**/tests/**, **/scripts/**, **/fixtures/**, **/target/release/deps/**]
118 207 glob $"**/*.{($allowed_filetypes | str join ',')}" --exclude $exclusions |
119 208 path relative-to (pwd) |
136 225 print $"Plugin ($spec.name) is already installed and up-to-date!"
137 226 return
228 + print $"Downloading ($spec.name)..."
139 229 let archive_path = download-plugin $spec $cache_path
230 + print $"Unpacking ($spec.name)..."
140 231 let unpacked_path = unpack-plugin-archive $spec $archive_path
232 + print $"Installing ($spec.name)..."
141 233 let installed_plugin_path = install-plugin $spec $unpacked_path $plugins_path
143 234 print $"Plugin ($spec.name) installed into ($installed_plugin_path)!"

neovim/puk.plugins.nuon

Modified
1 -# vim: ft=nu
3 - [name, source, repo, commit, build];
5 - ## IMPORTANT ONES
6 - [nvim-treesitter, github, 'nvim-treesitter/nvim-treesitter', "fc940eaf106981a92829518e977e46ad4f306472", null],
7 - [nvim-treesitter-textobjects, github, 'nvim-treesitter/nvim-treesitter-textobjects', "e0a7b5a6b7f18a5d508d05ca8853273db7bcbe50", null],
8 - [nvim-ts-autotag, github, 'windwp/nvim-ts-autotag', "e239a560f338be31337e7abc3ee42515daf23f5e", null],
9 - ["oil", github, 'stevearc/oil.nvim', "3c2de37accead0240fbe812f5ccdedfe0b973557", null],
10 - [blink, github, 'Saghen/blink.cmp', '180be7ba574033baa30fa8af0db4f59db7353584', [cargo build '--release'] ],
11 - [ivy, github, 'AdeAttwood/ivy.nvim', 'cfa7e29ae4d955508d4f7f2ef08cc0c51ee745ed', [cargo build '--release'] ],
12 - [nvim-surround, github, 'kylechui/nvim-surround', 'dca2e998ff26681ee422b92c6ed39b3d2908d8a9', null ],
13 - [neoterm, github, 'itmecho/neoterm.nvim', '23a780136892b1128485f20d772a771e528b651b', null ],
14 - ["conform", github, 'stevearc/conform.nvim', "6239d9986f51ca93ded99ecdb1af0e287eabb651", null],
15 - ["fidget", github, 'j-hui/fidget.nvim', "ef99df04a1c53a453602421bc0f756997edc8289", null],
16 - ["heirline", github, "rebelot/heirline.nvim", "cc359b628266cb9a84b2d71c883f2b99e16473a0", null],
17 - ["mini.bracketed", github, 'echasnovski/mini.bracketed', "833d66df6e0588222312a963780c6ec42ed7437d", null],
18 - ["mini.align", github, 'echasnovski/mini.align', "26111a737494bc39576ad67b52bbc2638ca23553", null],
19 - ["mini.cursorword",github, "echasnovski/mini.cursorword", "7d1b38a17834acbbc4feff8e42aedc4ed0c6ff06", null],
20 - ["mini.diff",github, "echasnovski/mini.diff", "24d46798be8a358d38d3adc92c7ebcbb2d6f67e0", null],
21 - ["mini.jump2d",github, "echasnovski/mini.jump2d", "b0963aa2ec80b4b1ed1c7f93d9c969bb3f4b65b6", null],
22 - ["mini.operators",github, "echasnovski/mini.operators", "35b12f54bd5acb860f4297fd6d12fd07b1b065e2", null],
23 - ['mini.move', github, 'echasnovski/mini.move', "4caa1c212f5ca3d1633d21cfb184808090ed74b1", null],
24 - ['mini.icons', github, 'echasnovski/mini.icons', "54686be7d58807906cb2c8c2216e0bf9c044f19a", null],
25 - [nvim-autopairs, github, 'windwp/nvim-autopairs', "f158dcb865c36f72c92358f87787dab2c272eaf3", null],
26 - [nvim-highlight-colors, github, 'brenoprata10/nvim-highlight-colors', "e967e2ba13fd4ca731b41d0e5cc1ac2edcd6e25e", null],
27 - [lint, github, 'mfussenegger/nvim-lint', "968a35d54b3a4c1ce66609cf80b14d4ae44fe77f", null],
28 - [treesj, github, 'Wansmer/treesj', "03415ac60791d48e120a80d37e080744faf3ac15", null],
29 - ["virt-column", github, 'lukas-reineke/virt-column.nvim', "b87e3e0864211a32724a2ebf3be37e24e9e2fa99", null],
30 - ["specs", github, 'edluffy/specs.nvim', "2743e412bbe21c9d73954c403d01e8de7377890d", null],
32 - ## INLINING CANDIDATES
34 - ## INCUBATOR
35 - ["decisive", github, 'emmanueltouzery/decisive.nvim', "a7251adebccbc9c899cff39a524b20d06e2b78b5", null],
36 - ["glance", github, 'DNLHC/glance.nvim', "17ee84e29ac33e7e5d91609f675cee8477586bda", null],
37 - ["iswap", github, "mizlan/iswap.nvim", "e02cc91f2a8feb5c5a595767d208c54b6e3258ec", null],
38 - [docs-view, github, 'amrbashir/nvim-docs-view',"365593534e0acd762bfddce6e8313315ffa4fa36", null],
39 - [rulebook, github, 'chrisgrieser/nvim-rulebook', "528857a6e522396c2ded41cb24e694fb3f177429", null],
40 - ["symbol-usage", github, 'Wansmer/symbol-usage.nvim', "0f9b3da014b7e41559b643e7461fcabb2a7dc83a", null],
41 -]
2 + [
3 + name,
4 + source,
5 + repo,
6 + branch,
7 + commit,
8 + build
9 + ];
10 + [
11 + lspconfig,
12 + github,
13 + neovim/nvim-lspconfig,
14 + master,
15 + "47f236c058f0511702286a21ba53bbf42abbd8a8",
16 + null
17 + ],
18 + [
19 + nvim-treesitter,
20 + github,
21 + nvim-treesitter/nvim-treesitter,
22 + main,
23 + "75904bdff7da13cb54e05f53f25f25a924fe28a6",
24 + [
25 + nvim,
26 + --headless,
27 + -u,
28 + NONE,
29 + "+\"packadd nvim-treesitter\"",
30 + "+\":TSUpdate",
31 + +q
32 + ]
33 + ],
34 + [
35 + nvim-treesitter-textobjects,
36 + github,
37 + nvim-treesitter/nvim-treesitter-textobjects,
38 + main,
39 + "e0a7b5a6b7f18a5d508d05ca8853273db7bcbe50",
40 + null
41 + ],
42 + [
43 + nvim-ts-autotag,
44 + github,
45 + windwp/nvim-ts-autotag,
46 + main,
47 + "1cca23c9da708047922d3895a71032bc0449c52d",
48 + null
49 + ],
50 + [
51 + oil,
52 + github,
53 + "stevearc/oil.nvim",
54 + master,
55 + "9a59256c8e88b29d2150e99b5960b2f111e51f75",
56 + null
57 + ],
58 + [
59 + "blink.cmp",
60 + github,
61 + "Saghen/blink.cmp",
62 + main,
63 + "765ee4cfb6d71e9d88a27f64f406251f3aa85fac",
64 + [
65 + cargo,
66 + build,
67 + --release
68 + ]
69 + ],
70 + [
71 + ivy,
72 + github,
73 + "AdeAttwood/ivy.nvim",
74 + "0.x",
75 + "cfa7e29ae4d955508d4f7f2ef08cc0c51ee745ed",
76 + [
77 + cargo,
78 + build,
79 + --release
80 + ]
81 + ],
82 + [
83 + nvim-surround,
84 + github,
85 + kylechui/nvim-surround,
86 + main,
87 + "9f0cb495f25bff32c936062d85046fbda0c43517",
88 + null
89 + ],
90 + [
91 + neoterm,
92 + github,
93 + "itmecho/neoterm.nvim",
94 + main,
95 + "23a780136892b1128485f20d772a771e528b651b",
96 + null
97 + ],
98 + [
99 + conform,
100 + github,
101 + "stevearc/conform.nvim",
102 + master,
103 + "02fd64fb3d4b18ec029c0e0683c3dc3ec6d2c5b8",
104 + null
105 + ],
107 + fidget,
108 + github,
109 + "j-hui/fidget.nvim",
110 + main,
111 + "e2a175c2abe2d4f65357da1c98c59a5cfb2b543f",
112 + null
113 + ],
115 + heirline,
116 + github,
117 + "rebelot/heirline.nvim",
118 + master,
119 + "cc359b628266cb9a84b2d71c883f2b99e16473a0",
120 + null
121 + ],
123 + "mini.splitjoin",
124 + github,
125 + "echasnovski/mini.splitjoin",
126 + main,
127 + "3e92f6764e770ba392325cad3a4497adcada695f",
128 + null
129 + ],
131 + "mini.clue",
132 + github,
133 + "echasnovski/mini.clue",
134 + main,
135 + "983a6c2e6231e94016343ea58921001ab2b74183",
136 + null
137 + ],
139 + "mini.bracketed",
140 + github,
141 + "echasnovski/mini.bracketed",
142 + main,
143 + "daf2bff8172bc84bfb934f765275618f5e7844a8",
144 + null
145 + ],
147 + "mini.align",
148 + github,
149 + "echasnovski/mini.align",
150 + main,
151 + "26111a737494bc39576ad67b52bbc2638ca23553",
152 + null
153 + ],
155 + "mini.cursorword",
156 + github,
157 + "echasnovski/mini.cursorword",
158 + main,
159 + "7d1b38a17834acbbc4feff8e42aedc4ed0c6ff06",
160 + null
161 + ],
163 + "mini.diff",
164 + github,
165 + "echasnovski/mini.diff",
166 + main,
167 + "5947342c95a9c2e24c659b54bb8ef083da4495ad",
168 + null
169 + ],
171 + "mini.jump2d",
172 + github,
173 + "echasnovski/mini.jump2d",
174 + main,
175 + "b0963aa2ec80b4b1ed1c7f93d9c969bb3f4b65b6",
176 + null
177 + ],
179 + "mini.operators",
180 + github,
181 + "echasnovski/mini.operators",
182 + main,
183 + "7cb4dc66c51a3d736d347bbc517dc73dc7d28888",
184 + null
185 + ],
187 + "mini.surround",
188 + github,
189 + "echasnovski/mini.splitjoin",
190 + main,
191 + "3e92f6764e770ba392325cad3a4497adcada695f",
192 + null
193 + ],
195 + "mini.move",
196 + github,
197 + "echasnovski/mini.move",
198 + main,
199 + "4caa1c212f5ca3d1633d21cfb184808090ed74b1",
200 + null
201 + ],
203 + "mini.icons",
204 + github,
205 + "echasnovski/mini.icons",
206 + main,
207 + "54686be7d58807906cb2c8c2216e0bf9c044f19a",
208 + null
209 + ],
211 + nvim-autopairs,
212 + github,
213 + windwp/nvim-autopairs,
214 + master,
215 + "b464658e9b880f463b9f7e6ccddd93fb0013f559",
216 + null
217 + ],
219 + nvim-highlight-colors,
220 + github,
221 + "brenoprata10/nvim-highlight-colors",
222 + main,
223 + "e967e2ba13fd4ca731b41d0e5cc1ac2edcd6e25e",
224 + null
225 + ],
227 + lint,
228 + github,
229 + mfussenegger/nvim-lint,
230 + master,
231 + "6b46370d02cd001509a765591a3ffc481b538794",
232 + null
233 + ],
235 + treesj,
236 + github,
237 + Wansmer/treesj,
238 + main,
239 + "03415ac60791d48e120a80d37e080744faf3ac15",
240 + null
241 + ],
243 + virt-column,
244 + github,
245 + "lukas-reineke/virt-column.nvim",
246 + master,
247 + "b87e3e0864211a32724a2ebf3be37e24e9e2fa99",
248 + null
249 + ],
251 + specs,
252 + github,
253 + "cxwx/specs.nvim",
254 + main,
255 + "dd82496f538b688cedf98429f89fef47ecb0625e",
256 + null
257 + ],
259 + glance,
260 + github,
261 + "DNLHC/glance.nvim",
262 + master,
263 + "04f7325d46eb3b450f2e2ba96d13dbf0b00aba0b",
264 + null
265 + ],
267 + docs-view,
268 + github,
269 + amrbashir/nvim-docs-view,
270 + master,
271 + "365593534e0acd762bfddce6e8313315ffa4fa36",
272 + null
273 + ],
275 + rulebook,
276 + github,
277 + chrisgrieser/nvim-rulebook,
278 + main,
279 + "e57a154b316a986a10d98f14acb2f822d0153029",
280 + null
281 + ],
283 + symbol-usage,
284 + github,
285 + "Wansmer/symbol-usage.nvim",
286 + main,
287 + "0f9b3da014b7e41559b643e7461fcabb2a7dc83a",
288 + null
289 + ],
291 + lazydev,
292 + github,
293 + "folke/lazydev.nvim",
294 + main,
295 + "f59bd14a852ca43db38e3662395354cb2a9b13e0",
296 + null
297 + ],
299 + wezterm-types,
300 + github,
301 + justinsgithub/wezterm-types,
302 + main,
303 + "1518752906ba3fac0060d9efab6e4d3ec15d4b5a",
304 + null

nushell/completions/jj-completions.nu

Modified
1 +module completions {
3 + # Jujutsu (An experimental VCS)
4 + export extern jj [
5 + --repository(-R): string # Path to repository to operate on
6 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
7 + --ignore-immutable # Allow rewriting immutable commits
8 + --at-operation: string # Operation to load the repo at
9 + --at-op: string # Operation to load the repo at
10 + --debug # Enable debug logging
11 + --color: string # When to colorize output (always, never, debug, auto)
12 + --quiet # Silence non-primary command output
13 + --no-pager # Disable the pager
14 + --config-toml: string # Additional configuration options (can be repeated)
15 + --help(-h) # Print help (see more with '--help')
16 + --version(-V) # Print version
17 + ]
19 + # Abandon a revision
20 + export extern "jj abandon" [
21 + ...revisions: string # The revision(s) to abandon
22 + --summary(-s) # Do not print every abandoned commit on a separate line
23 + -r # Ignored (but lets you pass `-r` for consistency with other commands)
24 + --restore-descendants # Do not modify the content of the children of the abandoned commits
25 + --repository(-R): string # Path to repository to operate on
26 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
27 + --ignore-immutable # Allow rewriting immutable commits
28 + --at-operation: string # Operation to load the repo at
29 + --at-op: string # Operation to load the repo at
30 + --debug # Enable debug logging
31 + --color: string # When to colorize output (always, never, debug, auto)
32 + --quiet # Silence non-primary command output
33 + --no-pager # Disable the pager
34 + --config-toml: string # Additional configuration options (can be repeated)
35 + --help(-h) # Print help (see more with '--help')
36 + ]
38 + # Apply the reverse of a revision on top of another revision
39 + export extern "jj backout" [
40 + --revisions(-r): string # The revision(s) to apply the reverse of
41 + --destination(-d): string # The revision to apply the reverse changes on top of
42 + --repository(-R): string # Path to repository to operate on
43 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
44 + --ignore-immutable # Allow rewriting immutable commits
45 + --at-operation: string # Operation to load the repo at
46 + --at-op: string # Operation to load the repo at
47 + --debug # Enable debug logging
48 + --color: string # When to colorize output (always, never, debug, auto)
49 + --quiet # Silence non-primary command output
50 + --no-pager # Disable the pager
51 + --config-toml: string # Additional configuration options (can be repeated)
52 + --help(-h) # Print help (see more with '--help')
53 + ]
55 + # Manage bookmarks
56 + export extern "jj bookmark" [
57 + --repository(-R): string # Path to repository to operate on
58 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
59 + --ignore-immutable # Allow rewriting immutable commits
60 + --at-operation: string # Operation to load the repo at
61 + --at-op: string # Operation to load the repo at
62 + --debug # Enable debug logging
63 + --color: string # When to colorize output (always, never, debug, auto)
64 + --quiet # Silence non-primary command output
65 + --no-pager # Disable the pager
66 + --config-toml: string # Additional configuration options (can be repeated)
67 + --help(-h) # Print help (see more with '--help')
68 + ]
70 + # Create a new bookmark
71 + export extern "jj bookmark create" [
72 + --revision(-r): string # The bookmark's target revision
73 + --to: string # The bookmark's target revision
74 + ...names: string # The bookmarks to create
75 + --repository(-R): string # Path to repository to operate on
76 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
77 + --ignore-immutable # Allow rewriting immutable commits
78 + --at-operation: string # Operation to load the repo at
79 + --at-op: string # Operation to load the repo at
80 + --debug # Enable debug logging
81 + --color: string # When to colorize output (always, never, debug, auto)
82 + --quiet # Silence non-primary command output
83 + --no-pager # Disable the pager
84 + --config-toml: string # Additional configuration options (can be repeated)
85 + --help(-h) # Print help (see more with '--help')
86 + ]
88 + # Delete an existing bookmark and propagate the deletion to remotes on the next push
89 + export extern "jj bookmark delete" [
90 + ...names: string # The bookmarks to delete
91 + --repository(-R): string # Path to repository to operate on
92 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
93 + --ignore-immutable # Allow rewriting immutable commits
94 + --at-operation: string # Operation to load the repo at
95 + --at-op: string # Operation to load the repo at
96 + --debug # Enable debug logging
97 + --color: string # When to colorize output (always, never, debug, auto)
98 + --quiet # Silence non-primary command output
99 + --no-pager # Disable the pager
100 + --config-toml: string # Additional configuration options (can be repeated)
101 + --help(-h) # Print help (see more with '--help')
104 + # Forget everything about a bookmark, including its local and remote targets
105 + export extern "jj bookmark forget" [
106 + ...names: string # The bookmarks to forget
107 + --repository(-R): string # Path to repository to operate on
108 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
109 + --ignore-immutable # Allow rewriting immutable commits
110 + --at-operation: string # Operation to load the repo at
111 + --at-op: string # Operation to load the repo at
112 + --debug # Enable debug logging
113 + --color: string # When to colorize output (always, never, debug, auto)
114 + --quiet # Silence non-primary command output
115 + --no-pager # Disable the pager
116 + --config-toml: string # Additional configuration options (can be repeated)
117 + --help(-h) # Print help (see more with '--help')
120 + # List bookmarks and their targets
121 + export extern "jj bookmark list" [
122 + --all-remotes(-a) # Show all tracking and non-tracking remote bookmarks including the ones whose targets are synchronized with the local bookmarks
123 + --remote: string # Show all tracking and non-tracking remote bookmarks belonging to this remote
124 + --tracked(-t) # Show remote tracked bookmarks only. Omits local Git-tracking bookmarks by default
125 + --conflicted(-c) # Show conflicted bookmarks only
126 + ...names: string # Show bookmarks whose local name matches
127 + --revisions(-r): string # Show bookmarks whose local targets are in the given revisions
128 + --template(-T): string # Render each bookmark using the given template
129 + --repository(-R): string # Path to repository to operate on
130 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
131 + --ignore-immutable # Allow rewriting immutable commits
132 + --at-operation: string # Operation to load the repo at
133 + --at-op: string # Operation to load the repo at
134 + --debug # Enable debug logging
135 + --color: string # When to colorize output (always, never, debug, auto)
136 + --quiet # Silence non-primary command output
137 + --no-pager # Disable the pager
138 + --config-toml: string # Additional configuration options (can be repeated)
139 + --help(-h) # Print help (see more with '--help')
142 + # Move existing bookmarks to target revision
143 + export extern "jj bookmark move" [
144 + --from: string # Move bookmarks from the given revisions
145 + --to: string # Move bookmarks to this revision
146 + --allow-backwards(-B) # Allow moving bookmarks backwards or sideways
147 + ...names: string # Move bookmarks matching the given name patterns
148 + --repository(-R): string # Path to repository to operate on
149 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
150 + --ignore-immutable # Allow rewriting immutable commits
151 + --at-operation: string # Operation to load the repo at
152 + --at-op: string # Operation to load the repo at
153 + --debug # Enable debug logging
154 + --color: string # When to colorize output (always, never, debug, auto)
155 + --quiet # Silence non-primary command output
156 + --no-pager # Disable the pager
157 + --config-toml: string # Additional configuration options (can be repeated)
158 + --help(-h) # Print help (see more with '--help')
161 + # Rename `old` bookmark name to `new` bookmark name
162 + export extern "jj bookmark rename" [
163 + old: string # The old name of the bookmark
164 + new: string # The new name of the bookmark
165 + --repository(-R): string # Path to repository to operate on
166 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
167 + --ignore-immutable # Allow rewriting immutable commits
168 + --at-operation: string # Operation to load the repo at
169 + --at-op: string # Operation to load the repo at
170 + --debug # Enable debug logging
171 + --color: string # When to colorize output (always, never, debug, auto)
172 + --quiet # Silence non-primary command output
173 + --no-pager # Disable the pager
174 + --config-toml: string # Additional configuration options (can be repeated)
175 + --help(-h) # Print help (see more with '--help')
178 + # Create or update a bookmark to point to a certain commit
179 + export extern "jj bookmark set" [
180 + --revision(-r): string # The bookmark's target revision
181 + --to: string # The bookmark's target revision
182 + --allow-backwards(-B) # Allow moving the bookmark backwards or sideways
183 + ...names: string # The bookmarks to update
184 + --repository(-R): string # Path to repository to operate on
185 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
186 + --ignore-immutable # Allow rewriting immutable commits
187 + --at-operation: string # Operation to load the repo at
188 + --at-op: string # Operation to load the repo at
189 + --debug # Enable debug logging
190 + --color: string # When to colorize output (always, never, debug, auto)
191 + --quiet # Silence non-primary command output
192 + --no-pager # Disable the pager
193 + --config-toml: string # Additional configuration options (can be repeated)
194 + --help(-h) # Print help (see more with '--help')
197 + # Start tracking given remote bookmarks
198 + export extern "jj bookmark track" [
199 + ...names: string # Remote bookmarks to track
200 + --repository(-R): string # Path to repository to operate on
201 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
202 + --ignore-immutable # Allow rewriting immutable commits
203 + --at-operation: string # Operation to load the repo at
204 + --at-op: string # Operation to load the repo at
205 + --debug # Enable debug logging
206 + --color: string # When to colorize output (always, never, debug, auto)
207 + --quiet # Silence non-primary command output
208 + --no-pager # Disable the pager
209 + --config-toml: string # Additional configuration options (can be repeated)
210 + --help(-h) # Print help (see more with '--help')
213 + # Stop tracking given remote bookmarks
214 + export extern "jj bookmark untrack" [
215 + ...names: string # Remote bookmarks to untrack
216 + --repository(-R): string # Path to repository to operate on
217 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
218 + --ignore-immutable # Allow rewriting immutable commits
219 + --at-operation: string # Operation to load the repo at
220 + --at-op: string # Operation to load the repo at
221 + --debug # Enable debug logging
222 + --color: string # When to colorize output (always, never, debug, auto)
223 + --quiet # Silence non-primary command output
224 + --no-pager # Disable the pager
225 + --config-toml: string # Additional configuration options (can be repeated)
226 + --help(-h) # Print help (see more with '--help')
229 + # Manage bookmarks
230 + export extern "jj branch" [
231 + --repository(-R): string # Path to repository to operate on
232 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
233 + --ignore-immutable # Allow rewriting immutable commits
234 + --at-operation: string # Operation to load the repo at
235 + --at-op: string # Operation to load the repo at
236 + --debug # Enable debug logging
237 + --color: string # When to colorize output (always, never, debug, auto)
238 + --quiet # Silence non-primary command output
239 + --no-pager # Disable the pager
240 + --config-toml: string # Additional configuration options (can be repeated)
241 + --help(-h) # Print help (see more with '--help')
244 + # Create a new bookmark
245 + export extern "jj branch create" [
246 + --revision(-r): string # The bookmark's target revision
247 + --to: string # The bookmark's target revision
248 + ...names: string # The bookmarks to create
249 + --repository(-R): string # Path to repository to operate on
250 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
251 + --ignore-immutable # Allow rewriting immutable commits
252 + --at-operation: string # Operation to load the repo at
253 + --at-op: string # Operation to load the repo at
254 + --debug # Enable debug logging
255 + --color: string # When to colorize output (always, never, debug, auto)
256 + --quiet # Silence non-primary command output
257 + --no-pager # Disable the pager
258 + --config-toml: string # Additional configuration options (can be repeated)
259 + --help(-h) # Print help (see more with '--help')
262 + # Delete an existing bookmark and propagate the deletion to remotes on the next push
263 + export extern "jj branch delete" [
264 + ...names: string # The bookmarks to delete
265 + --repository(-R): string # Path to repository to operate on
266 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
267 + --ignore-immutable # Allow rewriting immutable commits
268 + --at-operation: string # Operation to load the repo at
269 + --at-op: string # Operation to load the repo at
270 + --debug # Enable debug logging
271 + --color: string # When to colorize output (always, never, debug, auto)
272 + --quiet # Silence non-primary command output
273 + --no-pager # Disable the pager
274 + --config-toml: string # Additional configuration options (can be repeated)
275 + --help(-h) # Print help (see more with '--help')
278 + # Forget everything about a bookmark, including its local and remote targets
279 + export extern "jj branch forget" [
280 + ...names: string # The bookmarks to forget
281 + --repository(-R): string # Path to repository to operate on
282 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
283 + --ignore-immutable # Allow rewriting immutable commits
284 + --at-operation: string # Operation to load the repo at
285 + --at-op: string # Operation to load the repo at
286 + --debug # Enable debug logging
287 + --color: string # When to colorize output (always, never, debug, auto)
288 + --quiet # Silence non-primary command output
289 + --no-pager # Disable the pager
290 + --config-toml: string # Additional configuration options (can be repeated)
291 + --help(-h) # Print help (see more with '--help')
294 + # List bookmarks and their targets
295 + export extern "jj branch list" [
296 + --all-remotes(-a) # Show all tracking and non-tracking remote bookmarks including the ones whose targets are synchronized with the local bookmarks
297 + --remote: string # Show all tracking and non-tracking remote bookmarks belonging to this remote
298 + --tracked(-t) # Show remote tracked bookmarks only. Omits local Git-tracking bookmarks by default
299 + --conflicted(-c) # Show conflicted bookmarks only
300 + ...names: string # Show bookmarks whose local name matches
301 + --revisions(-r): string # Show bookmarks whose local targets are in the given revisions
302 + --template(-T): string # Render each bookmark using the given template
303 + --repository(-R): string # Path to repository to operate on
304 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
305 + --ignore-immutable # Allow rewriting immutable commits
306 + --at-operation: string # Operation to load the repo at
307 + --at-op: string # Operation to load the repo at
308 + --debug # Enable debug logging
309 + --color: string # When to colorize output (always, never, debug, auto)
310 + --quiet # Silence non-primary command output
311 + --no-pager # Disable the pager
312 + --config-toml: string # Additional configuration options (can be repeated)
313 + --help(-h) # Print help (see more with '--help')
316 + # Move existing bookmarks to target revision
317 + export extern "jj branch move" [
318 + --from: string # Move bookmarks from the given revisions
319 + --to: string # Move bookmarks to this revision
320 + --allow-backwards(-B) # Allow moving bookmarks backwards or sideways
321 + ...names: string # Move bookmarks matching the given name patterns
322 + --repository(-R): string # Path to repository to operate on
323 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
324 + --ignore-immutable # Allow rewriting immutable commits
325 + --at-operation: string # Operation to load the repo at
326 + --at-op: string # Operation to load the repo at
327 + --debug # Enable debug logging
328 + --color: string # When to colorize output (always, never, debug, auto)
329 + --quiet # Silence non-primary command output
330 + --no-pager # Disable the pager
331 + --config-toml: string # Additional configuration options (can be repeated)
332 + --help(-h) # Print help (see more with '--help')
335 + # Rename `old` bookmark name to `new` bookmark name
336 + export extern "jj branch rename" [
337 + old: string # The old name of the bookmark
338 + new: string # The new name of the bookmark
339 + --repository(-R): string # Path to repository to operate on
340 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
341 + --ignore-immutable # Allow rewriting immutable commits
342 + --at-operation: string # Operation to load the repo at
343 + --at-op: string # Operation to load the repo at
344 + --debug # Enable debug logging
345 + --color: string # When to colorize output (always, never, debug, auto)
346 + --quiet # Silence non-primary command output
347 + --no-pager # Disable the pager
348 + --config-toml: string # Additional configuration options (can be repeated)
349 + --help(-h) # Print help (see more with '--help')
352 + # Create or update a bookmark to point to a certain commit
353 + export extern "jj branch set" [
354 + --revision(-r): string # The bookmark's target revision
355 + --to: string # The bookmark's target revision
356 + --allow-backwards(-B) # Allow moving the bookmark backwards or sideways
357 + ...names: string # The bookmarks to update
358 + --repository(-R): string # Path to repository to operate on
359 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
360 + --ignore-immutable # Allow rewriting immutable commits
361 + --at-operation: string # Operation to load the repo at
362 + --at-op: string # Operation to load the repo at
363 + --debug # Enable debug logging
364 + --color: string # When to colorize output (always, never, debug, auto)
365 + --quiet # Silence non-primary command output
366 + --no-pager # Disable the pager
367 + --config-toml: string # Additional configuration options (can be repeated)
368 + --help(-h) # Print help (see more with '--help')
371 + # Start tracking given remote bookmarks
372 + export extern "jj branch track" [
373 + ...names: string # Remote bookmarks to track
374 + --repository(-R): string # Path to repository to operate on
375 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
376 + --ignore-immutable # Allow rewriting immutable commits
377 + --at-operation: string # Operation to load the repo at
378 + --at-op: string # Operation to load the repo at
379 + --debug # Enable debug logging
380 + --color: string # When to colorize output (always, never, debug, auto)
381 + --quiet # Silence non-primary command output
382 + --no-pager # Disable the pager
383 + --config-toml: string # Additional configuration options (can be repeated)
384 + --help(-h) # Print help (see more with '--help')
387 + # Stop tracking given remote bookmarks
388 + export extern "jj branch untrack" [
389 + ...names: string # Remote bookmarks to untrack
390 + --repository(-R): string # Path to repository to operate on
391 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
392 + --ignore-immutable # Allow rewriting immutable commits
393 + --at-operation: string # Operation to load the repo at
394 + --at-op: string # Operation to load the repo at
395 + --debug # Enable debug logging
396 + --color: string # When to colorize output (always, never, debug, auto)
397 + --quiet # Silence non-primary command output
398 + --no-pager # Disable the pager
399 + --config-toml: string # Additional configuration options (can be repeated)
400 + --help(-h) # Print help (see more with '--help')
403 + # Print contents of files in a revision
404 + export extern "jj cat" [
405 + --revision(-r): string # The revision to get the file contents from
406 + ...paths: string # Paths to print
407 + --repository(-R): string # Path to repository to operate on
408 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
409 + --ignore-immutable # Allow rewriting immutable commits
410 + --at-operation: string # Operation to load the repo at
411 + --at-op: string # Operation to load the repo at
412 + --debug # Enable debug logging
413 + --color: string # When to colorize output (always, never, debug, auto)
414 + --quiet # Silence non-primary command output
415 + --no-pager # Disable the pager
416 + --config-toml: string # Additional configuration options (can be repeated)
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')
438 + def "nu-complete jj chmod mode" [] {
439 + [ "n" "x" ]
442 + # Sets or removes the executable bit for paths in the repo
443 + export extern "jj chmod" [
444 + mode: string@"nu-complete jj chmod mode"
445 + --revision(-r): string # The revision to update
446 + ...paths: string # Paths to change the executable bit for
447 + --repository(-R): string # Path to repository to operate on
448 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
449 + --ignore-immutable # Allow rewriting immutable commits
450 + --at-operation: string # Operation to load the repo at
451 + --at-op: string # Operation to load the repo at
452 + --debug # Enable debug logging
453 + --color: string # When to colorize output (always, never, debug, auto)
454 + --quiet # Silence non-primary command output
455 + --no-pager # Disable the pager
456 + --config-toml: string # Additional configuration options (can be repeated)
457 + --help(-h) # Print help (see more with '--help')
460 + # Update the description and create a new change on top
461 + export extern "jj commit" [
462 + --interactive(-i) # Interactively choose which changes to include in the first commit
463 + --tool: string # Specify diff editor to be used (implies --interactive)
464 + --message(-m): string # The change description to use (don't open editor)
465 + ...paths: string # Put these paths in the first commit
466 + --reset-author # Reset the author to the configured user
467 + --author: string # Set author to the provided string
468 + --repository(-R): string # Path to repository to operate on
469 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
470 + --ignore-immutable # Allow rewriting immutable commits
471 + --at-operation: string # Operation to load the repo at
472 + --at-op: string # Operation to load the repo at
473 + --debug # Enable debug logging
474 + --color: string # When to colorize output (always, never, debug, auto)
475 + --quiet # Silence non-primary command output
476 + --no-pager # Disable the pager
477 + --config-toml: string # Additional configuration options (can be repeated)
478 + --help(-h) # Print help (see more with '--help')
481 + # Manage config options
482 + export extern "jj config" [
483 + --repository(-R): string # Path to repository to operate on
484 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
485 + --ignore-immutable # Allow rewriting immutable commits
486 + --at-operation: string # Operation to load the repo at
487 + --at-op: string # Operation to load the repo at
488 + --debug # Enable debug logging
489 + --color: string # When to colorize output (always, never, debug, auto)
490 + --quiet # Silence non-primary command output
491 + --no-pager # Disable the pager
492 + --config-toml: string # Additional configuration options (can be repeated)
493 + --help(-h) # Print help (see more with '--help')
496 + # Start an editor on a jj config file
497 + export extern "jj config edit" [
498 + --user # Target the user-level config
499 + --repo # Target the repo-level config
500 + --repository(-R): string # Path to repository to operate on
501 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
502 + --ignore-immutable # Allow rewriting immutable commits
503 + --at-operation: string # Operation to load the repo at
504 + --at-op: string # Operation to load the repo at
505 + --debug # Enable debug logging
506 + --color: string # When to colorize output (always, never, debug, auto)
507 + --quiet # Silence non-primary command output
508 + --no-pager # Disable the pager
509 + --config-toml: string # Additional configuration options (can be repeated)
510 + --help(-h) # Print help (see more with '--help')
513 + # Get the value of a given config option.
514 + export extern "jj config get" [
515 + name: string
516 + --repository(-R): string # Path to repository to operate on
517 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
518 + --ignore-immutable # Allow rewriting immutable commits
519 + --at-operation: string # Operation to load the repo at
520 + --at-op: string # Operation to load the repo at
521 + --debug # Enable debug logging
522 + --color: string # When to colorize output (always, never, debug, auto)
523 + --quiet # Silence non-primary command output
524 + --no-pager # Disable the pager
525 + --config-toml: string # Additional configuration options (can be repeated)
526 + --help(-h) # Print help (see more with '--help')
529 + # List variables set in config file, along with their values
530 + export extern "jj config list" [
531 + name?: string # An optional name of a specific config option to look up
532 + --include-defaults # Whether to explicitly include built-in default values in the list
533 + --include-overridden # Allow printing overridden values
534 + --user # Target the user-level config
535 + --repo # Target the repo-level config
536 + --template(-T): string # Render each variable using the given template
537 + --repository(-R): string # Path to repository to operate on
538 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
539 + --ignore-immutable # Allow rewriting immutable commits
540 + --at-operation: string # Operation to load the repo at
541 + --at-op: string # Operation to load the repo at
542 + --debug # Enable debug logging
543 + --color: string # When to colorize output (always, never, debug, auto)
544 + --quiet # Silence non-primary command output
545 + --no-pager # Disable the pager
546 + --config-toml: string # Additional configuration options (can be repeated)
547 + --help(-h) # Print help (see more with '--help')
550 + # Print the path to the config file
551 + export extern "jj config path" [
552 + --user # Target the user-level config
553 + --repo # Target the repo-level config
554 + --repository(-R): string # Path to repository to operate on
555 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
556 + --ignore-immutable # Allow rewriting immutable commits
557 + --at-operation: string # Operation to load the repo at
558 + --at-op: string # Operation to load the repo at
559 + --debug # Enable debug logging
560 + --color: string # When to colorize output (always, never, debug, auto)
561 + --quiet # Silence non-primary command output
562 + --no-pager # Disable the pager
563 + --config-toml: string # Additional configuration options (can be repeated)
564 + --help(-h) # Print help (see more with '--help')
567 + # Update config file to set the given option to a given value
568 + export extern "jj config set" [
569 + name: string
570 + value: string
571 + --user # Target the user-level config
572 + --repo # Target the repo-level config
573 + --repository(-R): string # Path to repository to operate on
574 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
575 + --ignore-immutable # Allow rewriting immutable commits
576 + --at-operation: string # Operation to load the repo at
577 + --at-op: string # Operation to load the repo at
578 + --debug # Enable debug logging
579 + --color: string # When to colorize output (always, never, debug, auto)
580 + --quiet # Silence non-primary command output
581 + --no-pager # Disable the pager
582 + --config-toml: string # Additional configuration options (can be repeated)
583 + --help(-h) # Print help (see more with '--help')
586 + # Update config file to unset the given option
587 + export extern "jj config unset" [
588 + name: string
589 + --user # Target the user-level config
590 + --repo # Target the repo-level config
591 + --repository(-R): string # Path to repository to operate on
592 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
593 + --ignore-immutable # Allow rewriting immutable commits
594 + --at-operation: string # Operation to load the repo at
595 + --at-op: string # Operation to load the repo at
596 + --debug # Enable debug logging
597 + --color: string # When to colorize output (always, never, debug, auto)
598 + --quiet # Silence non-primary command output
599 + --no-pager # Disable the pager
600 + --config-toml: string # Additional configuration options (can be repeated)
601 + --help(-h) # Print help (see more with '--help')
604 + # Low-level commands not intended for users
605 + export extern "jj debug" [
606 + --repository(-R): string # Path to repository to operate on
607 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
608 + --ignore-immutable # Allow rewriting immutable commits
609 + --at-operation: string # Operation to load the repo at
610 + --at-op: string # Operation to load the repo at
611 + --debug # Enable debug logging
612 + --color: string # When to colorize output (always, never, debug, auto)
613 + --quiet # Silence non-primary command output
614 + --no-pager # Disable the pager
615 + --config-toml: string # Additional configuration options (can be repeated)
616 + --help(-h) # Print help (see more with '--help')
619 + # Rebuild commit index
620 + export extern "jj debug copy-detection" [
621 + revision?: string # Show changes in this revision, compared to its parent(s)
622 + --repository(-R): string # Path to repository to operate on
623 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
624 + --ignore-immutable # Allow rewriting immutable commits
625 + --at-operation: string # Operation to load the repo at
626 + --at-op: string # Operation to load the repo at
627 + --debug # Enable debug logging
628 + --color: string # When to colorize output (always, never, debug, auto)
629 + --quiet # Silence non-primary command output
630 + --no-pager # Disable the pager
631 + --config-toml: string # Additional configuration options (can be repeated)
632 + --help(-h) # Print help (see more with '--help')
635 + # Parse fileset expression
636 + export extern "jj debug fileset" [
637 + path: string
638 + --repository(-R): string # Path to repository to operate on
639 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
640 + --ignore-immutable # Allow rewriting immutable commits
641 + --at-operation: string # Operation to load the repo at
642 + --at-op: string # Operation to load the repo at
643 + --debug # Enable debug logging
644 + --color: string # When to colorize output (always, never, debug, auto)
645 + --quiet # Silence non-primary command output
646 + --no-pager # Disable the pager
647 + --config-toml: string # Additional configuration options (can be repeated)
648 + --help(-h) # Print help (see more with '--help')
651 + # Show commit index stats
652 + export extern "jj debug index" [
653 + --repository(-R): string # Path to repository to operate on
654 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
655 + --ignore-immutable # Allow rewriting immutable commits
656 + --at-operation: string # Operation to load the repo at
657 + --at-op: string # Operation to load the repo at
658 + --debug # Enable debug logging
659 + --color: string # When to colorize output (always, never, debug, auto)
660 + --quiet # Silence non-primary command output
661 + --no-pager # Disable the pager
662 + --config-toml: string # Additional configuration options (can be repeated)
663 + --help(-h) # Print help (see more with '--help')
666 + # Show information about the local working copy state
667 + export extern "jj debug local-working-copy" [
668 + --repository(-R): string # Path to repository to operate on
669 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
670 + --ignore-immutable # Allow rewriting immutable commits
671 + --at-operation: string # Operation to load the repo at
672 + --at-op: string # Operation to load the repo at
673 + --debug # Enable debug logging
674 + --color: string # When to colorize output (always, never, debug, auto)
675 + --quiet # Silence non-primary command output
676 + --no-pager # Disable the pager
677 + --config-toml: string # Additional configuration options (can be repeated)
678 + --help(-h) # Print help (see more with '--help')
681 + def "nu-complete jj debug operation display" [] {
682 + [ "operation" "id" "view" "all" ]
685 + # Show information about an operation and its view
686 + export extern "jj debug operation" [
687 + operation?: string
688 + --display: string@"nu-complete jj debug operation display"
689 + --repository(-R): string # Path to repository to operate on
690 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
691 + --ignore-immutable # Allow rewriting immutable commits
692 + --at-operation: string # Operation to load the repo at
693 + --at-op: string # Operation to load the repo at
694 + --debug # Enable debug logging
695 + --color: string # When to colorize output (always, never, debug, auto)
696 + --quiet # Silence non-primary command output
697 + --no-pager # Disable the pager
698 + --config-toml: string # Additional configuration options (can be repeated)
699 + --help(-h) # Print help (see more with '--help')
702 + # Rebuild commit index
703 + export extern "jj debug reindex" [
704 + --repository(-R): string # Path to repository to operate on
705 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
706 + --ignore-immutable # Allow rewriting immutable commits
707 + --at-operation: string # Operation to load the repo at
708 + --at-op: string # Operation to load the repo at
709 + --debug # Enable debug logging
710 + --color: string # When to colorize output (always, never, debug, auto)
711 + --quiet # Silence non-primary command output
712 + --no-pager # Disable the pager
713 + --config-toml: string # Additional configuration options (can be repeated)
714 + --help(-h) # Print help (see more with '--help')
717 + # Evaluate revset to full commit IDs
718 + export extern "jj debug revset" [
719 + revision: string
720 + --repository(-R): string # Path to repository to operate on
721 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
722 + --ignore-immutable # Allow rewriting immutable commits
723 + --at-operation: string # Operation to load the repo at
724 + --at-op: string # Operation to load the repo at
725 + --debug # Enable debug logging
726 + --color: string # When to colorize output (always, never, debug, auto)
727 + --quiet # Silence non-primary command output
728 + --no-pager # Disable the pager
729 + --config-toml: string # Additional configuration options (can be repeated)
730 + --help(-h) # Print help (see more with '--help')
733 + # Trigger a snapshot in the op log
734 + export extern "jj debug snapshot" [
735 + --repository(-R): string # Path to repository to operate on
736 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
737 + --ignore-immutable # Allow rewriting immutable commits
738 + --at-operation: string # Operation to load the repo at
739 + --at-op: string # Operation to load the repo at
740 + --debug # Enable debug logging
741 + --color: string # When to colorize output (always, never, debug, auto)
742 + --quiet # Silence non-primary command output
743 + --no-pager # Disable the pager
744 + --config-toml: string # Additional configuration options (can be repeated)
745 + --help(-h) # Print help (see more with '--help')
748 + # Parse a template
749 + export extern "jj debug template" [
750 + template: string
751 + --repository(-R): string # Path to repository to operate on
752 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
753 + --ignore-immutable # Allow rewriting immutable commits
754 + --at-operation: string # Operation to load the repo at
755 + --at-op: string # Operation to load the repo at
756 + --debug # Enable debug logging
757 + --color: string # When to colorize output (always, never, debug, auto)
758 + --quiet # Silence non-primary command output
759 + --no-pager # Disable the pager
760 + --config-toml: string # Additional configuration options (can be repeated)
761 + --help(-h) # Print help (see more with '--help')
764 + # List the recursive entries of a tree
765 + export extern "jj debug tree" [
766 + --revision(-r): string
767 + --id: string
768 + --dir: string
769 + ...paths: string
770 + --repository(-R): string # Path to repository to operate on
771 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
772 + --ignore-immutable # Allow rewriting immutable commits
773 + --at-operation: string # Operation to load the repo at
774 + --at-op: string # Operation to load the repo at
775 + --debug # Enable debug logging
776 + --color: string # When to colorize output (always, never, debug, auto)
777 + --quiet # Silence non-primary command output
778 + --no-pager # Disable the pager
779 + --config-toml: string # Additional configuration options (can be repeated)
780 + --help(-h) # Print help (see more with '--help')
783 + export extern "jj debug watchman" [
784 + --repository(-R): string # Path to repository to operate on
785 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
786 + --ignore-immutable # Allow rewriting immutable commits
787 + --at-operation: string # Operation to load the repo at
788 + --at-op: string # Operation to load the repo at
789 + --debug # Enable debug logging
790 + --color: string # When to colorize output (always, never, debug, auto)
791 + --quiet # Silence non-primary command output
792 + --no-pager # Disable the pager
793 + --config-toml: string # Additional configuration options (can be repeated)
794 + --help(-h) # Print help (see more with '--help')
797 + # Check whether `watchman` is enabled and whether it's correctly installed
798 + export extern "jj debug watchman status" [
799 + --repository(-R): string # Path to repository to operate on
800 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
801 + --ignore-immutable # Allow rewriting immutable commits
802 + --at-operation: string # Operation to load the repo at
803 + --at-op: string # Operation to load the repo at
804 + --debug # Enable debug logging
805 + --color: string # When to colorize output (always, never, debug, auto)
806 + --quiet # Silence non-primary command output
807 + --no-pager # Disable the pager
808 + --config-toml: string # Additional configuration options (can be repeated)
809 + --help(-h) # Print help (see more with '--help')
812 + export extern "jj debug watchman query-clock" [
813 + --repository(-R): string # Path to repository to operate on
814 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
815 + --ignore-immutable # Allow rewriting immutable commits
816 + --at-operation: string # Operation to load the repo at
817 + --at-op: string # Operation to load the repo at
818 + --debug # Enable debug logging
819 + --color: string # When to colorize output (always, never, debug, auto)
820 + --quiet # Silence non-primary command output
821 + --no-pager # Disable the pager
822 + --config-toml: string # Additional configuration options (can be repeated)
823 + --help(-h) # Print help (see more with '--help')
826 + export extern "jj debug watchman query-changed-files" [
827 + --repository(-R): string # Path to repository to operate on
828 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
829 + --ignore-immutable # Allow rewriting immutable commits
830 + --at-operation: string # Operation to load the repo at
831 + --at-op: string # Operation to load the repo at
832 + --debug # Enable debug logging
833 + --color: string # When to colorize output (always, never, debug, auto)
834 + --quiet # Silence non-primary command output
835 + --no-pager # Disable the pager
836 + --config-toml: string # Additional configuration options (can be repeated)
837 + --help(-h) # Print help (see more with '--help')
840 + export extern "jj debug watchman reset-clock" [
841 + --repository(-R): string # Path to repository to operate on
842 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
843 + --ignore-immutable # Allow rewriting immutable commits
844 + --at-operation: string # Operation to load the repo at
845 + --at-op: string # Operation to load the repo at
846 + --debug # Enable debug logging
847 + --color: string # When to colorize output (always, never, debug, auto)
848 + --quiet # Silence non-primary command output
849 + --no-pager # Disable the pager
850 + --config-toml: string # Additional configuration options (can be repeated)
851 + --help(-h) # Print help (see more with '--help')
854 + # Show information about the working copy state
855 + export extern "jj debug working-copy" [
856 + --repository(-R): string # Path to repository to operate on
857 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
858 + --ignore-immutable # Allow rewriting immutable commits
859 + --at-operation: string # Operation to load the repo at
860 + --at-op: string # Operation to load the repo at
861 + --debug # Enable debug logging
862 + --color: string # When to colorize output (always, never, debug, auto)
863 + --quiet # Silence non-primary command output
864 + --no-pager # Disable the pager
865 + --config-toml: string # Additional configuration options (can be repeated)
866 + --help(-h) # Print help (see more with '--help')
869 + # Update the change description or other metadata
870 + export extern "jj describe" [
871 + ...revisions: string # The revision(s) whose description to edit
872 + -r # Ignored (but lets you pass `-r` for consistency with other commands)
873 + --message(-m): string # The change description to use (don't open editor)
874 + --stdin # Read the change description from stdin
875 + --no-edit # Don't open an editor
876 + --reset-author # Reset the author to the configured user
877 + --author: string # Set author to the provided string
878 + --repository(-R): string # Path to repository to operate on
879 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
880 + --ignore-immutable # Allow rewriting immutable commits
881 + --at-operation: string # Operation to load the repo at
882 + --at-op: string # Operation to load the repo at
883 + --debug # Enable debug logging
884 + --color: string # When to colorize output (always, never, debug, auto)
885 + --quiet # Silence non-primary command output
886 + --no-pager # Disable the pager
887 + --config-toml: string # Additional configuration options (can be repeated)
888 + --help(-h) # Print help (see more with '--help')
891 + # Compare file contents between two revisions
892 + export extern "jj diff" [
893 + --revision(-r): string # Show changes in this revision, compared to its parent(s)
894 + --from: string # Show changes from this revision
895 + --to: string # Show changes to this revision
896 + ...paths: string # Restrict the diff to these paths
897 + --summary(-s) # For each path, show only whether it was modified, added, or deleted
898 + --stat # Show a histogram of the changes
899 + --types # For each path, show only its type before and after
900 + --name-only # For each path, show only its path
901 + --git # Show a Git-format diff
902 + --color-words # Show a word-level diff with changes indicated only by color
903 + --tool: string # Generate diff by external command
904 + --context: string # Number of lines of context to show
905 + --ignore-all-space(-w) # Ignore whitespace when comparing lines
906 + --ignore-space-change(-b) # Ignore changes in amount of whitespace when comparing lines
907 + --repository(-R): string # Path to repository to operate on
908 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
909 + --ignore-immutable # Allow rewriting immutable commits
910 + --at-operation: string # Operation to load the repo at
911 + --at-op: string # Operation to load the repo at
912 + --debug # Enable debug logging
913 + --color: string # When to colorize output (always, never, debug, auto)
914 + --quiet # Silence non-primary command output
915 + --no-pager # Disable the pager
916 + --config-toml: string # Additional configuration options (can be repeated)
917 + --help(-h) # Print help (see more with '--help')
920 + # Touch up the content changes in a revision with a diff editor
921 + export extern "jj diffedit" [
922 + --revision(-r): string # The revision to touch up
923 + --from: string # Show changes from this revision
924 + --to: string # Edit changes in this revision
925 + --tool: string # Specify diff editor to be used
926 + --restore-descendants # Preserve the content (not the diff) when rebasing descendants
927 + --repository(-R): string # Path to repository to operate on
928 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
929 + --ignore-immutable # Allow rewriting immutable commits
930 + --at-operation: string # Operation to load the repo at
931 + --at-op: string # Operation to load the repo at
932 + --debug # Enable debug logging
933 + --color: string # When to colorize output (always, never, debug, auto)
934 + --quiet # Silence non-primary command output
935 + --no-pager # Disable the pager
936 + --config-toml: string # Additional configuration options (can be repeated)
937 + --help(-h) # Print help (see more with '--help')
940 + # Create a new change with the same content as an existing one
941 + export extern "jj duplicate" [
942 + ...revisions: string # The revision(s) to duplicate
943 + -r # Ignored (but lets you pass `-r` for consistency with other commands)
944 + --repository(-R): string # Path to repository to operate on
945 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
946 + --ignore-immutable # Allow rewriting immutable commits
947 + --at-operation: string # Operation to load the repo at
948 + --at-op: string # Operation to load the repo at
949 + --debug # Enable debug logging
950 + --color: string # When to colorize output (always, never, debug, auto)
951 + --quiet # Silence non-primary command output
952 + --no-pager # Disable the pager
953 + --config-toml: string # Additional configuration options (can be repeated)
954 + --help(-h) # Print help (see more with '--help')
957 + # Sets the specified revision as the working-copy revision
958 + export extern "jj edit" [
959 + revision: string # The commit to edit
960 + -r # Ignored (but lets you pass `-r` for consistency with other commands)
961 + --repository(-R): string # Path to repository to operate on
962 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
963 + --ignore-immutable # Allow rewriting immutable commits
964 + --at-operation: string # Operation to load the repo at
965 + --at-op: string # Operation to load the repo at
966 + --debug # Enable debug logging
967 + --color: string # When to colorize output (always, never, debug, auto)
968 + --quiet # Silence non-primary command output
969 + --no-pager # Disable the pager
970 + --config-toml: string # Additional configuration options (can be repeated)
971 + --help(-h) # Print help (see more with '--help')
974 + # Show how a change has evolved over time
975 + export extern "jj evolog" [
976 + --revision(-r): string
977 + --limit(-n): string # Limit number of revisions to show
978 + -l: string
979 + --no-graph # Don't show the graph, show a flat list of revisions
980 + --template(-T): string # Render each revision using the given template
981 + --patch(-p) # Show patch compared to the previous version of this change
982 + --summary(-s) # For each path, show only whether it was modified, added, or deleted
983 + --stat # Show a histogram of the changes
984 + --types # For each path, show only its type before and after
985 + --name-only # For each path, show only its path
986 + --git # Show a Git-format diff
987 + --color-words # Show a word-level diff with changes indicated only by color
988 + --tool: string # Generate diff by external command
989 + --context: string # Number of lines of context to show
990 + --ignore-all-space # Ignore whitespace when comparing lines
991 + --ignore-space-change # Ignore changes in amount of whitespace when comparing lines
992 + --repository(-R): string # Path to repository to operate on
993 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
994 + --ignore-immutable # Allow rewriting immutable commits
995 + --at-operation: string # Operation to load the repo at
996 + --at-op: string # Operation to load the repo at
997 + --debug # Enable debug logging
998 + --color: string # When to colorize output (always, never, debug, auto)
999 + --quiet # Silence non-primary command output
1000 + --no-pager # Disable the pager
1001 + --config-toml: string # Additional configuration options (can be repeated)
1002 + --help(-h) # Print help (see more with '--help')
1005 + # File operations
1006 + export extern "jj file" [
1007 + --repository(-R): string # Path to repository to operate on
1008 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1009 + --ignore-immutable # Allow rewriting immutable commits
1010 + --at-operation: string # Operation to load the repo at
1011 + --at-op: string # Operation to load the repo at
1012 + --debug # Enable debug logging
1013 + --color: string # When to colorize output (always, never, debug, auto)
1014 + --quiet # Silence non-primary command output
1015 + --no-pager # Disable the pager
1016 + --config-toml: string # Additional configuration options (can be repeated)
1017 + --help(-h) # Print help (see more with '--help')
1020 + # Show the source change for each line of the target file
1021 + export extern "jj file annotate" [
1022 + path: string # the file to annotate
1023 + --revision(-r): string # an optional revision to start at
1024 + --repository(-R): string # Path to repository to operate on
1025 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1026 + --ignore-immutable # Allow rewriting immutable commits
1027 + --at-operation: string # Operation to load the repo at
1028 + --at-op: string # Operation to load the repo at
1029 + --debug # Enable debug logging
1030 + --color: string # When to colorize output (always, never, debug, auto)
1031 + --quiet # Silence non-primary command output
1032 + --no-pager # Disable the pager
1033 + --config-toml: string # Additional configuration options (can be repeated)
1034 + --help(-h) # Print help (see more with '--help')
1037 + def "nu-complete jj file chmod mode" [] {
1038 + [ "n" "x" ]
1041 + # Sets or removes the executable bit for paths in the repo
1042 + export extern "jj file chmod" [
1043 + mode: string@"nu-complete jj file chmod mode"
1044 + --revision(-r): string # The revision to update
1045 + ...paths: string # Paths to change the executable bit for
1046 + --repository(-R): string # Path to repository to operate on
1047 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1048 + --ignore-immutable # Allow rewriting immutable commits
1049 + --at-operation: string # Operation to load the repo at
1050 + --at-op: string # Operation to load the repo at
1051 + --debug # Enable debug logging
1052 + --color: string # When to colorize output (always, never, debug, auto)
1053 + --quiet # Silence non-primary command output
1054 + --no-pager # Disable the pager
1055 + --config-toml: string # Additional configuration options (can be repeated)
1056 + --help(-h) # Print help (see more with '--help')
1059 + # List files in a revision
1060 + export extern "jj file list" [
1061 + --revision(-r): string # The revision to list files in
1062 + ...paths: string # Only list files matching these prefixes (instead of all files)
1063 + --repository(-R): string # Path to repository to operate on
1064 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1065 + --ignore-immutable # Allow rewriting immutable commits
1066 + --at-operation: string # Operation to load the repo at
1067 + --at-op: string # Operation to load the repo at
1068 + --debug # Enable debug logging
1069 + --color: string # When to colorize output (always, never, debug, auto)
1070 + --quiet # Silence non-primary command output
1071 + --no-pager # Disable the pager
1072 + --config-toml: string # Additional configuration options (can be repeated)
1073 + --help(-h) # Print help (see more with '--help')
1076 + # Print contents of files in a revision
1077 + export extern "jj file show" [
1078 + --revision(-r): string # The revision to get the file contents from
1079 + ...paths: string # Paths to print
1080 + --repository(-R): string # Path to repository to operate on
1081 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1082 + --ignore-immutable # Allow rewriting immutable commits
1083 + --at-operation: string # Operation to load the repo at
1084 + --at-op: string # Operation to load the repo at
1085 + --debug # Enable debug logging
1086 + --color: string # When to colorize output (always, never, debug, auto)
1087 + --quiet # Silence non-primary command output
1088 + --no-pager # Disable the pager
1089 + --config-toml: string # Additional configuration options (can be repeated)
1090 + --help(-h) # Print help (see more with '--help')
1093 + # Start tracking specified paths in the working copy
1094 + export extern "jj file track" [
1095 + ...paths: string # Paths to track
1096 + --repository(-R): string # Path to repository to operate on
1097 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1098 + --ignore-immutable # Allow rewriting immutable commits
1099 + --at-operation: string # Operation to load the repo at
1100 + --at-op: string # Operation to load the repo at
1101 + --debug # Enable debug logging
1102 + --color: string # When to colorize output (always, never, debug, auto)
1103 + --quiet # Silence non-primary command output
1104 + --no-pager # Disable the pager
1105 + --config-toml: string # Additional configuration options (can be repeated)
1106 + --help(-h) # Print help (see more with '--help')
1109 + # Stop tracking specified paths in the working copy
1110 + export extern "jj file untrack" [
1111 + ...paths: string # Paths to untrack. They must already be ignored
1112 + --repository(-R): string # Path to repository to operate on
1113 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1114 + --ignore-immutable # Allow rewriting immutable commits
1115 + --at-operation: string # Operation to load the repo at
1116 + --at-op: string # Operation to load the repo at
1117 + --debug # Enable debug logging
1118 + --color: string # When to colorize output (always, never, debug, auto)
1119 + --quiet # Silence non-primary command output
1120 + --no-pager # Disable the pager
1121 + --config-toml: string # Additional configuration options (can be repeated)
1122 + --help(-h) # Print help (see more with '--help')
1125 + # List files in a revision (DEPRECATED use `jj file list`)
1126 + export extern "jj files" [
1127 + --revision(-r): string # The revision to list files in
1128 + ...paths: string # Only list files matching these prefixes (instead of all files)
1129 + --repository(-R): string # Path to repository to operate on
1130 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1131 + --ignore-immutable # Allow rewriting immutable commits
1132 + --at-operation: string # Operation to load the repo at
1133 + --at-op: string # Operation to load the repo at
1134 + --debug # Enable debug logging
1135 + --color: string # When to colorize output (always, never, debug, auto)
1136 + --quiet # Silence non-primary command output
1137 + --no-pager # Disable the pager
1138 + --config-toml: string # Additional configuration options (can be repeated)
1139 + --help(-h) # Print help (see more with '--help')
1142 + # Update files with formatting fixes or other changes
1143 + export extern "jj fix" [
1144 + --source(-s): string # Fix files in the specified revision(s) and their descendants. If no revisions are specified, this defaults to the `revsets.fix` setting, or `reachable(@, mutable())` if it is not set
1145 + ...paths: string # Fix only these paths
1146 + --include-unchanged-files # Fix unchanged files in addition to changed ones. If no paths are specified, all files in the repo will be fixed
1147 + --repository(-R): string # Path to repository to operate on
1148 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1149 + --ignore-immutable # Allow rewriting immutable commits
1150 + --at-operation: string # Operation to load the repo at
1151 + --at-op: string # Operation to load the repo at
1152 + --debug # Enable debug logging
1153 + --color: string # When to colorize output (always, never, debug, auto)
1154 + --quiet # Silence non-primary command output
1155 + --no-pager # Disable the pager
1156 + --config-toml: string # Additional configuration options (can be repeated)
1157 + --help(-h) # Print help (see more with '--help')
1160 + # Commands for working with Git remotes and the underlying Git repo
1161 + export extern "jj git" [
1162 + --repository(-R): string # Path to repository to operate on
1163 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1164 + --ignore-immutable # Allow rewriting immutable commits
1165 + --at-operation: string # Operation to load the repo at
1166 + --at-op: string # Operation to load the repo at
1167 + --debug # Enable debug logging
1168 + --color: string # When to colorize output (always, never, debug, auto)
1169 + --quiet # Silence non-primary command output
1170 + --no-pager # Disable the pager
1171 + --config-toml: string # Additional configuration options (can be repeated)
1172 + --help(-h) # Print help (see more with '--help')
1175 + # Create a new repo backed by a clone of a Git repo
1176 + export extern "jj git clone" [
1177 + source: string # URL or path of the Git repo to clone
1178 + destination?: string # Specifies the target directory for the Jujutsu repository clone. If not provided, defaults to a directory named after the last component of the source URL. The full directory path will be created if it doesn't exist
1179 + --remote: string # Name of the newly created remote
1180 + --colocate # Whether or not to colocate the Jujutsu repo with the git repo
1181 + --depth: string # Create a shallow clone of the given depth
1182 + --repository(-R): string # Path to repository to operate on
1183 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1184 + --ignore-immutable # Allow rewriting immutable commits
1185 + --at-operation: string # Operation to load the repo at
1186 + --at-op: string # Operation to load the repo at
1187 + --debug # Enable debug logging
1188 + --color: string # When to colorize output (always, never, debug, auto)
1189 + --quiet # Silence non-primary command output
1190 + --no-pager # Disable the pager
1191 + --config-toml: string # Additional configuration options (can be repeated)
1192 + --help(-h) # Print help (see more with '--help')
1195 + # Update the underlying Git repo with changes made in the repo
1196 + export extern "jj git export" [
1197 + --repository(-R): string # Path to repository to operate on
1198 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1199 + --ignore-immutable # Allow rewriting immutable commits
1200 + --at-operation: string # Operation to load the repo at
1201 + --at-op: string # Operation to load the repo at
1202 + --debug # Enable debug logging
1203 + --color: string # When to colorize output (always, never, debug, auto)
1204 + --quiet # Silence non-primary command output
1205 + --no-pager # Disable the pager
1206 + --config-toml: string # Additional configuration options (can be repeated)
1207 + --help(-h) # Print help (see more with '--help')
1210 + # Fetch from a Git remote
1211 + export extern "jj git fetch" [
1212 + --branch(-b): string # Fetch only some of the branches
1213 + --remote: string # The remote to fetch from (only named remotes are supported, can be repeated)
1214 + --all-remotes # Fetch from all remotes
1215 + --repository(-R): string # Path to repository to operate on
1216 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1217 + --ignore-immutable # Allow rewriting immutable commits
1218 + --at-operation: string # Operation to load the repo at
1219 + --at-op: string # Operation to load the repo at
1220 + --debug # Enable debug logging
1221 + --color: string # When to colorize output (always, never, debug, auto)
1222 + --quiet # Silence non-primary command output
1223 + --no-pager # Disable the pager
1224 + --config-toml: string # Additional configuration options (can be repeated)
1225 + --help(-h) # Print help (see more with '--help')
1228 + # Update repo with changes made in the underlying Git repo
1229 + export extern "jj git import" [
1230 + --repository(-R): string # Path to repository to operate on
1231 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1232 + --ignore-immutable # Allow rewriting immutable commits
1233 + --at-operation: string # Operation to load the repo at
1234 + --at-op: string # Operation to load the repo at
1235 + --debug # Enable debug logging
1236 + --color: string # When to colorize output (always, never, debug, auto)
1237 + --quiet # Silence non-primary command output
1238 + --no-pager # Disable the pager
1239 + --config-toml: string # Additional configuration options (can be repeated)
1240 + --help(-h) # Print help (see more with '--help')
1243 + # Create a new Git backed repo
1244 + export extern "jj git init" [
1245 + destination?: string # The destination directory where the `jj` repo will be created. If the directory does not exist, it will be created. If no directory is given, the current directory is used
1246 + --colocate # Specifies that the `jj` repo should also be a valid `git` repo, allowing the use of both `jj` and `git` commands in the same directory
1247 + --git-repo: string # Specifies a path to an **existing** git repository to be used as the backing git repo for the newly created `jj` repo
1248 + --repository(-R): string # Path to repository to operate on
1249 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1250 + --ignore-immutable # Allow rewriting immutable commits
1251 + --at-operation: string # Operation to load the repo at
1252 + --at-op: string # Operation to load the repo at
1253 + --debug # Enable debug logging
1254 + --color: string # When to colorize output (always, never, debug, auto)
1255 + --quiet # Silence non-primary command output
1256 + --no-pager # Disable the pager
1257 + --config-toml: string # Additional configuration options (can be repeated)
1258 + --help(-h) # Print help (see more with '--help')
1261 + # Push to a Git remote
1262 + export extern "jj git push" [
1263 + --remote: string # The remote to push to (only named remotes are supported)
1264 + --bookmark(-b): string # Push only this bookmark, or bookmarks matching a pattern (can be repeated)
1265 + --all # Push all bookmarks (including deleted bookmarks)
1266 + --tracked # Push all tracked bookmarks (including deleted bookmarks)
1267 + --deleted # Push all deleted bookmarks
1268 + --allow-empty-description # Allow pushing commits with empty descriptions
1269 + --allow-private # Allow pushing commits that are private
1270 + --revisions(-r): string # Push bookmarks pointing to these commits (can be repeated)
1271 + --change(-c): string # Push this commit by creating a bookmark based on its change ID (can be repeated)
1272 + --dry-run # Only display what will change on the remote
1273 + --repository(-R): string # Path to repository to operate on
1274 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1275 + --ignore-immutable # Allow rewriting immutable commits
1276 + --at-operation: string # Operation to load the repo at
1277 + --at-op: string # Operation to load the repo at
1278 + --debug # Enable debug logging
1279 + --color: string # When to colorize output (always, never, debug, auto)
1280 + --quiet # Silence non-primary command output
1281 + --no-pager # Disable the pager
1282 + --config-toml: string # Additional configuration options (can be repeated)
1283 + --help(-h) # Print help (see more with '--help')
1286 + # Manage Git remotes
1287 + export extern "jj git remote" [
1288 + --repository(-R): string # Path to repository to operate on
1289 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1290 + --ignore-immutable # Allow rewriting immutable commits
1291 + --at-operation: string # Operation to load the repo at
1292 + --at-op: string # Operation to load the repo at
1293 + --debug # Enable debug logging
1294 + --color: string # When to colorize output (always, never, debug, auto)
1295 + --quiet # Silence non-primary command output
1296 + --no-pager # Disable the pager
1297 + --config-toml: string # Additional configuration options (can be repeated)
1298 + --help(-h) # Print help (see more with '--help')
1301 + # Add a Git remote
1302 + export extern "jj git remote add" [
1303 + remote: string # The remote's name
1304 + url: string # The remote's URL
1305 + --repository(-R): string # Path to repository to operate on
1306 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1307 + --ignore-immutable # Allow rewriting immutable commits
1308 + --at-operation: string # Operation to load the repo at
1309 + --at-op: string # Operation to load the repo at
1310 + --debug # Enable debug logging
1311 + --color: string # When to colorize output (always, never, debug, auto)
1312 + --quiet # Silence non-primary command output
1313 + --no-pager # Disable the pager
1314 + --config-toml: string # Additional configuration options (can be repeated)
1315 + --help(-h) # Print help (see more with '--help')
1318 + # List Git remotes
1319 + export extern "jj git remote list" [
1320 + --repository(-R): string # Path to repository to operate on
1321 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1322 + --ignore-immutable # Allow rewriting immutable commits
1323 + --at-operation: string # Operation to load the repo at
1324 + --at-op: string # Operation to load the repo at
1325 + --debug # Enable debug logging
1326 + --color: string # When to colorize output (always, never, debug, auto)
1327 + --quiet # Silence non-primary command output
1328 + --no-pager # Disable the pager
1329 + --config-toml: string # Additional configuration options (can be repeated)
1330 + --help(-h) # Print help (see more with '--help')
1333 + # Remove a Git remote and forget its bookmarks
1334 + export extern "jj git remote remove" [
1335 + remote: string # The remote's name
1336 + --repository(-R): string # Path to repository to operate on
1337 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1338 + --ignore-immutable # Allow rewriting immutable commits
1339 + --at-operation: string # Operation to load the repo at
1340 + --at-op: string # Operation to load the repo at
1341 + --debug # Enable debug logging
1342 + --color: string # When to colorize output (always, never, debug, auto)
1343 + --quiet # Silence non-primary command output
1344 + --no-pager # Disable the pager
1345 + --config-toml: string # Additional configuration options (can be repeated)
1346 + --help(-h) # Print help (see more with '--help')
1349 + # Rename a Git remote
1350 + export extern "jj git remote rename" [
1351 + old: string # The name of an existing remote
1352 + new: string # The desired name for `old`
1353 + --repository(-R): string # Path to repository to operate on
1354 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1355 + --ignore-immutable # Allow rewriting immutable commits
1356 + --at-operation: string # Operation to load the repo at
1357 + --at-op: string # Operation to load the repo at
1358 + --debug # Enable debug logging
1359 + --color: string # When to colorize output (always, never, debug, auto)
1360 + --quiet # Silence non-primary command output
1361 + --no-pager # Disable the pager
1362 + --config-toml: string # Additional configuration options (can be repeated)
1363 + --help(-h) # Print help (see more with '--help')
1366 + # Set the URL of a Git remote
1367 + export extern "jj git remote set-url" [
1368 + remote: string # The remote's name
1369 + url: string # The desired url for `remote`
1370 + --repository(-R): string # Path to repository to operate on
1371 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1372 + --ignore-immutable # Allow rewriting immutable commits
1373 + --at-operation: string # Operation to load the repo at
1374 + --at-op: string # Operation to load the repo at
1375 + --debug # Enable debug logging
1376 + --color: string # When to colorize output (always, never, debug, auto)
1377 + --quiet # Silence non-primary command output
1378 + --no-pager # Disable the pager
1379 + --config-toml: string # Additional configuration options (can be repeated)
1380 + --help(-h) # Print help (see more with '--help')
1383 + # FOR INTERNAL USE ONLY Interact with git submodules
1384 + export extern "jj git submodule" [
1385 + --repository(-R): string # Path to repository to operate on
1386 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1387 + --ignore-immutable # Allow rewriting immutable commits
1388 + --at-operation: string # Operation to load the repo at
1389 + --at-op: string # Operation to load the repo at
1390 + --debug # Enable debug logging
1391 + --color: string # When to colorize output (always, never, debug, auto)
1392 + --quiet # Silence non-primary command output
1393 + --no-pager # Disable the pager
1394 + --config-toml: string # Additional configuration options (can be repeated)
1395 + --help(-h) # Print help (see more with '--help')
1398 + # Print the relevant contents from .gitmodules. For debugging purposes only
1399 + export extern "jj git submodule print-gitmodules" [
1400 + --revisions(-r): string # Read .gitmodules from the given revision
1401 + --repository(-R): string # Path to repository to operate on
1402 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1403 + --ignore-immutable # Allow rewriting immutable commits
1404 + --at-operation: string # Operation to load the repo at
1405 + --at-op: string # Operation to load the repo at
1406 + --debug # Enable debug logging
1407 + --color: string # When to colorize output (always, never, debug, auto)
1408 + --quiet # Silence non-primary command output
1409 + --no-pager # Disable the pager
1410 + --config-toml: string # Additional configuration options (can be repeated)
1411 + --help(-h) # Print help (see more with '--help')
1414 + def "nu-complete jj help keyword" [] {
1415 + [ "revsets" "tutorial" ]
1418 + # Print this message or the help of the given subcommand(s)
1419 + export extern "jj help" [
1420 + ...command: string # Print help for the subcommand(s)
1421 + --keyword(-k): string@"nu-complete jj help keyword" # Show help for keywords instead of commands
1422 + --repository(-R): string # Path to repository to operate on
1423 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1424 + --ignore-immutable # Allow rewriting immutable commits
1425 + --at-operation: string # Operation to load the repo at
1426 + --at-op: string # Operation to load the repo at
1427 + --debug # Enable debug logging
1428 + --color: string # When to colorize output (always, never, debug, auto)
1429 + --quiet # Silence non-primary command output
1430 + --no-pager # Disable the pager
1431 + --config-toml: string # Additional configuration options (can be repeated)
1432 + --help(-h) # Print help (see more with '--help')
1435 + # Create a new repo in the given directory
1436 + export extern "jj init" [
1437 + destination?: string # The destination directory
1438 + --git # DEPRECATED: Use `jj git init` Use the Git backend, creating a jj repo backed by a Git repo
1439 + --git-repo: string # DEPRECATED: Use `jj git init` Path to a git repo the jj repo will be backed by
1440 + --repository(-R): string # Path to repository to operate on
1441 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1442 + --ignore-immutable # Allow rewriting immutable commits
1443 + --at-operation: string # Operation to load the repo at
1444 + --at-op: string # Operation to load the repo at
1445 + --debug # Enable debug logging
1446 + --color: string # When to colorize output (always, never, debug, auto)
1447 + --quiet # Silence non-primary command output
1448 + --no-pager # Disable the pager
1449 + --config-toml: string # Additional configuration options (can be repeated)
1450 + --help(-h) # Print help (see more with '--help')
1453 + # Compare the changes of two commits
1454 + export extern "jj interdiff" [
1455 + --from: string # Show changes from this revision
1456 + --to: string # Show changes to this revision
1457 + ...paths: string # Restrict the diff to these paths
1458 + --summary(-s) # For each path, show only whether it was modified, added, or deleted
1459 + --stat # Show a histogram of the changes
1460 + --types # For each path, show only its type before and after
1461 + --name-only # For each path, show only its path
1462 + --git # Show a Git-format diff
1463 + --color-words # Show a word-level diff with changes indicated only by color
1464 + --tool: string # Generate diff by external command
1465 + --context: string # Number of lines of context to show
1466 + --ignore-all-space(-w) # Ignore whitespace when comparing lines
1467 + --ignore-space-change(-b) # Ignore changes in amount of whitespace when comparing lines
1468 + --repository(-R): string # Path to repository to operate on
1469 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1470 + --ignore-immutable # Allow rewriting immutable commits
1471 + --at-operation: string # Operation to load the repo at
1472 + --at-op: string # Operation to load the repo at
1473 + --debug # Enable debug logging
1474 + --color: string # When to colorize output (always, never, debug, auto)
1475 + --quiet # Silence non-primary command output
1476 + --no-pager # Disable the pager
1477 + --config-toml: string # Additional configuration options (can be repeated)
1478 + --help(-h) # Print help (see more with '--help')
1481 + # Show revision history
1482 + export extern "jj log" [
1483 + --revisions(-r): string # Which revisions to show
1484 + ...paths: string # Show revisions modifying the given paths
1485 + --reversed # Show revisions in the opposite order (older revisions first)
1486 + --limit(-n): string # Limit number of revisions to show
1487 + -l: string
1488 + --no-graph # Don't show the graph, show a flat list of revisions
1489 + --template(-T): string # Render each revision using the given template
1490 + --patch(-p) # Show patch
1491 + --summary(-s) # For each path, show only whether it was modified, added, or deleted
1492 + --stat # Show a histogram of the changes
1493 + --types # For each path, show only its type before and after
1494 + --name-only # For each path, show only its path
1495 + --git # Show a Git-format diff
1496 + --color-words # Show a word-level diff with changes indicated only by color
1497 + --tool: string # Generate diff by external command
1498 + --context: string # Number of lines of context to show
1499 + --ignore-all-space # Ignore whitespace when comparing lines
1500 + --ignore-space-change # Ignore changes in amount of whitespace when comparing lines
1501 + --repository(-R): string # Path to repository to operate on
1502 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1503 + --ignore-immutable # Allow rewriting immutable commits
1504 + --at-operation: string # Operation to load the repo at
1505 + --at-op: string # Operation to load the repo at
1506 + --debug # Enable debug logging
1507 + --color: string # When to colorize output (always, never, debug, auto)
1508 + --quiet # Silence non-primary command output
1509 + --no-pager # Disable the pager
1510 + --config-toml: string # Additional configuration options (can be repeated)
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')
1558 + # Create a new, empty change and (by default) edit it in the working copy
1559 + export extern "jj new" [
1560 + ...revisions: string # Parent(s) of the new change
1561 + -d # Ignored (but lets you pass `-d`/`-r` for consistency with other commands)
1562 + --message(-m): string # The change description to use
1563 + --no-edit # Do not edit the newly created change
1564 + --edit # No-op flag to pair with --no-edit
1565 + --insert-after(-A): string # Insert the new change after the given commit(s)
1566 + --after: string # Insert the new change after the given commit(s)
1567 + --insert-before(-B): string # Insert the new change before the given commit(s)
1568 + --before: string # Insert the new change before the given commit(s)
1569 + --repository(-R): string # Path to repository to operate on
1570 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1571 + --ignore-immutable # Allow rewriting immutable commits
1572 + --at-operation: string # Operation to load the repo at
1573 + --at-op: string # Operation to load the repo at
1574 + --debug # Enable debug logging
1575 + --color: string # When to colorize output (always, never, debug, auto)
1576 + --quiet # Silence non-primary command output
1577 + --no-pager # Disable the pager
1578 + --config-toml: string # Additional configuration options (can be repeated)
1579 + --help(-h) # Print help (see more with '--help')
1582 + # Move the working-copy commit to the child revision
1583 + export extern "jj next" [
1584 + offset?: string # How many revisions to move forward. Advances to the next child by default
1585 + --edit(-e) # Instead of creating a new working-copy commit on top of the target commit (like `jj new`), edit the target commit directly (like `jj edit`)
1586 + --no-edit(-n) # The inverse of `--edit`
1587 + --conflict # Jump to the next conflicted descendant
1588 + --repository(-R): string # Path to repository to operate on
1589 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1590 + --ignore-immutable # Allow rewriting immutable commits
1591 + --at-operation: string # Operation to load the repo at
1592 + --at-op: string # Operation to load the repo at
1593 + --debug # Enable debug logging
1594 + --color: string # When to colorize output (always, never, debug, auto)
1595 + --quiet # Silence non-primary command output
1596 + --no-pager # Disable the pager
1597 + --config-toml: string # Additional configuration options (can be repeated)
1598 + --help(-h) # Print help (see more with '--help')
1601 + # Commands for working with the operation log
1602 + export extern "jj operation" [
1603 + --repository(-R): string # Path to repository to operate on
1604 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1605 + --ignore-immutable # Allow rewriting immutable commits
1606 + --at-operation: string # Operation to load the repo at
1607 + --at-op: string # Operation to load the repo at
1608 + --debug # Enable debug logging
1609 + --color: string # When to colorize output (always, never, debug, auto)
1610 + --quiet # Silence non-primary command output
1611 + --no-pager # Disable the pager
1612 + --config-toml: string # Additional configuration options (can be repeated)
1613 + --help(-h) # Print help (see more with '--help')
1616 + # Abandon operation history
1617 + export extern "jj operation abandon" [
1618 + operation: string # The operation or operation range to abandon
1619 + --repository(-R): string # Path to repository to operate on
1620 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1621 + --ignore-immutable # Allow rewriting immutable commits
1622 + --at-operation: string # Operation to load the repo at
1623 + --at-op: string # Operation to load the repo at
1624 + --debug # Enable debug logging
1625 + --color: string # When to colorize output (always, never, debug, auto)
1626 + --quiet # Silence non-primary command output
1627 + --no-pager # Disable the pager
1628 + --config-toml: string # Additional configuration options (can be repeated)
1629 + --help(-h) # Print help (see more with '--help')
1632 + # Compare changes to the repository between two operations
1633 + export extern "jj operation diff" [
1634 + --operation: string # Show repository changes in this operation, compared to its parent
1635 + --op: string # Show repository changes in this operation, compared to its parent
1636 + --from: string # Show repository changes from this operation
1637 + --to: string # Show repository changes to this operation
1638 + --no-graph # Don't show the graph, show a flat list of modified changes
1639 + --patch(-p) # Show patch of modifications to changes
1640 + --summary(-s) # For each path, show only whether it was modified, added, or deleted
1641 + --stat # Show a histogram of the changes
1642 + --types # For each path, show only its type before and after
1643 + --name-only # For each path, show only its path
1644 + --git # Show a Git-format diff
1645 + --color-words # Show a word-level diff with changes indicated only by color
1646 + --tool: string # Generate diff by external command
1647 + --context: string # Number of lines of context to show
1648 + --ignore-all-space # Ignore whitespace when comparing lines
1649 + --ignore-space-change # Ignore changes in amount of whitespace when comparing lines
1650 + --repository(-R): string # Path to repository to operate on
1651 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1652 + --ignore-immutable # Allow rewriting immutable commits
1653 + --at-operation: string # Operation to load the repo at
1654 + --at-op: string # Operation to load the repo at
1655 + --debug # Enable debug logging
1656 + --color: string # When to colorize output (always, never, debug, auto)
1657 + --quiet # Silence non-primary command output
1658 + --no-pager # Disable the pager
1659 + --config-toml: string # Additional configuration options (can be repeated)
1660 + --help(-h) # Print help (see more with '--help')
1663 + # Show the operation log
1664 + export extern "jj operation log" [
1665 + --limit(-n): string # Limit number of operations to show
1666 + -l: string
1667 + --no-graph # Don't show the graph, show a flat list of operations
1668 + --template(-T): string # Render each operation using the given template
1669 + --op-diff # Show changes to the repository at each operation
1670 + --patch(-p) # Show patch of modifications to changes (implies --op-diff)
1671 + --summary(-s) # For each path, show only whether it was modified, added, or deleted
1672 + --stat # Show a histogram of the changes
1673 + --types # For each path, show only its type before and after
1674 + --name-only # For each path, show only its path
1675 + --git # Show a Git-format diff
1676 + --color-words # Show a word-level diff with changes indicated only by color
1677 + --tool: string # Generate diff by external command
1678 + --context: string # Number of lines of context to show
1679 + --ignore-all-space # Ignore whitespace when comparing lines
1680 + --ignore-space-change # Ignore changes in amount of whitespace when comparing lines
1681 + --repository(-R): string # Path to repository to operate on
1682 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1683 + --ignore-immutable # Allow rewriting immutable commits
1684 + --at-operation: string # Operation to load the repo at
1685 + --at-op: string # Operation to load the repo at
1686 + --debug # Enable debug logging
1687 + --color: string # When to colorize output (always, never, debug, auto)
1688 + --quiet # Silence non-primary command output
1689 + --no-pager # Disable the pager
1690 + --config-toml: string # Additional configuration options (can be repeated)
1691 + --help(-h) # Print help (see more with '--help')
1694 + def "nu-complete jj operation restore what" [] {
1695 + [ "repo" "remote-tracking" ]
1698 + # Create a new operation that restores the repo to an earlier state
1699 + export extern "jj operation restore" [
1700 + operation: string # The operation to restore to
1701 + --what: string@"nu-complete jj operation restore what" # What portions of the local state to restore (can be repeated)
1702 + --repository(-R): string # Path to repository to operate on
1703 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1704 + --ignore-immutable # Allow rewriting immutable commits
1705 + --at-operation: string # Operation to load the repo at
1706 + --at-op: string # Operation to load the repo at
1707 + --debug # Enable debug logging
1708 + --color: string # When to colorize output (always, never, debug, auto)
1709 + --quiet # Silence non-primary command output
1710 + --no-pager # Disable the pager
1711 + --config-toml: string # Additional configuration options (can be repeated)
1712 + --help(-h) # Print help (see more with '--help')
1715 + # Show changes to the repository in an operation
1716 + export extern "jj operation show" [
1717 + operation?: string # Show repository changes in this operation, compared to its parent(s)
1718 + --no-graph # Don't show the graph, show a flat list of modified changes
1719 + --patch(-p) # Show patch of modifications to changes
1720 + --summary(-s) # For each path, show only whether it was modified, added, or deleted
1721 + --stat # Show a histogram of the changes
1722 + --types # For each path, show only its type before and after
1723 + --name-only # For each path, show only its path
1724 + --git # Show a Git-format diff
1725 + --color-words # Show a word-level diff with changes indicated only by color
1726 + --tool: string # Generate diff by external command
1727 + --context: string # Number of lines of context to show
1728 + --ignore-all-space # Ignore whitespace when comparing lines
1729 + --ignore-space-change # Ignore changes in amount of whitespace when comparing lines
1730 + --repository(-R): string # Path to repository to operate on
1731 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1732 + --ignore-immutable # Allow rewriting immutable commits
1733 + --at-operation: string # Operation to load the repo at
1734 + --at-op: string # Operation to load the repo at
1735 + --debug # Enable debug logging
1736 + --color: string # When to colorize output (always, never, debug, auto)
1737 + --quiet # Silence non-primary command output
1738 + --no-pager # Disable the pager
1739 + --config-toml: string # Additional configuration options (can be repeated)
1740 + --help(-h) # Print help (see more with '--help')
1743 + def "nu-complete jj operation undo what" [] {
1744 + [ "repo" "remote-tracking" ]
1747 + # Create a new operation that undoes an earlier operation
1748 + export extern "jj operation undo" [
1749 + operation?: string # The operation to undo
1750 + --what: string@"nu-complete jj operation undo what" # What portions of the local state to restore (can be repeated)
1751 + --repository(-R): string # Path to repository to operate on
1752 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1753 + --ignore-immutable # Allow rewriting immutable commits
1754 + --at-operation: string # Operation to load the repo at
1755 + --at-op: string # Operation to load the repo at
1756 + --debug # Enable debug logging
1757 + --color: string # When to colorize output (always, never, debug, auto)
1758 + --quiet # Silence non-primary command output
1759 + --no-pager # Disable the pager
1760 + --config-toml: string # Additional configuration options (can be repeated)
1761 + --help(-h) # Print help (see more with '--help')
1764 + # Parallelize revisions by making them siblings
1765 + export extern "jj parallelize" [
1766 + ...revisions: string # Revisions to parallelize
1767 + --repository(-R): string # Path to repository to operate on
1768 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1769 + --ignore-immutable # Allow rewriting immutable commits
1770 + --at-operation: string # Operation to load the repo at
1771 + --at-op: string # Operation to load the repo at
1772 + --debug # Enable debug logging
1773 + --color: string # When to colorize output (always, never, debug, auto)
1774 + --quiet # Silence non-primary command output
1775 + --no-pager # Disable the pager
1776 + --config-toml: string # Additional configuration options (can be repeated)
1777 + --help(-h) # Print help (see more with '--help')
1780 + # Change the working copy revision relative to the parent revision
1781 + export extern "jj prev" [
1782 + offset?: string # How many revisions to move backward. Moves to the parent by default
1783 + --edit(-e) # Edit the parent directly, instead of moving the working-copy commit
1784 + --no-edit(-n) # The inverse of `--edit`
1785 + --conflict # Jump to the previous conflicted ancestor
1786 + --repository(-R): string # Path to repository to operate on
1787 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1788 + --ignore-immutable # Allow rewriting immutable commits
1789 + --at-operation: string # Operation to load the repo at
1790 + --at-op: string # Operation to load the repo at
1791 + --debug # Enable debug logging
1792 + --color: string # When to colorize output (always, never, debug, auto)
1793 + --quiet # Silence non-primary command output
1794 + --no-pager # Disable the pager
1795 + --config-toml: string # Additional configuration options (can be repeated)
1796 + --help(-h) # Print help (see more with '--help')
1799 + # Move revisions to different parent(s)
1800 + export extern "jj rebase" [
1801 + --branch(-b): string # Rebase the whole branch relative to destination's ancestors (can be repeated)
1802 + --source(-s): string # Rebase specified revision(s) together with their trees of descendants (can be repeated)
1803 + --revisions(-r): string # Rebase the given revisions, rebasing descendants onto this revision's parent(s)
1804 + --destination(-d): string # The revision(s) to rebase onto (can be repeated to create a merge commit)
1805 + --insert-after(-A): string # The revision(s) to insert after (can be repeated to create a merge commit)
1806 + --after: string # The revision(s) to insert after (can be repeated to create a merge commit)
1807 + --insert-before(-B): string # The revision(s) to insert before (can be repeated to create a merge commit)
1808 + --before: string # The revision(s) to insert before (can be repeated to create a merge commit)
1809 + --skip-empty # Deprecated. Use --skip-emptied instead
1810 + --skip-emptied # If true, when rebasing would produce an empty commit, the commit is abandoned. It will not be abandoned if it was already empty before the rebase. Will never skip merge commits with multiple non-empty parents
1811 + --repository(-R): string # Path to repository to operate on
1812 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1813 + --ignore-immutable # Allow rewriting immutable commits
1814 + --at-operation: string # Operation to load the repo at
1815 + --at-op: string # Operation to load the repo at
1816 + --debug # Enable debug logging
1817 + --color: string # When to colorize output (always, never, debug, auto)
1818 + --quiet # Silence non-primary command output
1819 + --no-pager # Disable the pager
1820 + --config-toml: string # Additional configuration options (can be repeated)
1821 + --help(-h) # Print help (see more with '--help')
1824 + # Resolve a conflicted file with an external merge tool
1825 + export extern "jj resolve" [
1826 + --revision(-r): string
1827 + --list(-l) # Instead of resolving one conflict, list all the conflicts
1828 + --tool: string # Specify 3-way merge tool to be used
1829 + ...paths: string # Restrict to these paths when searching for a conflict to resolve. We will attempt to resolve the first conflict we can find. You can use the `--list` argument to find paths to use here
1830 + --repository(-R): string # Path to repository to operate on
1831 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1832 + --ignore-immutable # Allow rewriting immutable commits
1833 + --at-operation: string # Operation to load the repo at
1834 + --at-op: string # Operation to load the repo at
1835 + --debug # Enable debug logging
1836 + --color: string # When to colorize output (always, never, debug, auto)
1837 + --quiet # Silence non-primary command output
1838 + --no-pager # Disable the pager
1839 + --config-toml: string # Additional configuration options (can be repeated)
1840 + --help(-h) # Print help (see more with '--help')
1843 + # Restore paths from another revision
1844 + export extern "jj restore" [
1845 + ...paths: string # Restore only these paths (instead of all paths)
1846 + --from: string # Revision to restore from (source)
1847 + --to: string # Revision to restore into (destination)
1848 + --changes-in(-c): string # Undo the changes in a revision as compared to the merge of its parents
1849 + --revision(-r): string # Prints an error. DO NOT USE
1850 + --restore-descendants # Preserve the content (not the diff) when rebasing descendants
1851 + --repository(-R): string # Path to repository to operate on
1852 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1853 + --ignore-immutable # Allow rewriting immutable commits
1854 + --at-operation: string # Operation to load the repo at
1855 + --at-op: string # Operation to load the repo at
1856 + --debug # Enable debug logging
1857 + --color: string # When to colorize output (always, never, debug, auto)
1858 + --quiet # Silence non-primary command output
1859 + --no-pager # Disable the pager
1860 + --config-toml: string # Additional configuration options (can be repeated)
1861 + --help(-h) # Print help (see more with '--help')
1864 + # A dummy command that accepts any arguments
1865 + export extern "jj revert" [
1866 + ..._args: string
1867 + --repository(-R): string # Path to repository to operate on
1868 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1869 + --ignore-immutable # Allow rewriting immutable commits
1870 + --at-operation: string # Operation to load the repo at
1871 + --at-op: string # Operation to load the repo at
1872 + --debug # Enable debug logging
1873 + --color: string # When to colorize output (always, never, debug, auto)
1874 + --quiet # Silence non-primary command output
1875 + --no-pager # Disable the pager
1876 + --config-toml: string # Additional configuration options (can be repeated)
1877 + --help(-h) # Print help (see more with '--help')
1880 + # Show the current workspace root directory
1881 + export extern "jj root" [
1882 + --repository(-R): string # Path to repository to operate on
1883 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1884 + --ignore-immutable # Allow rewriting immutable commits
1885 + --at-operation: string # Operation to load the repo at
1886 + --at-op: string # Operation to load the repo at
1887 + --debug # Enable debug logging
1888 + --color: string # When to colorize output (always, never, debug, auto)
1889 + --quiet # Silence non-primary command output
1890 + --no-pager # Disable the pager
1891 + --config-toml: string # Additional configuration options (can be repeated)
1892 + --help(-h) # Print help (see more with '--help')
1895 + # (**Stub**, does not work yet) Run a command across a set of revisions.
1896 + export extern "jj run" [
1897 + shell_command: string # The command to run across all selected revisions
1898 + --revisions(-r): string # The revisions to change
1899 + -x # A no-op option to match the interface of `git rebase -x`
1900 + --jobs(-j): string # How many processes should run in parallel, uses by default all cores
1901 + --repository(-R): string # Path to repository to operate on
1902 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1903 + --ignore-immutable # Allow rewriting immutable commits
1904 + --at-operation: string # Operation to load the repo at
1905 + --at-op: string # Operation to load the repo at
1906 + --debug # Enable debug logging
1907 + --color: string # When to colorize output (always, never, debug, auto)
1908 + --quiet # Silence non-primary command output
1909 + --no-pager # Disable the pager
1910 + --config-toml: string # Additional configuration options (can be repeated)
1911 + --help(-h) # Print help (see more with '--help')
1914 + # Show commit description and changes in a revision
1915 + export extern "jj show" [
1916 + revision?: string # Show changes in this revision, compared to its parent(s)
1917 + -r # Ignored (but lets you pass `-r` for consistency with other commands)
1918 + --template(-T): string # Render a revision using the given template
1919 + --summary(-s) # For each path, show only whether it was modified, added, or deleted
1920 + --stat # Show a histogram of the changes
1921 + --types # For each path, show only its type before and after
1922 + --name-only # For each path, show only its path
1923 + --git # Show a Git-format diff
1924 + --color-words # Show a word-level diff with changes indicated only by color
1925 + --tool: string # Generate diff by external command
1926 + --context: string # Number of lines of context to show
1927 + --ignore-all-space # Ignore whitespace when comparing lines
1928 + --ignore-space-change # Ignore changes in amount of whitespace when comparing lines
1929 + --repository(-R): string # Path to repository to operate on
1930 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1931 + --ignore-immutable # Allow rewriting immutable commits
1932 + --at-operation: string # Operation to load the repo at
1933 + --at-op: string # Operation to load the repo at
1934 + --debug # Enable debug logging
1935 + --color: string # When to colorize output (always, never, debug, auto)
1936 + --quiet # Silence non-primary command output
1937 + --no-pager # Disable the pager
1938 + --config-toml: string # Additional configuration options (can be repeated)
1939 + --help(-h) # Print help (see more with '--help')
1942 + # Simplify parent edges for the specified revision(s)
1943 + export extern "jj simplify-parents" [
1944 + --source(-s): string # Simplify specified revision(s) together with their trees of descendants (can be repeated)
1945 + --revisions(-r): string # Simplify specified revision(s) (can be repeated)
1946 + --repository(-R): string # Path to repository to operate on
1947 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1948 + --ignore-immutable # Allow rewriting immutable commits
1949 + --at-operation: string # Operation to load the repo at
1950 + --at-op: string # Operation to load the repo at
1951 + --debug # Enable debug logging
1952 + --color: string # When to colorize output (always, never, debug, auto)
1953 + --quiet # Silence non-primary command output
1954 + --no-pager # Disable the pager
1955 + --config-toml: string # Additional configuration options (can be repeated)
1956 + --help(-h) # Print help (see more with '--help')
1959 + # Manage which paths from the working-copy commit are present in the working copy
1960 + export extern "jj sparse" [
1961 + --repository(-R): string # Path to repository to operate on
1962 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1963 + --ignore-immutable # Allow rewriting immutable commits
1964 + --at-operation: string # Operation to load the repo at
1965 + --at-op: string # Operation to load the repo at
1966 + --debug # Enable debug logging
1967 + --color: string # When to colorize output (always, never, debug, auto)
1968 + --quiet # Silence non-primary command output
1969 + --no-pager # Disable the pager
1970 + --config-toml: string # Additional configuration options (can be repeated)
1971 + --help(-h) # Print help (see more with '--help')
1974 + # Start an editor to update the patterns that are present in the working copy
1975 + export extern "jj sparse edit" [
1976 + --repository(-R): string # Path to repository to operate on
1977 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1978 + --ignore-immutable # Allow rewriting immutable commits
1979 + --at-operation: string # Operation to load the repo at
1980 + --at-op: string # Operation to load the repo at
1981 + --debug # Enable debug logging
1982 + --color: string # When to colorize output (always, never, debug, auto)
1983 + --quiet # Silence non-primary command output
1984 + --no-pager # Disable the pager
1985 + --config-toml: string # Additional configuration options (can be repeated)
1986 + --help(-h) # Print help (see more with '--help')
1989 + # List the patterns that are currently present in the working copy
1990 + export extern "jj sparse list" [
1991 + --repository(-R): string # Path to repository to operate on
1992 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
1993 + --ignore-immutable # Allow rewriting immutable commits
1994 + --at-operation: string # Operation to load the repo at
1995 + --at-op: string # Operation to load the repo at
1996 + --debug # Enable debug logging
1997 + --color: string # When to colorize output (always, never, debug, auto)
1998 + --quiet # Silence non-primary command output
1999 + --no-pager # Disable the pager
2000 + --config-toml: string # Additional configuration options (can be repeated)
2001 + --help(-h) # Print help (see more with '--help')
2004 + # Reset the patterns to include all files in the working copy
2005 + export extern "jj sparse reset" [
2006 + --repository(-R): string # Path to repository to operate on
2007 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
2008 + --ignore-immutable # Allow rewriting immutable commits
2009 + --at-operation: string # Operation to load the repo at
2010 + --at-op: string # Operation to load the repo at
2011 + --debug # Enable debug logging
2012 + --color: string # When to colorize output (always, never, debug, auto)
2013 + --quiet # Silence non-primary command output
2014 + --no-pager # Disable the pager
2015 + --config-toml: string # Additional configuration options (can be repeated)
2016 + --help(-h) # Print help (see more with '--help')
2019 + # Update the patterns that are present in the working copy
2020 + export extern "jj sparse set" [
2021 + --add: string # Patterns to add to the working copy
2022 + --remove: string # Patterns to remove from the working copy
2023 + --clear # Include no files in the working copy (combine with --add)
2024 + --repository(-R): string # Path to repository to operate on
2025 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
2026 + --ignore-immutable # Allow rewriting immutable commits
2027 + --at-operation: string # Operation to load the repo at
2028 + --at-op: string # Operation to load the repo at
2029 + --debug # Enable debug logging
2030 + --color: string # When to colorize output (always, never, debug, auto)
2031 + --quiet # Silence non-primary command output
2032 + --no-pager # Disable the pager
2033 + --config-toml: string # Additional configuration options (can be repeated)
2034 + --help(-h) # Print help (see more with '--help')
2037 + # Split a revision in two
2038 + export extern "jj split" [
2039 + --interactive(-i) # Interactively choose which parts to split. This is the default if no paths are provided
2040 + --tool: string # Specify diff editor to be used (implies --interactive)
2041 + --revision(-r): string # The revision to split
2042 + --parallel(-p) # Split the revision into two parallel revisions instead of a parent and child
2043 + ...paths: string # Put these paths in the first commit
2044 + --repository(-R): string # Path to repository to operate on
2045 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
2046 + --ignore-immutable # Allow rewriting immutable commits
2047 + --at-operation: string # Operation to load the repo at
2048 + --at-op: string # Operation to load the repo at
2049 + --debug # Enable debug logging
2050 + --color: string # When to colorize output (always, never, debug, auto)
2051 + --quiet # Silence non-primary command output
2052 + --no-pager # Disable the pager
2053 + --config-toml: string # Additional configuration options (can be repeated)
2054 + --help(-h) # Print help (see more with '--help')
2057 + # Move changes from a revision into another revision
2058 + export extern "jj squash" [
2059 + --revision(-r): string # Revision to squash into its parent (default: @)
2060 + --from(-f): string # Revision(s) to squash from (default: @)
2061 + --into(-t): string # Revision to squash into (default: @)
2062 + --to: string # Revision to squash into (default: @)
2063 + --message(-m): string # The description to use for squashed revision (don't open editor)
2064 + --use-destination-message(-u) # Use the description of the destination revision and discard the description(s) of the source revision(s)
2065 + --interactive(-i) # Interactively choose which parts to squash
2066 + --tool: string # Specify diff editor to be used (implies --interactive)
2067 + ...paths: string # Move only changes to these paths (instead of all paths)
2068 + --keep-emptied(-k) # The source revision will not be abandoned
2069 + --repository(-R): string # Path to repository to operate on
2070 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
2071 + --ignore-immutable # Allow rewriting immutable commits
2072 + --at-operation: string # Operation to load the repo at
2073 + --at-op: string # Operation to load the repo at
2074 + --debug # Enable debug logging
2075 + --color: string # When to colorize output (always, never, debug, auto)
2076 + --quiet # Silence non-primary command output
2077 + --no-pager # Disable the pager
2078 + --config-toml: string # Additional configuration options (can be repeated)
2079 + --help(-h) # Print help (see more with '--help')
2082 + # Show high-level repo status
2083 + export extern "jj status" [
2084 + ...paths: string # Restrict the status display to these paths
2085 + --repository(-R): string # Path to repository to operate on
2086 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
2087 + --ignore-immutable # Allow rewriting immutable commits
2088 + --at-operation: string # Operation to load the repo at
2089 + --at-op: string # Operation to load the repo at
2090 + --debug # Enable debug logging
2091 + --color: string # When to colorize output (always, never, debug, auto)
2092 + --quiet # Silence non-primary command output
2093 + --no-pager # Disable the pager
2094 + --config-toml: string # Additional configuration options (can be repeated)
2095 + --help(-h) # Print help (see more with '--help')
2098 + # Manage tags
2099 + export extern "jj tag" [
2100 + --repository(-R): string # Path to repository to operate on
2101 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
2102 + --ignore-immutable # Allow rewriting immutable commits
2103 + --at-operation: string # Operation to load the repo at
2104 + --at-op: string # Operation to load the repo at
2105 + --debug # Enable debug logging
2106 + --color: string # When to colorize output (always, never, debug, auto)
2107 + --quiet # Silence non-primary command output
2108 + --no-pager # Disable the pager
2109 + --config-toml: string # Additional configuration options (can be repeated)
2110 + --help(-h) # Print help (see more with '--help')
2113 + # List tags
2114 + export extern "jj tag list" [
2115 + ...names: string # Show tags whose local name matches
2116 + --template(-T): string # Render each tag using the given template
2117 + --repository(-R): string # Path to repository to operate on
2118 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
2119 + --ignore-immutable # Allow rewriting immutable commits
2120 + --at-operation: string # Operation to load the repo at
2121 + --at-op: string # Operation to load the repo at
2122 + --debug # Enable debug logging
2123 + --color: string # When to colorize output (always, never, debug, auto)
2124 + --quiet # Silence non-primary command output
2125 + --no-pager # Disable the pager
2126 + --config-toml: string # Additional configuration options (can be repeated)
2127 + --help(-h) # Print help (see more with '--help')
2130 + # Infrequently used commands such as for generating shell completions
2131 + export extern "jj util" [
2132 + --repository(-R): string # Path to repository to operate on
2133 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
2134 + --ignore-immutable # Allow rewriting immutable commits
2135 + --at-operation: string # Operation to load the repo at
2136 + --at-op: string # Operation to load the repo at
2137 + --debug # Enable debug logging
2138 + --color: string # When to colorize output (always, never, debug, auto)
2139 + --quiet # Silence non-primary command output
2140 + --no-pager # Disable the pager
2141 + --config-toml: string # Additional configuration options (can be repeated)
2142 + --help(-h) # Print help (see more with '--help')
2145 + def "nu-complete jj util completion shell" [] {
2146 + [ "bash" "elvish" "fish" "nushell" "power-shell" "zsh" ]
2149 + # Print a command-line-completion script
2150 + export extern "jj util completion" [
2151 + shell?: string@"nu-complete jj util completion shell"
2152 + --bash # Deprecated. Use the SHELL positional argument instead
2153 + --fish # Deprecated. Use the SHELL positional argument instead
2154 + --zsh # Deprecated. Use the SHELL positional argument instead
2155 + --repository(-R): string # Path to repository to operate on
2156 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
2157 + --ignore-immutable # Allow rewriting immutable commits
2158 + --at-operation: string # Operation to load the repo at
2159 + --at-op: string # Operation to load the repo at
2160 + --debug # Enable debug logging
2161 + --color: string # When to colorize output (always, never, debug, auto)
2162 + --quiet # Silence non-primary command output
2163 + --no-pager # Disable the pager
2164 + --config-toml: string # Additional configuration options (can be repeated)
2165 + --help(-h) # Print help (see more with '--help')
2168 + # Print the JSON schema for the jj TOML config format
2169 + export extern "jj util config-schema" [
2170 + --repository(-R): string # Path to repository to operate on
2171 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
2172 + --ignore-immutable # Allow rewriting immutable commits
2173 + --at-operation: string # Operation to load the repo at
2174 + --at-op: string # Operation to load the repo at
2175 + --debug # Enable debug logging
2176 + --color: string # When to colorize output (always, never, debug, auto)
2177 + --quiet # Silence non-primary command output
2178 + --no-pager # Disable the pager
2179 + --config-toml: string # Additional configuration options (can be repeated)
2180 + --help(-h) # Print help (see more with '--help')
2183 + # Run backend-dependent garbage collection
2184 + export extern "jj util gc" [
2185 + --expire: string # Time threshold
2186 + --repository(-R): string # Path to repository to operate on
2187 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
2188 + --ignore-immutable # Allow rewriting immutable commits
2189 + --at-operation: string # Operation to load the repo at
2190 + --at-op: string # Operation to load the repo at
2191 + --debug # Enable debug logging
2192 + --color: string # When to colorize output (always, never, debug, auto)
2193 + --quiet # Silence non-primary command output
2194 + --no-pager # Disable the pager
2195 + --config-toml: string # Additional configuration options (can be repeated)
2196 + --help(-h) # Print help (see more with '--help')
2199 + # Print a ROFF (manpage)
2200 + export extern "jj util mangen" [
2201 + --repository(-R): string # Path to repository to operate on
2202 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
2203 + --ignore-immutable # Allow rewriting immutable commits
2204 + --at-operation: string # Operation to load the repo at
2205 + --at-op: string # Operation to load the repo at
2206 + --debug # Enable debug logging
2207 + --color: string # When to colorize output (always, never, debug, auto)
2208 + --quiet # Silence non-primary command output
2209 + --no-pager # Disable the pager
2210 + --config-toml: string # Additional configuration options (can be repeated)
2211 + --help(-h) # Print help (see more with '--help')
2214 + # Print the CLI help for all subcommands in Markdown
2215 + export extern "jj util markdown-help" [
2216 + --repository(-R): string # Path to repository to operate on
2217 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
2218 + --ignore-immutable # Allow rewriting immutable commits
2219 + --at-operation: string # Operation to load the repo at
2220 + --at-op: string # Operation to load the repo at
2221 + --debug # Enable debug logging
2222 + --color: string # When to colorize output (always, never, debug, auto)
2223 + --quiet # Silence non-primary command output
2224 + --no-pager # Disable the pager
2225 + --config-toml: string # Additional configuration options (can be repeated)
2226 + --help(-h) # Print help (see more with '--help')
2229 + def "nu-complete jj undo what" [] {
2230 + [ "repo" "remote-tracking" ]
2233 + # Undo an operation (shortcut for `jj op undo`)
2234 + export extern "jj undo" [
2235 + operation?: string # The operation to undo
2236 + --what: string@"nu-complete jj undo what" # What portions of the local state to restore (can be repeated)
2237 + --repository(-R): string # Path to repository to operate on
2238 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
2239 + --ignore-immutable # Allow rewriting immutable commits
2240 + --at-operation: string # Operation to load the repo at
2241 + --at-op: string # Operation to load the repo at
2242 + --debug # Enable debug logging
2243 + --color: string # When to colorize output (always, never, debug, auto)
2244 + --quiet # Silence non-primary command output
2245 + --no-pager # Disable the pager
2246 + --config-toml: string # Additional configuration options (can be repeated)
2247 + --help(-h) # Print help (see more with '--help')
2250 + # Move changes from a revision's parent into the revision
2251 + export extern "jj unsquash" [
2252 + --revision(-r): string
2253 + --interactive(-i) # Interactively choose which parts to unsquash
2254 + --tool: string # Specify diff editor to be used (implies --interactive)
2255 + --repository(-R): string # Path to repository to operate on
2256 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
2257 + --ignore-immutable # Allow rewriting immutable commits
2258 + --at-operation: string # Operation to load the repo at
2259 + --at-op: string # Operation to load the repo at
2260 + --debug # Enable debug logging
2261 + --color: string # When to colorize output (always, never, debug, auto)
2262 + --quiet # Silence non-primary command output
2263 + --no-pager # Disable the pager
2264 + --config-toml: string # Additional configuration options (can be repeated)
2265 + --help(-h) # Print help (see more with '--help')
2268 + # Stop tracking specified paths in the working copy
2269 + export extern "jj untrack" [
2270 + ...paths: string # Paths to untrack. They must already be ignored
2271 + --repository(-R): string # Path to repository to operate on
2272 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
2273 + --ignore-immutable # Allow rewriting immutable commits
2274 + --at-operation: string # Operation to load the repo at
2275 + --at-op: string # Operation to load the repo at
2276 + --debug # Enable debug logging
2277 + --color: string # When to colorize output (always, never, debug, auto)
2278 + --quiet # Silence non-primary command output
2279 + --no-pager # Disable the pager
2280 + --config-toml: string # Additional configuration options (can be repeated)
2281 + --help(-h) # Print help (see more with '--help')
2284 + # Display version information
2285 + export extern "jj version" [
2286 + --repository(-R): string # Path to repository to operate on
2287 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
2288 + --ignore-immutable # Allow rewriting immutable commits
2289 + --at-operation: string # Operation to load the repo at
2290 + --at-op: string # Operation to load the repo at
2291 + --debug # Enable debug logging
2292 + --color: string # When to colorize output (always, never, debug, auto)
2293 + --quiet # Silence non-primary command output
2294 + --no-pager # Disable the pager
2295 + --config-toml: string # Additional configuration options (can be repeated)
2296 + --help(-h) # Print help (see more with '--help')
2299 + # Commands for working with workspaces
2300 + export extern "jj workspace" [
2301 + --repository(-R): string # Path to repository to operate on
2302 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
2303 + --ignore-immutable # Allow rewriting immutable commits
2304 + --at-operation: string # Operation to load the repo at
2305 + --at-op: string # Operation to load the repo at
2306 + --debug # Enable debug logging
2307 + --color: string # When to colorize output (always, never, debug, auto)
2308 + --quiet # Silence non-primary command output
2309 + --no-pager # Disable the pager
2310 + --config-toml: string # Additional configuration options (can be repeated)
2311 + --help(-h) # Print help (see more with '--help')
2314 + def "nu-complete jj workspace add sparse_patterns" [] {
2315 + [ "copy" "full" "empty" ]
2318 + # Add a workspace
2319 + export extern "jj workspace add" [
2320 + destination: string # Where to create the new workspace
2321 + --name: string # A name for the workspace
2322 + --revision(-r): string # A list of parent revisions for the working-copy commit of the newly created workspace. You may specify nothing, or any number of parents
2323 + --sparse-patterns: string@"nu-complete jj workspace add sparse_patterns" # How to handle sparse patterns when creating a new workspace
2324 + --repository(-R): string # Path to repository to operate on
2325 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
2326 + --ignore-immutable # Allow rewriting immutable commits
2327 + --at-operation: string # Operation to load the repo at
2328 + --at-op: string # Operation to load the repo at
2329 + --debug # Enable debug logging
2330 + --color: string # When to colorize output (always, never, debug, auto)
2331 + --quiet # Silence non-primary command output
2332 + --no-pager # Disable the pager
2333 + --config-toml: string # Additional configuration options (can be repeated)
2334 + --help(-h) # Print help (see more with '--help')
2337 + # Stop tracking a workspace's working-copy commit in the repo
2338 + export extern "jj workspace forget" [
2339 + ...workspaces: string # Names of the workspaces to forget. By default, forgets only the current workspace
2340 + --repository(-R): string # Path to repository to operate on
2341 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
2342 + --ignore-immutable # Allow rewriting immutable commits
2343 + --at-operation: string # Operation to load the repo at
2344 + --at-op: string # Operation to load the repo at
2345 + --debug # Enable debug logging
2346 + --color: string # When to colorize output (always, never, debug, auto)
2347 + --quiet # Silence non-primary command output
2348 + --no-pager # Disable the pager
2349 + --config-toml: string # Additional configuration options (can be repeated)
2350 + --help(-h) # Print help (see more with '--help')
2353 + # List workspaces
2354 + export extern "jj workspace list" [
2355 + --repository(-R): string # Path to repository to operate on
2356 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
2357 + --ignore-immutable # Allow rewriting immutable commits
2358 + --at-operation: string # Operation to load the repo at
2359 + --at-op: string # Operation to load the repo at
2360 + --debug # Enable debug logging
2361 + --color: string # When to colorize output (always, never, debug, auto)
2362 + --quiet # Silence non-primary command output
2363 + --no-pager # Disable the pager
2364 + --config-toml: string # Additional configuration options (can be repeated)
2365 + --help(-h) # Print help (see more with '--help')
2368 + # Renames the current workspace
2369 + export extern "jj workspace rename" [
2370 + new_workspace_name: string # The name of the workspace to update to
2371 + --repository(-R): string # Path to repository to operate on
2372 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
2373 + --ignore-immutable # Allow rewriting immutable commits
2374 + --at-operation: string # Operation to load the repo at
2375 + --at-op: string # Operation to load the repo at
2376 + --debug # Enable debug logging
2377 + --color: string # When to colorize output (always, never, debug, auto)
2378 + --quiet # Silence non-primary command output
2379 + --no-pager # Disable the pager
2380 + --config-toml: string # Additional configuration options (can be repeated)
2381 + --help(-h) # Print help (see more with '--help')
2384 + # Show the current workspace root directory
2385 + export extern "jj workspace root" [
2386 + --repository(-R): string # Path to repository to operate on
2387 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
2388 + --ignore-immutable # Allow rewriting immutable commits
2389 + --at-operation: string # Operation to load the repo at
2390 + --at-op: string # Operation to load the repo at
2391 + --debug # Enable debug logging
2392 + --color: string # When to colorize output (always, never, debug, auto)
2393 + --quiet # Silence non-primary command output
2394 + --no-pager # Disable the pager
2395 + --config-toml: string # Additional configuration options (can be repeated)
2396 + --help(-h) # Print help (see more with '--help')
2399 + # Update a workspace that has become stale
2400 + export extern "jj workspace update-stale" [
2401 + --repository(-R): string # Path to repository to operate on
2402 + --ignore-working-copy # Don't snapshot the working copy, and don't update it
2403 + --ignore-immutable # Allow rewriting immutable commits
2404 + --at-operation: string # Operation to load the repo at
2405 + --at-op: string # Operation to load the repo at
2406 + --debug # Enable debug logging
2407 + --color: string # When to colorize output (always, never, debug, auto)
2408 + --quiet # Silence non-primary command output
2409 + --no-pager # Disable the pager
2410 + --config-toml: string # Additional configuration options (can be repeated)
2411 + --help(-h) # Print help (see more with '--help')
2416 +export use completions *

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