repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

neovim

abe4bfdeb6d95088ddf9eba32fda4a2d490a6578

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (145)

NB-00718.symlinks

Added
new file mode 100644
1 +wezterm
2 +~/.config/wezterm
4 +neovim
5 +~/AppData/Local/nvim
7 +nushell/completions
8 +~/AppData/Roaming/nushell/completions
10 +nushell/scripts
11 +~/AppData/Roaming/nushell/scripts
13 +nushell/config.nu
14 +~/AppData/Roaming/nushell/config.nu
16 +nushell/env.nu
17 +~/AppData/Roaming/nushell/env.nu
19 +nushell/login.nu
20 +~/AppData/Roaming/nushell/login.nu
22 +nushell/gen-aliases.nu
23 +~/AppData/Roaming/nushell/gen-aliases.nu
25 +bat/config
26 +~/AppData/Roaming/bat/config
28 +bottom
29 +~/AppData/Roaming/bottom
31 +git/gitconfig
32 +~/.config/git/config
34 +git/gitconfig.isp
35 +~/.config/git/.gitconfig.include
37 +neovide
38 +~/AppData/Roaming/neovide
40 +ssh
41 +~/.ssh/config
43 +starship
44 +~/.config/starship
46 +subversion/config
47 +~/AppData/Roaming/Subversion/config
49 +subversion/diff.cmd
50 +X:/bin/diff.cmd
52 +subversion/merge.cmd
53 +X:/bin/merge.cmd
55 +topgrade/topgrade.toml
56 +~/AppData/Roaming/topgrade.toml
58 +topgrade/win32.toml
59 +~/AppData/Roaming/topgrade.d/win32.toml
61 +topgrade/lnx.toml
62 +~/AppData/Roaming/topgrade.d/lnx.toml
64 +yazi/init.lua
65 +~/.config/yazi/init.lua
67 +yazi/package.toml
68 +~/.config/yazi/package.toml
70 +yazi/keymap.toml
71 +~/.config/yazi/keymap.toml
73 +yazi/theme.toml
74 +~/.config/yazi/theme.toml
76 +yazi/yazi.toml
77 +~/.config/yazi/yazi.toml
79 +zed\keymap.json
80 +~/AppData/Roaming/zed/keymap.json
82 +zed\settings.json.json
83 +~/AppData/Roaming/zed/settings.json

aerc/aerc.conf

Modified
528 528 # Specifies the command to run the editor with. It will be shown in an embedded
529 529 # terminal, though it may also launch a graphical window if the environment
530 530 # supports it. Defaults to $EDITOR, or vi.
531 -#editor=
531 +editor=nvim
534 534 # When set, aerc will create and read .eml files for composing that have

bootstripper.java

Modified
15 15 var do_decrypt = false;
17 17 if (arguments.length == 1) {
18 - if ("clean".equals(arguments[0])) {
19 - do_clean = true;
20 - }
21 - else if( "decrypt".equals(arguments[0])) {
22 - do_decrypt = true;
23 - } else {
24 - dorkfile_path_input = arguments[0];
25 - }
18 + if ("clean".equals(arguments[0])) {
19 + do_clean = true;
20 + }
21 + else if( "decrypt".equals(arguments[0])) {
22 + do_decrypt = true;
23 + } else {
24 + dorkfile_path_input = arguments[0];
25 + }
26 26 } else if (arguments.length == 2) {
27 - if ("clean".equals(arguments[0])) {
28 - do_clean = true;
29 - dorkfile_path_input = arguments[1];
30 - }
31 - else if ("decrypt".equals(arguments[0])) {
32 - do_decrypt = true;
33 - dorkfile_path_input = arguments[1];
34 - } else {
35 - usage();
36 - throw fail();
37 - }
38 - } else if (arguments.length > 2) {
27 + if ("clean".equals(arguments[0])) {
28 + do_clean = true;
29 + dorkfile_path_input = arguments[1];
30 + }
31 + else if ("decrypt".equals(arguments[0])) {
32 + do_decrypt = true;
33 + dorkfile_path_input = arguments[1];
34 + } else {
39 35 usage();
40 36 throw fail();
37 + }
38 + } else if (arguments.length > 2) {
39 + usage();
40 + throw fail();
42 42 var dorkfiles_root = Path.of(dorkfile_path_input).toRealPath();
43 43 log("Assuming dorkfiles root repo in {0}.",
44 - emphasize_local(dorkfiles_root.toString()));
44 + emphasize_local(dorkfiles_root.toString()));
45 45 if (do_decrypt) {
46 - decrypt_secrets(dorkfiles_root.resolve("tresor"));
47 - } else {
48 - var hostname = hostname();
49 - log("Hostname: {0}", emphasize_global(hostname));
50 - var symlinks_file = dorkfiles_root.resolve(hostname + ".symlinks");
51 - if (Files.exists(symlinks_file)) {
52 - if (do_clean)
53 - delete_symlinks(dorkfiles_root, symlinks_file);
54 - else
55 - create_symlinks(dorkfiles_root, symlinks_file);
56 - } else {
57 - throw fail("Expected a file containing symlinks at: {0}. Found nothing!",
58 - symlinks_file);
59 - }
60 - }
46 + decrypt_secrets(dorkfiles_root.resolve("tresor"));
47 + } else {
48 + var hostname = hostname();
49 + log("Hostname: {0}", emphasize_global(hostname));
50 + var symlinks_file = dorkfiles_root.resolve(hostname + ".symlinks");
51 + if (Files.exists(symlinks_file)) {
52 + if (do_clean)
53 + delete_symlinks(dorkfiles_root, symlinks_file);
54 + else
55 + create_symlinks(dorkfiles_root, symlinks_file);
56 + } else {
57 + throw fail("Expected a file containing symlinks at: {0}. Found nothing!",
58 + symlinks_file);
59 + }
60 + }
63 63 static void decrypt_secrets(Path secrets_root) throws Throwable {
64 - log("{0}:Decrypting files in {1} folder, using rbw.", emphasize_global("TODO"),
65 - emphasize_local(secrets_root.getFileName().toString()));
64 + log("{0}:Decrypting files in {1} folder, using rbw.", emphasize_global("TODO"),
65 + emphasize_local(secrets_root.getFileName().toString()));
68 68 static void create_symlinks(Path root, Path symlinks_file) throws Throwable {
69 - log("Creating symlinks as defined in {0} file.",
70 - emphasize_local(symlinks_file.getFileName().toString()));
71 - var lines = Files.readAllLines(symlinks_file);
72 - for_each_mapping(lines, (source, target) -> link(root, source, target));
69 + log("Creating symlinks as defined in {0} file.",
70 + emphasize_local(symlinks_file.getFileName().toString()));
71 + var lines = Files.readAllLines(symlinks_file);
72 + for_each_mapping(lines, (source, target) -> link(root, source, target));
75 75 static void delete_symlinks(Path root, Path symlinks_file) throws Throwable {
76 - log("Deleting symlinks as defined in {0} file.",
77 - emphasize_local(symlinks_file.getFileName().toString()));
78 - var lines = Files.readAllLines(symlinks_file);
79 - for_each_mapping(lines, (source, target) -> delete(root, source, target));
76 + log("Deleting symlinks as defined in {0} file.",
77 + emphasize_local(symlinks_file.getFileName().toString()));
78 + var lines = Files.readAllLines(symlinks_file);
79 + for_each_mapping(lines, (source, target) -> delete(root, source, target));
82 82 static void delete(Path root, String source, String target) throws Throwable {
83 - var home = System.getProperty("user.home");
84 - var source_path = root.resolve(source).toAbsolutePath();
85 - var target_path = Path.of(target.replace("~", home)).toAbsolutePath();
83 + var home = System.getProperty("user.home");
84 + var source_path = root.resolve(source).toAbsolutePath();
85 + var target_path = Path.of(target.replace("~", home)).toAbsolutePath();
87 - if (Files.exists(target_path, LinkOption.NOFOLLOW_LINKS)) {
88 - if (Files.isSymbolicLink(target_path)) {
89 - log("\nOK {0} exists and points to {1}, a symlink indeed!\nDeleting {0}.",
90 - emphasize_global(target_path.toString()),
91 - emphasize_local(source_path.toString()));
92 - // a symlink is always a file. no need to handle folders
93 - Files.delete(target_path);
94 - } else {
95 - log("\nNOPE {0} exists, but it is not a symlink! Clean manually.",
96 - target_path.toString());
97 - }
87 + if (Files.exists(target_path, LinkOption.NOFOLLOW_LINKS)) {
88 + if (Files.isSymbolicLink(target_path)) {
89 + log("\nOK {0} exists and points to {1}, a symlink indeed!\nDeleting {0}.",
90 + emphasize_global(target_path.toString()),
91 + emphasize_local(source_path.toString()));
92 + // a symlink is always a file. no need to handle folders
93 + Files.delete(target_path);
94 + } else {
95 + log("\nNOPE {0} exists, but it is not a symlink! Clean manually.",
96 + target_path.toString());
98 + }
101 101 static void link(Path root, String source, String target) throws Throwable {
102 - var home = System.getProperty("user.home");
103 - var source_path = root.resolve(source).toAbsolutePath();
104 - var target_path = Path.of(target.replace("~", home)).toAbsolutePath();
105 - var is_directory = Files.isDirectory(source_path);
106 - if (Files.exists(target_path, LinkOption.NOFOLLOW_LINKS)) {
107 - if (Files.exists(target_path)) {
108 - log("\nOK {0} already exists!\nNot linking {1}.",
109 - emphasize_global(target_path.toString()),
110 - emphasize_local(source_path.toString()));
111 - return;
112 - } else {
113 - log("\nNOPE {0} exists, but it points into nirvana. Removing broken link!",
114 - target_path.toString());
115 - Files.delete(target_path);
116 - }
102 + var home = System.getProperty("user.home");
103 + var source_path = root.resolve(source).toAbsolutePath();
104 + var target_path = Path.of(target.replace("~", home)).toAbsolutePath();
105 + var is_directory = Files.isDirectory(source_path);
106 + if (Files.exists(target_path, LinkOption.NOFOLLOW_LINKS)) {
107 + if (Files.exists(target_path)) {
108 + log("\nOK {0} already exists!\nNot linking {1}.",
109 + emphasize_global(target_path.toString()),
110 + emphasize_local(source_path.toString()));
111 + return;
112 + } else {
113 + log("\nNOPE {0} exists, but it points into nirvana. Removing broken link!",
114 + target_path.toString());
115 + Files.delete(target_path);
118 - log("\nLINK {0} TO {1}.", emphasize_local(source_path.toString()),
119 - emphasize_local(target_path.toString()));
120 - Files.createDirectories(target_path.getParent());
121 - try {
122 - Files.createSymbolicLink(target_path, source_path);
123 - } catch (Exception __) {
124 - /*
125 - * Creating symbolic links on Windows only recently became possible
126 - * without admin rights. And even that, is only available in Developer
127 - * Mode. However, most tools (including JDK) have not yet adapted to this
128 - * change and still require admin rights. Until that is fixed, we escape
129 - * to a system tool that is known to behave correctly in this regard.
130 - */
131 - var operating_system = System.getProperty("os.name");
132 - if (operating_system.toLowerCase().contains("win")) {
133 - var process = new ProcessBuilder();
134 - var command = process.command();
135 - command.add("cmd.exe");
136 - command.add("/c");
137 - command.add("mklink");
138 - if (is_directory) {
139 - command.add("/d");
140 - }
141 - command.add(target_path.toString());
142 - command.add(source_path.toString());
143 - log(command.toString());
144 - process.inheritIO().start().onExit().join();
145 - } else {
146 - __.printStackTrace();
147 - throw fail("Could not create symbolic link!");
148 - }
118 + log("\nLINK {0} TO {1}.", emphasize_local(source_path.toString()),
119 + emphasize_local(target_path.toString()));
120 + Files.createDirectories(target_path.getParent());
121 + try {
122 + Files.createSymbolicLink(target_path, source_path);
123 + } catch (Exception __) {
124 + /*
125 + * Creating symbolic links on Windows only recently became possible
126 + * without admin rights. And even that, is only available in Developer
127 + * Mode. However, most tools (including JDK) have not yet adapted to this
128 + * change and still require admin rights. Until that is fixed, we escape
129 + * to a system tool that is known to behave correctly in this regard.
130 + */
131 + var operating_system = System.getProperty("os.name");
132 + if (operating_system.toLowerCase().contains("win")) {
133 + var process = new ProcessBuilder();
134 + var command = process.command();
135 + command.add("cmd.exe");
136 + command.add("/c");
137 + command.add("mklink");
138 + if (is_directory) {
139 + command.add("/d");
141 + command.add(target_path.toString());
142 + command.add(source_path.toString());
143 + log(command.toString());
144 + process.inheritIO().start().onExit().join();
145 + } else {
146 + __.printStackTrace();
147 + throw fail("Could not create symbolic link!");
152 152 static String hostname() throws Exception {
153 - var process_builder = new ProcessBuilder().command("hostname");
154 - Process process;
155 - try {
156 - process = process_builder.start().onExit().join();
157 - } catch (IOException __) {
158 - process = new ProcessBuilder()
159 - .command("hostnamectl", "hostname")
160 - .start()
161 - .onExit()
162 - .join();
153 + var process_builder = new ProcessBuilder().command("hostname");
154 + Process process;
155 + try {
156 + process = process_builder.start().onExit().join();
157 + } catch (IOException __) {
158 + process = new ProcessBuilder()
159 + .command("hostnamectl", "hostname")
160 + .start()
161 + .onExit()
162 + .join();
164 + try (var reader = new InputStreamReader(process.getInputStream())) {
165 + int character = -1;
166 + var output = new StringBuilder();
167 + while ((character = reader.read()) != -1) {
168 + if (character == '\n' || character == '\r')
169 + continue;
170 + output.append((char) character);
164 - try (var reader = new InputStreamReader(process.getInputStream())) {
165 - int character = -1;
166 - var output = new StringBuilder();
167 - while ((character = reader.read()) != -1) {
168 - if (character == '\n' || character == '\r')
169 - continue;
170 - output.append((char) character);
171 - }
172 - var name = output.toString();
173 - if( "localhost".equals(name) ) {
174 - // we are inside termux
175 - assert System.getenv("PREFIX") != null;
176 - return "termux";
177 - }
178 - return name;
172 + var name = output.toString();
173 + if( "localhost".equals(name) ) {
174 + // we are inside termux
175 + assert System.getenv("PREFIX") != null;
176 + return "termux";
178 + return name;
182 182 static void usage() {
183 - log("Bootstraps bugabingas {0}.", emphasize_local("dorkfiles"));
184 - log("{0}: java bootstripper.java [clean] [dotfiles root path]",
185 - emphasize_global("Usage"));
183 + log("Bootstraps bugabingas {0}.", emphasize_local("dorkfiles"));
184 + log("{0}: java bootstripper.java [clean] [dotfiles root path]",
185 + emphasize_global("Usage"));
188 188 static String emphasize_global(String message) {
189 - return "\033[4m" + message + "\033[0m";
189 + return "\033[4m" + message + "\033[0m";
192 192 static String emphasize_local(String message) {
193 - return "\033[3m" + message + "\033[0m";
193 + return "\033[3m" + message + "\033[0m";
196 196 static Throwable fail(String message, Object... arguments) {
197 - log(message, arguments);
198 - return fail();
197 + log(message, arguments);
198 + return fail();
201 201 static Throwable fail() {
202 - System.exit(-1);
203 - return new Throwable("use 'throw fail()' for control flow");
202 + System.exit(-1);
203 + return new Throwable("use 'throw fail()' for control flow");
206 206 static void log(String message, Object... arguments) {
207 - System.out.println(format(message, arguments));
207 + System.out.println(format(message, arguments));
210 210 static interface ThrowUp<A, B> {
211 - default Throwable gurgh(A a, B b) {
212 - try {
213 - apply(a, b);
214 - return null;
215 - } catch (Throwable vomit) {
216 - return vomit;
217 - }
211 + default Throwable gurgh(A a, B b) {
212 + try {
213 + apply(a, b);
214 + return null;
215 + } catch (Throwable vomit) {
216 + return vomit;
220 - void apply(A a, B b) throws Throwable;
220 + void apply(A a, B b) throws Throwable;
223 223 static void for_each_mapping(List<String> lines, ThrowUp<String, String> block)
224 - throws Throwable {
224 + throws Throwable {
225 225 String source = null;
226 226 String target = null;
227 227 for (String line : lines) {
228 - if (line.isBlank())
229 - continue;
230 - if (source == null)
231 - source = line;
232 - else
233 - target = line;
234 - if (target != null) {
235 - var vomit = block.gurgh(source, target);
236 - if (vomit != null)
237 - throw vomit;
238 - source = null;
239 - target = null;
240 - }
228 + if (line.isBlank())
229 + continue;
230 + if (source == null)
231 + source = line;
232 + else
233 + target = line;
234 + if (target != null) {
235 + var vomit = block.gurgh(source, target);
236 + if (vomit != null)
237 + throw vomit;
238 + source = null;
239 + target = null;

fedora.symlinks

Modified
4 4 git/gitconfig
5 5 ~/.config/git/config
7 7 git/gitconfig.bugabinga
8 8 ~/.config/git/.gitconfig.include
10 +gh
11 +~/.config/gh
10 13 subversion/config
11 14 ~/.subversion/config
13 16 subversion/diff
14 -~/.subversion/diff
16 -subversion/diff3
17 -~/.subversion/diff3
17 +~/.local/bin/svn.diff
19 19 subversion/merge
20 -~/.subversion/merge
20 +~/.local/bin/svn.merge
22 22 tools/git-info
23 23 ~/.local/bin/git-info
58 58 neovim
59 59 ~/.config/nvim
61 +mini-nvim
62 +~/.config/nvim
61 64 environment.d
62 65 ~/.config/environment.d
88 91 aerc/aerc.conf
89 92 ~/.config/aerc/aerc.conf
91 -unison
92 -~/.unison
94 +unison/common
95 +~/.unison/common
97 +unison/fedora.prf
98 +~/.unison/fedora.prf
100 +unison/graphical
101 +~/.unison/graphical
103 +unison/ignores
104 +~/.unison/ignores
106 +unison/service
107 +~/.unison/service
109 +unison/sync
110 +~/.unison/sync
94 112 unison/unison@.service
95 113 ~/.config/systemd/user/unison@.service
106 124 firefox/qrza8u52.default-release/user.js
107 125 ~/.mozilla/firefox/qrza8u52.default-release/user.js
109 -yazi
110 -~/.config/yazi
127 +yazi/init.lua
128 +~/.config/yazi/init.lua
130 +yazi/package.toml
131 +~/.config/yazi/package.toml
133 +yazi/keymap.toml
134 +~/.config/yazi/keymap.toml
136 +yazi/theme.toml
137 +~/.config/yazi/theme.toml
139 +yazi/yazi.toml
140 +~/.config/yazi/yazi.toml

gh/config.yml

Added
new file mode 100644
1 +# The current version of the config schema
2 +version: 1
3 +# What protocol to use when performing git operations. Supported values: ssh, https
4 +git_protocol: ssh
5 +# What editor gh should run when creating issues, pull requests, etc. If blank, will refer to environment.
6 +editor: neovide
7 +# When to interactively prompt. This is a global config that cannot be overridden by hostname. Supported values: enabled, disabled
8 +prompt: enabled
9 +# A pager program to send command output to, e.g. "less". If blank, will refer to environment. Set the value to "cat" to disable the pager.
10 +pager:
11 +# Aliases allow you to create nicknames for gh commands
12 +aliases:
13 + co: pr checkout
14 + chat: copilot suggest
15 +# The path to a unix socket through which send HTTP connections. If blank, HTTP traffic will be handled by net/http.DefaultTransport.
16 +http_unix_socket:
17 +# What web browser gh should use when opening URLs. If blank, will refer to environment.
18 +browser: firefox

justfile

Modified
45 45 ssh-remote:
46 46 git remote rm origin
47 47 git remote add origin git@github.com:bugabinga/dotfiles.git
49 +import_winget:
50 + winget import X:/winget_installed_apps.json

mini-nvim/.nvim.lua

Added
new file mode 100644
1 +vim.g.lazydev_enabled = true

mini-nvim/ftplugin/lua.lua

Added
new file mode 100644
1 +vim.treesitter.start()
3 +-- allows to navigate lua files with gf
4 +vim.opt_local.suffixesadd:prepend('.lua')
5 +vim.opt_local.suffixesadd:prepend('init.lua')
6 +vim.opt_local.path:prepend(vim.fn.stdpath('config')..'/lua')
8 +vim.lsp.start({
9 + name = "lua-language-server",
10 + cmd = { "lua-language-server" },
11 + root_dir = vim.fs.root(0, {
12 + ".luarc.json",
13 + ".luarc.jsonc",
14 + ".luacheckrc",
15 + ".stylua.toml",
16 + "stylua.toml",
17 + "selene.toml",
18 + "selene.yml",
19 + ".git"
20 + }),
21 +})

mini-nvim/init.lua

Added
new file mode 100644
1 +-- personal standard library, that does not depend on any plugins
2 +local lib = require 'lib'
3 +-- safe version of require
4 +_G._ = lib._
5 +-- most general configurations
6 +_'conf'
7 +-- mini.nvim distribution: Loads a subset of mini.nvim plugins
8 +_'mini'
9 +-- treesitter configuration
10 +_'ts'
11 +-- language server configurations
12 +_'lsp'
13 +-- custom snippets
14 +_ 'snippets'
16 +-- custom key mappings. specified last, so that all plugins may be referenced
17 +MiniDeps.later( function() _'keymaps' end )

mini-nvim/lua/ai.lua

Added
new file mode 100644
1 +local ai = _ 'mini.ai'
2 +local spec_treesitter = ai.gen_spec.treesitter
3 +ai.setup {
4 + -- Table with textobject id as fields, textobject specification as values.
5 + -- Also use this to disable builtin textobjects. See |MiniAi.config|.
6 + custom_textobjects = {
7 + m = spec_treesitter({ a = '@function.outer', i = '@function.inner' }),
8 + f = spec_treesitter({ a = '@call.outer', i = '@call.inner' }),
9 + o = spec_treesitter({
10 + a = { '@conditional.outer', '@loop.outer' },
11 + i = { '@conditional.inner', '@loop.inner' },
12 + })
13 + },

mini-nvim/lua/align.lua

Added
new file mode 100644
1 +_ 'mini.align'.setup {}

mini-nvim/lua/basics.lua

Added
new file mode 100644
1 +_ 'mini.basics' .setup {
2 + -- Options. Set to `false` to disable.
3 + options = {
4 + -- Basic options ('number', 'ignorecase', and many more)
5 + basic = true,
7 + -- Extra UI features ('winblend', 'cmdheight=0', ...)
8 + extra_ui = true,
10 + -- Presets for window borders ('single', 'double', ...)
11 + win_borders = 'single',
12 + },
14 + -- Mappings. Set to `false` to disable.
15 + mappings = {
16 + -- Basic mappings (better 'jk', save with Ctrl+S, ...)
17 + basic = true,
19 + -- Prefix for mappings that toggle common options ('wrap', 'spell', ...).
20 + -- Supply empty string to not create these mappings.
21 + option_toggle_prefix = [[\]],
23 + -- Window navigation with <C-hjkl>, resize with <C-arrow>
24 + windows = true,
26 + -- Move cursor in Insert, Command, and Terminal mode with <M-hjkl>
27 + move_with_alt = true,
28 + },
30 + -- Autocommands. Set to `false` to disable
31 + autocommands = {
32 + -- Basic autocommands (highlight on yank, start Insert in terminal, ...)
33 + basic = true,
35 + -- Set 'relativenumber' only in linewise and blockwise Visual mode
36 + relnum_in_visual_mode = true,
37 + },
39 + -- Whether to disable showing non-error feedback
40 + silent = false,

mini-nvim/lua/bracketed.lua

Added
new file mode 100644
1 +_ 'mini.bracketed' .setup {}

mini-nvim/lua/bufremove.lua

Added
new file mode 100644
1 +_ 'mini.bufremove' .setup {}

mini-nvim/lua/clue.lua

Added
new file mode 100644
1 +local clue = _ 'mini.clue'
2 +clue.setup {
3 + triggers = {
4 + -- Leader triggers
5 + { mode = 'n', keys = '<Leader>' },
6 + { mode = 'x', keys = '<Leader>' },
8 + -- Built-in completion
9 + { mode = 'i', keys = '<C-x>' },
11 + -- `g` key
12 + { mode = 'n', keys = 'g' },
13 + { mode = 'x', keys = 'g' },
15 + -- Marks
16 + { mode = 'n', keys = "'" },
17 + { mode = 'n', keys = '`' },
18 + { mode = 'x', keys = "'" },
19 + { mode = 'x', keys = '`' },
21 + -- Registers
22 + { mode = 'n', keys = '"' },
23 + { mode = 'x', keys = '"' },
24 + { mode = 'i', keys = '<C-r>' },
25 + { mode = 'c', keys = '<C-r>' },
27 + -- Window commands
28 + { mode = 'n', keys = '<C-w>' },
30 + -- `z` key
31 + { mode = 'n', keys = 'z' },
32 + { mode = 'x', keys = 'z' },
33 + },
35 + clues = {
36 + -- Enhance this by adding descriptions for <Leader> mapping groups
37 + clue.gen_clues.builtin_completion(),
38 + clue.gen_clues.g(),
39 + clue.gen_clues.marks(),
40 + clue.gen_clues.registers(),
41 + clue.gen_clues.windows(),
42 + clue.gen_clues.z(),
43 + },

mini-nvim/lua/conf.lua

Added
new file mode 100644
1 +-- set space bar as leader key
2 +vim.g.mapleader = ' '
4 +-- make commands like :find :grep :make work almost like fuzzy matching when autocompleting paths
5 +vim.opt.path = '**'
7 +-- allow execution of project-local neovim configuration. use :trust to manage allowed files.
8 +vim.opt.exrc = true
10 +-- merges sign and number colums
11 +vim.opt.signcolumn = 'number'
13 +-- visualize some whitespace characters
14 +vim.opt.list = true
15 +vim.opt.listchars = {
16 + tab = "→ ",
17 + lead = "⋆",
18 + trail = "•",
19 + extends = "⟫",
20 + precedes = "⟪",

mini-nvim/lua/cursorword.lua

Added
new file mode 100644
1 +_ 'mini.cursorword' .setup {
2 + delay = 4242,
3 +}

mini-nvim/lua/diff.lua

Added
new file mode 100644
1 +local diff = _ 'mini.diff'
2 +diff.setup {}
4 +vim.keymap.set('n', [[\gh]], diff.toggle_overlay)

mini-nvim/lua/doc.lua

Added
new file mode 100644
1 +local doc = _'mini.doc'
2 +doc.setup{}

mini-nvim/lua/extra.lua

Added
new file mode 100644
1 +_ 'mini.extra'.setup {}

mini-nvim/lua/files.lua

Added
new file mode 100644
1 +local files = _'mini.files'
2 +files.setup{}
4 +local minifiles_toggle = function(...)
5 + if not MiniFiles.close() then MiniFiles.open(...) end
6 +end
8 +vim.keymap.set('n', '-', minifiles_toggle)

mini-nvim/lua/git.lua

Added
new file mode 100644
1 +local git = _ 'mini.git'
2 +git.setup {}

mini-nvim/lua/hipatterns.lua

Added
new file mode 100644
1 +local hipatterns = _ 'mini.hipatterns'
2 +hipatterns.setup {}

mini-nvim/lua/icons.lua

Added
new file mode 100644
1 +_ 'mini.icons'.setup{}

mini-nvim/lua/indentscope.lua

Added
new file mode 100644
1 +local scope = _'mini.indentscope'
2 +scope.setup{
3 + draw = {
4 + delay = 444,
5 + animation = scope.gen_animation.quadratic{
6 + easing = 'in-out',
7 + duration = 42,
8 + unit = 'total'
9 + },
10 + },
11 + symbol = '🭲',

mini-nvim/lua/jump.lua

Added
new file mode 100644
1 +_ 'mini.jump'.setup{}

mini-nvim/lua/jump2d.lua

Added
new file mode 100644
1 +_ 'mini.jump2d'.setup{}

mini-nvim/lua/keymaps.lua

Added
new file mode 100644
1 +local set = vim.keymap.set
2 +local normal = 'n'
4 +-- clears the search highlight
5 +set(normal, [[<ESC><ESC>]], vim.cmd.nohlsearch)
7 +-- Space shall do no thing, other than being a leader
8 +set(normal, [[<Space>]], [[<NOP>]])

mini-nvim/lua/lib.lua

Added
new file mode 100644
1 +return {
2 + --- safe version of `require`.
3 + --- if given module could not be found or some error occured during loading, the error is printed instead of thrown.
4 + ---@type function(string): table
5 + _ = function( mod )
6 + local ok, loaded = pcall(require, mod)
7 + if not ok then
8 + vim.print('unable to load mod ' .. mod .. '!')
9 + vim.print(loaded)
10 + end
11 + return loaded
12 + end,

mini-nvim/lua/lsp.lua

Added
new file mode 100644
1 +vim.api.nvim_create_autocmd("LspAttach", {
2 + callback = function (event)
3 + vim.bo[event.buf].omnifunc = "v:lua.vim.lsp.omnifunc"
4 + -- vim.lsp.completion.enable()
5 + end,
6 +})

mini-nvim/lua/map.lua

Added
new file mode 100644
1 +_ 'mini.map' .setup{}

mini-nvim/lua/mini.lua

Added
new file mode 100644
1 +local path_package = vim.fn.stdpath 'data' .. '/site'
2 +local mini_path = path_package .. '/pack/mini/start/mini.nvim'
3 +if not vim.uv.fs_stat(mini_path) then
4 + vim.print 'Installing mini.nvim'
5 + vim.cmd.redraw()
6 + local clone_cmd = { 'git', 'clone', '--filter=blob:none', 'https://github.com/echasnovski/mini.nvim', mini_path }
7 + vim.system(clone_cmd, { text = true } ):wait()
8 + vim.cmd.packadd 'mini.nvim'
9 + vim.cmd.helptags 'ALL'
10 +end
11 +_ 'mini.deps' .setup { path = { package = path_package } }
13 +local eager_modules = {
14 + 'sessions',
15 + 'basics',
16 + 'theme',
17 + 'icons',
18 + 'starter',
19 + 'indentscope',
20 + 'map',
21 + 'notify',
22 + 'operators',
23 + 'statusline',
24 + 'tabline',
26 +local lazy_modules = {
27 + 'ai',
28 + 'align',
29 + 'bracketed',
30 + 'bufremove',
31 + 'clue',
32 + 'cursorword',
33 + 'diff',
34 + 'doc',
35 + 'files',
36 + 'git',
37 + 'hipatterns',
38 + 'jump',
39 + 'jump2d',
40 + 'move',
41 + 'extra',
42 + 'pairs',
43 + 'pick',
44 + 'splitjoin',
45 + 'surround',
46 + 'trailspace',
47 + 'visits',
50 +for _idx, mod in pairs(eager_modules) do MiniDeps.now (function() _(mod) end) end
51 +for _idx, mod in pairs(lazy_modules) do MiniDeps.later (function() _(mod) end) end

mini-nvim/lua/move.lua

Added
new file mode 100644
1 +_ 'mini.move'.setup {}

mini-nvim/lua/notify.lua

Added
new file mode 100644
1 +local notify = _ 'mini.notify'
2 +notify.setup{}
4 +vim.notify = notify.make_notify()

mini-nvim/lua/operators.lua

Added
new file mode 100644
1 +_'mini.operators'.setup{}

mini-nvim/lua/pairs.lua

Added
new file mode 100644
1 +_ 'mini.pairs'.setup{
2 + mappings = {
3 + ['"'] = { neigh_pattern = '[^%a\\].', register = { cr = true } },
4 + ["'"] = { neigh_pattern = '[^%a\\].', register = { cr = true } },
5 + ['<'] = { action = 'open', pair = '<>', neigh_pattern = '\r.', register = { cr = false } },
6 + ['>'] = { action = 'close', pair = '<>', register = { cr = false } }
7 + }
8 +}
10 +local map_bs = function(lhs, rhs)
11 + vim.keymap.set('i', lhs, rhs, { expr = true, replace_keycodes = false })
12 +end
14 +map_bs('<C-h>', 'v:lua.MiniPairs.bs()')
15 +map_bs('<C-w>', 'v:lua.MiniPairs.bs("\23")')
16 +map_bs('<C-u>', 'v:lua.MiniPairs.bs("\21")')

mini-nvim/lua/pick.lua

Added
new file mode 100644
1 +local pick = _'mini.pick'
2 +pick.setup{
3 + -- General options
4 + options = {
5 + -- Whether to show content from bottom to top
6 + content_from_bottom = true,
8 + -- Whether to cache matches (more speed and memory on repeated prompts)
9 + use_cache = true,
10 + },
13 +vim.keymap.set('n', '<C-CR>', pick.builtin.files)
15 +vim.keymap.set('n', '<F4>', pick.builtin.cli)
16 +vim.keymap.set('n', '<F3>', pick.builtin.buffers)
17 +vim.keymap.set('n', '<F2><F2>', pick.builtin.grep)
18 +vim.keymap.set('n', '<F2>', pick.builtin.grep_live)
19 +vim.keymap.set('n', '<F1>', pick.builtin.help)
21 +vim.keymap.set('n', '<C-P>', pick.builtin.resume)

mini-nvim/lua/sessions.lua

Added
new file mode 100644

No text changes.

mini-nvim/lua/snippets.lua

Added
new file mode 100644
1 +-- TODO: snippets for
2 +-- java multiline strings
3 +-- lua functions
4 +-- lua loops

mini-nvim/lua/splitjoin.lua

Added
new file mode 100644
1 +_ 'mini.splitjoin'.setup{}
3 +vim.keymap.set('n', '<C-J>', MiniSplitjoin.toggle)

mini-nvim/lua/starter.lua

Added
new file mode 100644
1 +_ 'mini.starter' .setup {
2 +header = [[
3 +▄▄▄▄· ▄• ▄▌ ▄▄ • ▄▄▄· ▄▄▄▄· ▪ ▐ ▄ ▄▄ • ▄▄▄·
4 +▐█ ▀█▪█▪██▌▐█ ▀ ▪▐█ ▀█ ▐█ ▀█▪██ •█▌▐█▐█ ▀ ▪▐█ ▀█
5 +▐█▀▀█▄█▌▐█▌▄█ ▀█▄▄█▀▀█ ▐█▀▀█▄▐█·▐█▐▐▌▄█ ▀█▄▄█▀▀█
6 +██▄▪▐█▐█▄█▌▐█▄▪▐█▐█ ▪▐▌██▄▪▐█▐█▌██▐█▌▐█▄▪▐█▐█ ▪▐▌
7 +·▀▀▀▀ ▀▀▀ ·▀▀▀▀ ▀ ▀ ·▀▀▀▀ ▀▀▀▀▀ █▪·▀▀▀▀ ▀ ▀
8 +]],
9 +footer = '',

mini-nvim/lua/statusline.lua

Added
new file mode 100644
1 +_ 'mini.statusline'.setup{}

mini-nvim/lua/surround.lua

Added
new file mode 100644
1 +_ 'mini.surround'.setup {}

mini-nvim/lua/tabline.lua

Added
new file mode 100644
1 +_'mini.tabline'.setup{}

mini-nvim/lua/theme.lua

Added
new file mode 100644
1 +--- Sets given highlight in the global namespace
2 +--- @param name Highlight group name, e.g. "ErrorMsg"
3 +--- @param val Highlight definition map, accepts the following keys:
4 +--- • fg: color name or "#RRGGBB", see note.
5 +--- • bg: color name or "#RRGGBB", see note.
6 +--- • sp: color name or "#RRGGBB"
7 +--- • blend: integer between 0 and 100
8 +--- • bold: boolean
9 +--- • standout: boolean
10 +--- • underline: boolean
11 +--- • undercurl: boolean
12 +--- • underdouble: boolean
13 +--- • underdotted: boolean
14 +--- • underdashed: boolean
15 +--- • strikethrough: boolean
16 +--- • italic: boolean
17 +--- • reverse: boolean
18 +--- • nocombine: boolean
19 +--- • link: name of another highlight group to link to, see |:hi-link|.
20 +--- • default: Don't override existing definition |:hi-default|
21 +--- • ctermfg: Sets foreground of cterm color |ctermfg|
22 +--- • ctermbg: Sets background of cterm color |ctermbg|
23 +--- • cterm: cterm attribute map, like |highlight-args|. If not set, cterm attributes will match those from the attribute map documented above.
24 +--- • force: if true force update the highlight group when it exists.
25 +local hi = function(...)
26 + vim.api.nvim_set_hl(0, ...)
27 + return
28 +end
30 +-- let us rock the default theme.
31 +-- even though its semantics are broken (just like all the themes out there), the colors are pretty nice.
32 +-- also it is guaranteed to work with all the plugins and terminals out there.
34 +-- fix default theme semantics, such that READING code is emphazised.
35 +hi('@keyword', { link = 'SpecialKey' })
36 +hi('@keyword.return', { link = 'Statement' })
38 +hi('@function', { link = 'Statement' })
39 +hi('@variable.parameter', { link = 'Statement' })
41 +hi('@comment', { link = 'Statement' })
42 +hi('@comment.documentation', { link = 'SpecialKey' })

mini-nvim/lua/trailspace.lua

Added
new file mode 100644
1 +_ 'mini.trailspace'.setup {}

mini-nvim/lua/ts.lua

Added
new file mode 100644

No text changes.

mini-nvim/lua/visits.lua

Added
new file mode 100644
1 +_ 'mini.visits'.setup {}

neovim/.lazy.specs.lua

Deleted
deleted file mode 100644
1 -return {
2 - {
3 - 'stevearc/conform.nvim',
4 - opts = {
5 - formatters = {
6 - mdslw = {
7 - prepend_args = { '--features', 'retain-whitespace', },
8 - },
9 - },
10 - },
11 - },
12 -}

neovim/.lsp.settings.lua

Modified
1 1 return {
2 2 LuaLS = {
3 3 Lua = {
4 - runtime = { version = 'LuaJIT' },
5 - diagnostics = { globals = { 'vim', 'prequire' } },
4 + runtime = {
5 + version = 'LuaJIT',
6 + path = vim.split( package.path, ';' ),
7 + },
8 + diagnostics = {
9 + globals = { 'vim', 'prequire' },
10 + workspaceDelay = -1,
11 + },
6 12 workspace = {
13 + ignoreSubmodules = true,
7 14 checkThridParties = false,
8 15 library = {
9 - '${3rd}/luv/library',
10 16 unpack( vim.api.nvim_get_runtime_file( '', true ) ),
18 + telemetry = {
19 + enable = false,
20 + },

neovim/.save.actions.lua

Modified
1 -return { 'Format', }
1 +return { 'Format' }

neovim/README.md

Modified
39 39 # todo
41 +* merge mini-nvim with main config
42 +* learn mini.operators
43 +* use in-and-out
44 +* get rid of
45 + - cmp
46 + - lazy
47 + - treesj
48 + - gomove
49 + - devicons
50 + - heirline
51 + - luasnip
52 + - nui
53 + - telescope
54 + - surround
55 +* fix nugu floating highlight border background
41 56 * indent line bg overwrites visual selection bg
42 57 * fix bg highlight of treesitter-context
43 58 * stabilize plugins that are only dependencies. move to own file?

neovim/after/ftplugin/lua.lua

Added
new file mode 100644
1 +-- Options to add `gf` functionality inside `.lua` files.
2 +vim.opt_local.include = [[\v<((do|load)file|require)[^''"]*[''"]\zs[^''"]+]]
3 +vim.opt_local.includeexpr = "substitute(v:fname,'\\.','/','g')"
4 +for _, path in pairs( vim.api.nvim_list_runtime_paths() ) do
5 + vim.opt_local.path:append( path .. '/lua' )
6 +end
7 +vim.opt_local.suffixesadd:prepend '.lua'
9 +-- i like to mask some lua keywords with cool unicode chars
10 +-- those are defined in 'after/queries/lua/highlights.scm'
11 +vim.opt_local.conceallevel = 1
12 +vim.opt_local.concealcursor = 'n'
14 +vim.snippet.add(
15 + 'fn',
16 + 'function ${1:name}($2)\n\t${3:-- content}\nend',
17 + { buffer = 0 }
19 +vim.snippet.add(
20 + 'lfn',
21 + 'local ${1:name} = function($2)\n\t${3:-- gogogo}\nend',
22 + { buffer = 0 }

neovim/after/ftplugin/markdown.lua

Added
new file mode 100644
1 +-- spell checking ON
2 +vim.opt_local.spell = true

neovim/after/ftplugin/oil.lua

Added
new file mode 100644
1 +vim.opt_local.syntax = 'on'

neovim/ftplugin/lua.lua

Deleted
deleted file mode 100644
1 --- Options to add `gf` functionality inside `.lua` files.
2 -vim.opt_local.include = [[\v<((do|load)file|require)[^''"]*[''"]\zs[^''"]+]]
3 -vim.opt_local.includeexpr = "substitute(v:fname,'\\.','/','g')"
4 -for _, path in pairs( vim.api.nvim_list_runtime_paths() ) do
5 - vim.opt_local.path:append( path .. '/lua' )
6 -end
7 -vim.opt_local.suffixesadd:prepend '.lua'
9 --- i like to mask some lua keywords with cool unicode chars
10 --- those are defined in 'after/queries/lua/highlights.scm'
11 -vim.opt_local.conceallevel = 1
12 -vim.opt_local.concealcursor = 'n'
14 -vim.snippet.add(
15 - 'fn',
16 - 'function ${1:name}($2)\n\t${3:-- content}\nend',
17 - { buffer = 0 }
18 -)
19 -vim.snippet.add(
20 - 'lfn',
21 - 'local ${1:name} = function($2)\n\t${3:-- gogogo}\nend',
22 - { buffer = 0 }
23 -)

neovim/ftplugin/markdown.lua

Deleted
deleted file mode 100644
1 --- spell checking ON
2 -vim.opt_local.spell = true

neovim/ftplugin/oil.lua

Deleted
deleted file mode 100644
1 -vim.opt_local.syntax = 'on'

neovim/init.lua

Modified
14 14 vim.cmd.colorscheme 'nugu'
16 16 -- create special global, that serves as a more graceful alternative to `require`
17 --- FIXME: use normal imports instead of global
18 17 prequire = require 'std.prequire'
20 19 require 'patches'

neovim/lazy-lock.json

Modified
2 2 "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" },
3 - "CopilotChat.nvim": { "branch": "canary", "commit": "e4cb1fc27e0def7571e5329f522a79e9555a5502" },
4 - "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
5 - "cmd-parser.nvim": { "branch": "master", "commit": "6363b8bddef968c3ec51a38172af44f675f01ef3" },
6 - "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
7 - "cmp-dotenv": { "branch": "main", "commit": "4dd53aab60982f1f75848aec5e6214986263325e" },
8 - "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
9 - "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
10 - "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
11 - "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
12 - "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
13 - "conform.nvim": { "branch": "master", "commit": "50649648851cd0e126dfedd0f3c33b900a6f1ef8" },
14 - "copilot-cmp": { "branch": "master", "commit": "b6e5286b3d74b04256d0a7e3bd2908eabec34b44" },
15 - "copilot.lua": { "branch": "master", "commit": "f8d8d872bb319f640d5177dad5fbf01f7a16d7d0" },
3 + "blink.cmp": { "branch": "main", "commit": "75cadbcd2657ed01326ca2b0e5e4d78a77127ca3" },
4 + "conform.nvim": { "branch": "master", "commit": "6239d9986f51ca93ded99ecdb1af0e287eabb651" },
16 5 "decisive.nvim": { "branch": "main", "commit": "a7251adebccbc9c899cff39a524b20d06e2b78b5" },
17 - "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
18 - "dressing.nvim": { "branch": "master", "commit": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2" },
19 - "flash.nvim": { "branch": "main", "commit": "ec0bf2842189f65f60fd40bf3557cac1029cc932" },
20 6 "glance.nvim": { "branch": "master", "commit": "cdf1ec8136cfbdf73edbe1163097223c763a84b7" },
21 - "heirline.nvim": { "branch": "master", "commit": "7a79753c1a42c3f52e89a6c42429e7f871e560cd" },
7 + "heirline.nvim": { "branch": "master", "commit": "cc359b628266cb9a84b2d71c883f2b99e16473a0" },
22 8 "in-and-out.nvim": { "branch": "master", "commit": "ab24cafadc3418dffb0c7e9b0621cff60b9ac551" },
23 9 "iswap.nvim": { "branch": "master", "commit": "e02cc91f2a8feb5c5a595767d208c54b6e3258ec" },
24 - "lazy.nvim": { "branch": "main", "commit": "cf8ecc2c5e4332760431a33534240b0cbc6680ab" },
25 - "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" },
26 - "lspkind.nvim": { "branch": "master", "commit": "a700f1436d4a938b1a1a93c9962dc796afbaef4d" },
27 - "markdown-table-mode.nvim": { "branch": "main", "commit": "f830cd15a97deb3acc53d9f6607bc609f7f32e49" },
10 + "lazy.nvim": { "branch": "main", "commit": "7967abe55752aa90532e6bb4bd4663fe27a264cb" },
11 + "lazydev.nvim": { "branch": "main", "commit": "d5800897d9180cea800023f2429bce0a94ed6064" },
28 12 "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
29 13 "mini.bracketed": { "branch": "main", "commit": "833d66df6e0588222312a963780c6ec42ed7437d" },
30 14 "mini.bufremove": { "branch": "main", "commit": "1ee294a97e091d3cf967974df622c0d887890dc2" },
31 15 "mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" },
32 16 "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
33 17 "nvim-autopairs": { "branch": "master", "commit": "f158dcb865c36f72c92358f87787dab2c272eaf3" },
34 - "nvim-cmp": { "branch": "main", "commit": "29fb4854573355792df9e156cb779f0d31308796" },
35 18 "nvim-docs-view": { "branch": "master", "commit": "365593534e0acd762bfddce6e8313315ffa4fa36" },
36 - "nvim-genghis": { "branch": "main", "commit": "ca258b1e466d131e17eacf0c632abe932bce20ab" },
37 19 "nvim-gomove": { "branch": "main", "commit": "2b44ae7ac0804f4e3959228122f7c85bef1964e3" },
38 20 "nvim-highlight-colors": { "branch": "main", "commit": "a411550ef85cae467b889ba7d1a96bd78332d90e" },
39 21 "nvim-lastplace": { "branch": "main", "commit": "0bb6103c506315044872e0f84b1f736c4172bb20" },
40 22 "nvim-lint": { "branch": "master", "commit": "968a35d54b3a4c1ce66609cf80b14d4ae44fe77f" },
41 - "nvim-luapad": { "branch": "master", "commit": "176686eb616a5ada5dfc748f2b5109194bbe8a71" },
42 23 "nvim-neoclip.lua": { "branch": "main", "commit": "32e05f2d23dc5b6a284a688c0535a83d1bfc633f" },
43 24 "nvim-rulebook": { "branch": "main", "commit": "bc5e3874a9870709ec91152f9efce6dad49ca862" },
44 25 "nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
45 - "nvim-treesitter": { "branch": "master", "commit": "00d219068385a4aa80859d4606ad6e03af6faa83" },
26 + "nvim-treesitter": { "branch": "master", "commit": "13c7caf8a602488b37cdefe8543c4cfdd5947d9d" },
46 27 "nvim-treesitter-endwise": { "branch": "master", "commit": "8b34305ffc28bd75a22f5a0a9928ee726a85c9a6" },
47 28 "nvim-treesitter-textobjects": { "branch": "master", "commit": "3e450cd85243da99dc23ebbf14f9c70e9a0c26a4" },
48 29 "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
49 30 "nvim-web-devicons": { "branch": "master", "commit": "19d257cf889f79f4022163c3fbb5e08639077bd8" },
50 - "oil.nvim": { "branch": "master", "commit": "1eb9fb35a4613518f79790117ed82c367a0b4a22" },
31 + "oil.nvim": { "branch": "master", "commit": "50c4bd4ee216f08907f64d0295c0663a69e58ffb" },
51 32 "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
52 - "range-highlight.nvim": { "branch": "master", "commit": "8b5e8ccb3460b2c3675f4639b9f54e64eaab36d9" },
53 - "refjump.nvim": { "branch": "main", "commit": "a78b585cff29505f7558f3a596bca567474cd663" },
33 + "refjump.nvim": { "branch": "main", "commit": "92ec869724b949c40efbea54a560a835680d3de2" },
54 34 "specs.nvim": { "branch": "main", "commit": "8a108c8b37dec1b184a1d3d76c6cf867bfbe9636" },
55 - "substitute.nvim": { "branch": "main", "commit": "17ffaeb5a1dc2dbef39cf0865d8a4b6000836714" },
56 35 "symbol-usage.nvim": { "branch": "main", "commit": "0f9b3da014b7e41559b643e7461fcabb2a7dc83a" },
57 - "telescope-frecency.nvim": { "branch": "master", "commit": "f67baca08423a6fd00167801a54db38e0b878063" },
58 36 "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
59 37 "telescope-symbols.nvim": { "branch": "master", "commit": "a6d0127a53d39b9fc2af75bd169d288166118aec" },
60 - "telescope-undo.nvim": { "branch": "main", "commit": "51be9ae7c42fc27c0b05505e3a0162e0f05fbb6a" },
38 + "telescope-undo.nvim": { "branch": "main", "commit": "2971cc9f193ec09e0c5de3563f99cbea16b63f10" },
61 39 "telescope-zoxide": { "branch": "main", "commit": "54bfe630bad08dc9891ec78c7cf8db38dd725c97" },
62 40 "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
63 - "text-case.nvim": { "branch": "main", "commit": "13daf28a829e6d0646904c94214cb289bb0c6f34" },
64 - "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
65 - "toggle.nvim": { "branch": "main", "commit": "50769ba8982d3d3a8fbd1d1a2e5cad63c73df662" },
66 - "tree-sitter-nu": { "branch": "main", "commit": "082a7c7df7db460da6b280c9f902bf2b19a2f423" },
41 + "tree-sitter-nu": { "branch": "main", "commit": "86aabeeaf4d3fc544d132904ef9981a888314ec0" },
67 42 "treesj": { "branch": "main", "commit": "0d81326b5afd36babe7dd480aabbb0b05f33e688" },
68 - "vim-vscode-snippets": { "branch": "master", "commit": "c34e9edee6a00cf3d0b8edb515e08e3df450bcfa" },
69 - "virt-column.nvim": { "branch": "master", "commit": "b62b4ef0774d19452d4ed18e473e824c7a756f2f" },
43 + "virt-column.nvim": { "branch": "master", "commit": "b87e3e0864211a32724a2ebf3be37e24e9e2fa99" },
70 44 "wezterm-types": { "branch": "main", "commit": "1518752906ba3fac0060d9efab6e4d3ec15d4b5a" },
71 45 "which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" },
72 46 "zen-mode.nvim": { "branch": "main", "commit": "04b52674b8c800f8b7d4609e8bd8d0212e3ffa79" }

neovim/lua/bugabinga/nugu/init.lua

Modified
131 131 _.IncSearch { fg = content_focus }
132 132 _.CurSearch { fg = content_important_global, bg = content_unfocus }
133 133 _.NormalFloat = _.NormalUi
134 -_.FloatBorder { fg = ui_accent, bg = _.Normal.bg }
134 +_.FloatBorder { fg = ui_accent, bg = _.NormalFloat.bg }
135 135 _.ColorColumn { fg = ui_important_global, bg = _.Normal.bg }
136 136 _.Conceal { fg = content_focus, bg = _.Normal.bg }
137 137 _.Cursor { fg = content_backdrop, bg = content_accent }

neovim/lua/bugabinga/options/behaviour.lua

Modified
119 119 vim.opt.confirm = true
121 121 if const.wsl then
122 - -- vim.g.clipboard = {
123 - -- name = 'WslClipboard',
124 - -- copy = {
125 - -- ['+'] = 'clip.exe',
126 - -- ['*'] = 'clip.exe',
127 - -- },
128 - -- paste = {
129 - -- ['+'] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))',
130 - -- ['*'] = 'powershell.exe -c [Console]::Out.Write($(Get-Clipboard -Raw).tostring().replace("`r", ""))',
131 - -- },
132 - -- cache_enabled = 0,
133 - -- }
122 + require 'bugabinga.health'.add_dependency
124 + name = 'win32yank',
125 + name_of_executable = 'win32yank.exe',
134 127 vim.g.clipboard = {
135 128 name = 'win32yank-wsl',
136 129 copy = {

neovim/lua/bugabinga/options/file.lua

Modified
32 32 pattern = {
33 33 ['.*/%.vscode/.*%.json'] = 'json5', -- These json files frequently have comments
34 + README = 'markdown',
35 + TODO = 'markdown',
36 + DEPENDENCIES = 'markdown',
37 + ROADMAP = 'markdown',

neovim/lua/bugabinga/plugins/bracketed.lua

Deleted
deleted file mode 100644
1 -return {
2 - 'echasnovski/mini.bracketed',
3 - version = '0.*',
4 - event = 'VeryLazy',
5 - opts = {
6 - treesitter = { suffix = '' },
7 - window = { suffix = '' },
8 - yank = { suffix = '' },
9 - indent = { suffix = '' },
10 - comment = { suffix = '' },
11 - },
12 -}

neovim/lua/bugabinga/plugins/cmp.lua

Deleted
deleted file mode 100644
1 -local icon = require 'std.icon'
3 --- TODO: replace with vim.completion, once it lands
5 -return {
6 - 'hrsh7th/nvim-cmp',
7 - branch = 'main',
8 - event = 'InsertEnter',
9 - dependencies = {
10 - 'hrsh7th/cmp-nvim-lsp',
11 - 'hrsh7th/cmp-buffer',
12 - 'hrsh7th/cmp-path',
13 - 'hrsh7th/cmp-nvim-lua',
14 - 'hrsh7th/cmp-nvim-lsp-signature-help',
15 - 'SergioRibera/cmp-dotenv',
16 - 'saadparwaiz1/cmp_luasnip',
17 - 'onsails/lspkind.nvim',
18 - 'L3MON4D3/LuaSnip',
19 - },
20 - config = function ()
21 - local cmp = require 'cmp'
22 - local luasnip = require 'luasnip'
23 - local MAX_INDEX_FILE_SIZE = 4000
25 - local snippet_next = function ( fallback )
26 - if luasnip.expand_or_jumpable() then
27 - luasnip.expand_or_jump()
28 - elseif cmp.visible() then
29 - cmp.select_next_item()
30 - else
31 - fallback()
32 - end
33 - end
35 - local snippet_prev = function ( fallback )
36 - if luasnip.jumpable( -1 ) then
37 - luasnip.jump( -1 )
38 - elseif cmp.visible() then
39 - cmp.select_prev_item()
40 - else
41 - fallback()
42 - end
43 - end
45 - local mapping = cmp.mapping.preset.insert {
46 - ['<C-d>'] = cmp.mapping.scroll_docs( -4 ),
47 - ['<C-f>'] = cmp.mapping.scroll_docs( 4 ),
48 - ['<C-c>'] = cmp.mapping.close(),
49 - ['<C-y>'] = cmp.mapping.confirm { behavior = cmp.ConfirmBehavior.Replace, select = true },
50 - ['<C-x>'] = cmp.mapping.complete(),
51 - }
53 - local lspkind = prequire 'lspkind'
54 - local colors = prequire 'nvim-highlight-colors'
55 - local lspkind_params = {
56 - mode = 'symbol',
57 - symbol_map = {
58 - Copilot = icon.copilot,
59 - Class = icon.class,
60 - Color = icon.color,
61 - Constant = icon.constant,
62 - Constructor = icon.constructor,
63 - Enum = icon.enum,
64 - EnumMember = icon.enum_member,
65 - Event = icon.event,
66 - Field = icon.field,
67 - File = icon.file,
68 - Folder = icon.folder,
69 - Function = icon['function'],
70 - Interface = icon.interface,
71 - Keyword = icon.keyword,
72 - Method = icon.method,
73 - Module = icon.module,
74 - Operator = icon.operator,
75 - Property = icon.property,
76 - Reference = icon.reference,
77 - Snippet = icon.snippet,
78 - Struct = icon.struct,
79 - Text = icon.text,
80 - TypeParameter = icon.type_parameter,
81 - Unit = icon.unit,
82 - Value = icon.value,
83 - Variable = icon.variable,
84 - },
85 - menu = {
86 - buffer = '[buf]',
87 - nvim_lsp = '[LSP]',
88 - nvim_lua = '[nvim]',
89 - path = '[path]',
90 - luasnip = '[snip]',
91 - copilot = '[cop]',
92 - },
93 - }
94 - local formatting = {
95 - format = function ( entry, item )
96 - local color_item = colors.format( entry, { kind = item.kind } )
97 - item = lspkind.cmp_format( lspkind_params )( entry, item )
98 - if color_item.abbr_hl_group then
99 - item.kind_hl_group = color_item.abbr_hl_group
100 - item.kind = color_item.abbr
101 - end
102 - return item
103 - end,
104 - }
106 - local sources = {
107 - { name = 'copilot' }, -- FIXME: depends on incubating plugin!
108 - { name = 'nvim_lua' },
109 - { name = 'nvim_lsp_signature_help' },
110 - { name = 'nvim_lsp' },
111 - { name = 'dotenv' },
112 - { name = 'path' },
113 - {
114 - name = 'buffer',
115 - keyword_length = 4,
116 - options = {
117 - get_bufnrs = function ()
118 - local bufs = {}
119 - for _, bufnr in ipairs( vim.api.nvim_list_bufs() ) do
120 - -- Don't index giant files
121 - if vim.api.nvim_buf_is_loaded( bufnr ) and vim.api.nvim_buf_line_count( bufnr ) < MAX_INDEX_FILE_SIZE then
122 - table.insert( bufs, bufnr )
123 - end
124 - end
125 - return bufs
126 - end,
127 - },
128 - },
129 - }
131 - cmp.setup {
132 - mapping = mapping,
133 - formatting = formatting,
134 - sources = sources,
136 - completion = { autocomplete = false },
137 - snippet = {
138 - expand = function ( args ) luasnip.lsp_expand( args.body ) end,
139 - },
140 - }
141 - end,

neovim/lua/bugabinga/plugins/conform.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/diffview.lua

Deleted
deleted file mode 100644
1 -local map = require 'std.map'
3 -map.normal {
4 - keys = '<leader>vd',
5 - description = 'Opens Diffview',
6 - category = 'vcs',
7 - command = '<cmd>DiffviewOpen<cr>',
8 -}
10 -return {
11 - 'sindrets/diffview.nvim',
12 - commit = '4516612fe98ff56ae0415a259ff6361a89419b0a',
13 - cmd = { 'DiffviewOpen' },
14 - opts = {},
15 -}

neovim/lua/bugabinga/plugins/flash.lua

Deleted
deleted file mode 100644
1 -local map = require 'std.map'
3 -map.normal.visual.operator_pending {
4 - description = 'Jump to occurence of next chars quickly',
5 - category = 'navigation',
6 - keys = '<cr>',
7 - command = function () prequire 'flash'.jump() end,
8 -}
10 -map.normal.visual.operator_pending {
11 - description = 'Jump to occurence of next treesitter node quickly',
12 - category = 'navigation',
13 - keys = '<s-cr>',
14 - command = function () prequire 'flash'.treesitter() end,
15 -}
17 -map.command_line {
18 - description = 'Toggle Flash Search',
19 - category = 'navigation',
20 - keys = '<c-s>',
21 - command = function () require 'flash'.toggle() end,
22 -}
24 -return {
25 - 'folke/flash.nvim',
26 - version = '2.*',
27 - event = 'VeryLazy',
28 - opts = {
29 - highlight = { backdrop = false },
30 - modes = { char = { highlight = { backdrop = false } } },
31 - },
32 -}

neovim/lua/bugabinga/plugins/format.lua

Added
new 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,
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,

neovim/lua/bugabinga/plugins/genghis.lua

Deleted
deleted file mode 100644
1 -local const = require 'std.const'
2 -if const.win32 then
3 - require 'bugabinga.health'.add_dependency {
4 - name_of_executable = 'recycle-bin',
5 - }
6 -end
8 -local map = require 'std.map'
10 -map.normal {
11 - keys = '<leader>fn',
12 - category = 'files',
13 - description = 'Create new file',
14 - command = function () require 'genghis'.createNewFile() end,
17 -map.visual {
18 - keys = '<leader>fx',
19 - category = 'files',
20 - description = 'Move selection to new file',
21 - command = function () require 'genghis'.moveSelectionToNewFile() end,
24 -map.normal {
25 - keys = '<leader>fy',
26 - category = 'files',
27 - description = 'Yank file name',
28 - command = function () require 'genghis'.copyFilename() end,
31 -map.normal {
32 - keys = '<leader>fY',
33 - category = 'files',
34 - description = 'Yank file path',
35 - command = function () require 'genghis'.copyFilepath() end,
38 -map.normal {
39 - keys = '<leader>fc',
40 - category = 'files',
41 - description = 'Change file mode/permissions',
42 - command = function () require 'genghis'.chmodx() end,
45 -map.normal {
46 - keys = '<leader>fr',
47 - category = 'files',
48 - description = 'Rename file',
49 - command = function () require 'genghis'.renameFile() end,
52 -map.normal {
53 - keys = '<leader>fm',
54 - category = 'files',
55 - description = 'Move file',
56 - command = function () require 'genghis'.moveAndRenameFile() end,
59 -map.normal {
60 - keys = '<leader>fM',
61 - category = 'files',
62 - description = 'Move file to current working directory',
63 - command = function () require 'genghis'.moveToFolderInCwd() end,
66 -map.normal {
67 - keys = '<leader>ff',
68 - category = 'files',
69 - description = 'Duplicate file',
70 - command = function () require 'genghis'.duplicateFile() end,
73 -map.normal {
74 - keys = '<leader>fd',
75 - category = 'files',
76 - description = 'Move file to system trash',
77 - command = function ()
78 - local opts = const.win32 and {
79 - trashCmd = 'recycle-bin',
80 - } or {}
82 - require 'genghis'.trashFile( opts )
83 - end,
86 -return {
87 - 'chrisgrieser/nvim-genghis',
88 - commit = 'ca258b1e466d131e17eacf0c632abe932bce20ab',
89 - cmd = {
90 - 'New',
91 - 'NewFromSelection',
92 - 'Duplicate',
93 - 'Rename',
94 - 'Move',
95 - 'MoveToFolderInCwd',
96 - 'Trash', -- this one does not work on windows, because we cannot configure the trashCmd...
97 - 'CopyFilename',
98 - 'CopyFilepath',
99 - 'CopyFilepathWithTilde',
100 - 'CopyRelativePath',
101 - 'CopyDirectoryPath',
102 - 'CopyRelativeDirectoryPath',
103 - 'Chmodx',
104 - },
105 - dependencies = {
106 - 'stevearc/dressing.nvim',
107 - },

neovim/lua/bugabinga/plugins/gomove.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/heirline.lua

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

neovim/lua/bugabinga/plugins/incubator.lua

Modified
13 13 return {
14 14 -------------------------------------------------------------------------------
15 - {
16 - 'gregorias/toggle.nvim',
17 - lazy = false,
18 - version = '2.0',
19 - config = true,
20 - enabled = FUCK_STABILITY,
21 - },
22 - -------------------------------------------------------------------------------
23 - {
24 - 'zbirenbaum/copilot-cmp',
25 - event = 'InsertEnter',
26 - config = function () require 'copilot_cmp'.setup() end,
27 - dependencies = {
28 - 'zbirenbaum/copilot.lua',
29 - cmd = 'Copilot',
30 - config = function ()
31 - require 'copilot'.setup {
32 - suggestion = { enabled = false },
33 - panel = { enabled = false },
34 - }
35 - end,
36 - },
37 - enabled = FUCK_STABILITY,
38 - },
39 - -------------------------------------------------------------------------------
15 + --- does not yet restore well with session
16 + --- cannot navigate with C-w inside the DocsView
17 + --- it has a manual update mode, but which key to bind it to?
41 19 'amrbashir/nvim-docs-view',
42 20 keys = {
50 28 cmd = 'DocsViewToggle',
51 29 opts = {
52 - position = 'bottom',
30 + position = 'right',
53 31 width = 42,
55 33 enabled = FUCK_STABILITY,
57 35 -------------------------------------------------------------------------------
36 + --- look into demicolon.nvim for ,; repition
59 - -- TODO: look into demicolon.nvim for ,; repition
60 38 'mawkler/refjump.nvim',
61 39 dependencies = {
66 44 enabled = FUCK_STABILITY,
68 46 -------------------------------------------------------------------------------
47 + --- this is pretty great! i just need better binds and tell which key about them
70 - 'CopilotC-Nvim/CopilotChat.nvim',
71 - branch = 'canary',
72 - cmd = 'CopilotChat',
73 - dependencies = {
74 - { 'zbirenbaum/copilot.lua' }, -- or github/copilot.vim
75 - { 'nvim-lua/plenary.nvim' }, -- for curl, log wrapper
76 - },
77 - build = 'make tiktoken', -- Only on MacOS or Linux
78 - opts = {
79 - debug = true, -- Enable debugging
80 - },
81 - enabled = FUCK_STABILITY,
82 - },
83 - -------------------------------------------------------------------------------
84 - {
85 - -- TODO: this is pretty great! i just need better binds and tell which key about them
86 49 'chrisgrieser/nvim-rulebook',
87 50 keys = {
88 51 { '<leader>ri', function () require 'rulebook'.ignoreRule() end },
93 56 enabled = FUCK_STABILITY,
95 58 -------------------------------------------------------------------------------
59 + --- this plugin has some sick visual text formatting chops. check them out some time.
97 - -- this plugin has some sick visual text formatting chops. check them out some time.
98 61 'Wansmer/symbol-usage.nvim',
99 62 event = 'LspAttach',
100 63 opts = {
109 72 enabled = FUCK_STABILITY,
111 74 -------------------------------------------------------------------------------
75 + --- Pretty NICE!
76 + --- fix highlights to match nugu.
113 - 'nvim-telescope/telescope-frecency.nvim',
114 - config = function ()
115 - require 'telescope'.load_extension 'frecency'
116 - end,
117 - keys = {
118 - {
119 - '<c-p><c-f>',
120 - '<cmd>Telescope frecency<cr>',
121 - mode = { 'n' },
122 - desc = 'telescope: Show recently and frequently used files.',
123 - },
124 - },
125 - enabled = FUCK_STABILITY,
126 - },
127 - -------------------------------------------------------------------------------
128 - {
129 - 'winston0410/range-highlight.nvim',
130 - lazy = false,
131 - dependencies = { 'winston0410/cmd-parser.nvim' },
132 - opts = { highlight = 'Visual' },
133 - enabled = FUCK_STABILITY,
134 - },
135 - -------------------------------------------------------------------------------
136 - {
137 - 'rafcamlet/nvim-luapad',
138 - cmd = { 'Luapad', 'LuaRun' },
139 - opts = {},
140 - enabled = FUCK_STABILITY,
142 - },
143 - -------------------------------------------------------------------------------
144 - {
145 - -- Pretty NICE! TODO:" fix highlights to match nugu.
146 78 'dnlhc/glance.nvim',
147 79 event = 'LspAttach',
148 80 keys = {
149 - { 'gD', '<cmd>Glance definitions<cr>', { silent = true }, desc = 'Peek definitions', mode = 'n' },
150 - { 'gR', '<cmd>Glance references<cr>', { silent = true }, desc = 'Peek refernces', mode = 'n' },
151 - { 'gY', '<cmd>Glance type_definitions<cr>', { silent = true }, desc = 'Peek type definitions', mode = 'n' },
152 - { 'gM', '<cmd>Glance implementations<cr>', { silent = true }, desc = 'Peek implementations', mode = 'n' },
81 + { '<Leader>gd', '<cmd>Glance definitions<cr>', { silent = true }, desc = 'Peek definitions', mode = 'n' },
82 + { '<Leader>gr', '<cmd>Glance references<cr>', { silent = true }, desc = 'Peek refernces', mode = 'n' },
83 + { '<Leader>gy', '<cmd>Glance type_definitions<cr>', { silent = true }, desc = 'Peek type definitions', mode = 'n' },
84 + { '<Leader>gm', '<cmd>Glance implementations<cr>', { silent = true }, desc = 'Peek implementations', mode = 'n' },
154 86 config = true,
155 87 enabled = FUCK_STABILITY,
189 121 enabled = FUCK_STABILITY,
191 123 -------------------------------------------------------------------------------
124 + --- fix highlights for nugu
193 - -- TODO: bind IMove* to alt+h and alt+l with fallback to gomove
194 - -- NOTE: if this one does not work out, check https://github.com/Wansmer/sibling-swap.nvim
195 126 'mizlan/iswap.nvim',
127 + keys = {
128 + { '<leader>ii', '<CMD>ISwapWith<CR>', { silent = true }, desc = 'Swap object with another', mode = 'n' },
129 + },
196 130 event = 'VeryLazy',
197 131 enabled = FUCK_STABILITY,
199 133 -------------------------------------------------------------------------------
134 + --- fix nugu highlights (also snippet highlights)
135 + --- configure with custom snippets?
137 + 'saghen/blink.cmp',
138 + lazy = false, -- lazy loading handled internally
139 + -- use a release tag to download pre-built binaries
140 + version = 'v0.*',
141 + ---@module 'blink.cmp'
142 + ---@type blink.cmp.Config
143 + opts = {
144 + -- 'default' for mappings similar to built-in completion
145 + -- 'super-tab' for mappings similar to vscode (tab to accept, arrow keys to navigate)
146 + -- 'enter' for mappings similar to 'super-tab' but with 'enter' to accept
147 + -- see the "default configuration" section below for full documentation on how to define
148 + -- your own keymap.
149 + keymap = { preset = 'default' },
151 + highlight = {
152 + -- sets the fallback highlight groups to nvim-cmp's highlight groups
153 + -- useful for when your theme doesn't support blink.cmp
154 + -- will be removed in a future release, assuming themes add support
155 + use_nvim_cmp_as_default = true,
156 + },
157 + -- set to 'mono' for 'Nerd Font Mono' or 'normal' for 'Nerd Font'
158 + -- adjusts spacing to ensure icons are aligned
159 + nerd_font_variant = 'normal',
161 + -- default list of enabled providers defined so that you can extend it
162 + -- elsewhere in your config, without redefining it, via `opts_extend`
163 + sources = {
164 + completion = {
165 + enabled_providers = { 'lsp', 'path', 'snippets', 'buffer' },
166 + },
167 + },
169 + -- experimental auto-brackets support
170 + accept = { auto_brackets = { enabled = true } },
172 + -- experimental signature help support
173 + trigger = { signature_help = { enabled = true } },
174 + },
175 + -- allows extending the enabled_providers array elsewhere in your config
176 + -- without having to redefine it
177 + opts_extend = { 'sources.completion.enabled_providers' },
178 + },
179 + -------------------------------------------------------------------------------

neovim/lua/bugabinga/plugins/luasnip.lua

Deleted
deleted file mode 100644
1 --- FIXME: replace with vim.snippet
2 -return {
3 - 'L3MON4D3/LuaSnip',
4 - version = 'v2.*',
5 - build = false,
6 - dependencies = {
7 - 'stevearc/vim-vscode-snippets',
8 - },
9 - config = function ()
10 - local luasnip = require 'luasnip'
11 - local has_vim_snippet, snippet = pcall( require, 'vim.snippet' )
12 - require 'luasnip.loaders.from_vscode'.lazy_load()
13 - vim.keymap.set( 's', '<Tab>', '<Plug>luasnip-jump-next' )
14 - vim.keymap.set( 's', '<C-h>', '<Plug>luasnip-jump-prev' )
15 - vim.keymap.set( 's', '<C-l>', '<Plug>luasnip-jump-next' )
16 - vim.keymap.set( { 'i', 's', }, '<C-k>', function () pcall( luasnip.change_choice, -1 ) end )
17 - vim.keymap.set( { 'i', 's', }, '<C-j>', function () pcall( luasnip.change_choice, 1 ) end )
19 - local aug = vim.api.nvim_create_augroup( 'ClearLuasnipSession', { clear = true, } )
20 - -- Can't use InsertLeave here because that fires when we go to select mode
21 - vim.api.nvim_create_autocmd( 'CursorHold', {
22 - desc = 'Deactivate snippet after leaving insert/select mode',
23 - pattern = '*',
24 - group = aug,
25 - callback = function ()
26 - vim.cmd.LuaSnipUnlinkCurrent { mods = { emsg_silent = true, }, }
27 - if has_vim_snippet then
28 - snippet.stop()
29 - end
30 - end,
31 - } )
33 - vim.keymap.set( 'i', '<C-h>', function ()
34 - if luasnip.get_active_snip() then
35 - luasnip.jump( -1 )
36 - elseif has_vim_snippet and snippet.active() then
37 - snippet.jump( -1 )
38 - else
39 - local cur = vim.api.nvim_win_get_cursor( 0 )
40 - pcall( vim.api.nvim_win_set_cursor, 0, { cur[1], cur[2] - 1, } )
41 - end
42 - end )
43 - vim.keymap.set( 'i', '<C-l>', function ()
44 - if luasnip.get_active_snip() then
45 - luasnip.jump( 1 )
46 - elseif has_vim_snippet and snippet.active() then
47 - snippet.jump( 1 )
48 - else
49 - local cur = vim.api.nvim_win_get_cursor( 0 )
50 - pcall( vim.api.nvim_win_set_cursor, 0, { cur[1], cur[2] + 1, } )
51 - end
52 - end )
54 - -- Required to support nested placeholders
55 - -- From https://github.com/L3MON4D3/LuaSnip/wiki/Nice-Configs#imitate-vscodes-behaviour-for-nested-placeholders
56 - local util = require 'luasnip.util.util'
58 - luasnip.config.setup {
59 - store_selection_keys = '<Tab>',
60 - updateevents = 'TextChanged,TextChangedI',
61 - parser_nested_assembler = function ( _, snippet )
62 - local select = function ( snip, no_move )
63 - snip.parent:enter_node( snip.indx )
64 - -- upon deletion, extmarks of inner nodes should shift to end of
65 - -- placeholder-text.
66 - for _, node in ipairs( snip.nodes ) do
67 - node:set_mark_rgrav( true, true )
68 - end
70 - -- SELECT all text inside the snippet.
71 - if not no_move then
72 - vim.api.nvim_feedkeys( vim.api.nvim_replace_termcodes( '<Esc>', true, false, true ), 'n', true )
73 - local pos_begin, pos_end = snip.mark:pos_begin_end()
74 - util.normal_move_on( pos_begin )
75 - vim.api.nvim_feedkeys( vim.api.nvim_replace_termcodes( 'v', true, false, true ), 'n', true )
76 - util.normal_move_before( pos_end )
77 - vim.api.nvim_feedkeys( vim.api.nvim_replace_termcodes( 'o<C-G>', true, false, true ), 'n', true )
78 - end
79 - end
80 - function snippet:jump_into( dir, no_move )
81 - if self.active then
82 - -- inside snippet, but not selected.
83 - if dir == 1 then
84 - self:input_leave()
85 - return self.next:jump_into( dir, no_move )
86 - else
87 - select( self, no_move )
88 - return self
89 - end
90 - else
91 - -- jumping in from outside snippet.
92 - self:input_enter()
93 - if dir == 1 then
94 - select( self, no_move )
95 - return self
96 - else
97 - return self.inner_last:jump_into( dir, no_move )
98 - end
99 - end
100 - end
102 - -- this is called only if the snippet is currently selected.
103 - function snippet:jump_from( dir, no_move )
104 - if dir == 1 then
105 - return self.inner_first:jump_into( dir, no_move )
106 - else
107 - self:input_leave()
108 - return self.prev:jump_into( dir, no_move )
109 - end
110 - end
112 - return snippet
113 - end,
114 - }
115 - end,

neovim/lua/bugabinga/plugins/markdown-table-mode.lua

Deleted
deleted file mode 100644
1 -return {
2 - 'Kicamon/markdown-table-mode.nvim',
3 - commit = 'f830cd15a97deb3acc53d9f6607bc609f7f32e49',
4 - ft = 'markdown',
5 - opts = {},
6 -}

neovim/lua/bugabinga/plugins/move.lua

Added
new 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',
105 + map.normal {
106 + description = 'Duplicate line up',
107 + category = 'editing',
108 + keys = '<A-K>',
109 + options = options,
110 + command = '<Plug>GoNSDUp',
112 + map.normal {
113 + description = 'Duplicate character right',
114 + category = 'editing',
115 + keys = '<A-L>',
116 + options = options,
117 + command = '<Plug>GoNSDRight',
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',
128 + map.visual {
129 + description = 'Duplicate block down',
130 + category = 'editing',
131 + keys = '<A-J>',
132 + options = options,
133 + command = '<Plug>GoVSDDown',
135 + map.visual {
136 + description = 'Duplicate block up',
137 + category = 'editing',
138 + keys = '<A-K>',
139 + options = options,
140 + command = '<Plug>GoVSDUp',
142 + map.visual {
143 + description = 'Duplicate block right',
144 + category = 'editing',
145 + keys = '<A-L>',
146 + options = options,
147 + command = '<Plug>GoVSDRight',
149 + end,
150 + },

neovim/lua/bugabinga/plugins/navigation.lua

Added
new file mode 100644
1 +return {
2 + 'echasnovski/mini.bracketed',
3 + version = '0.*',
4 + event = 'VeryLazy',
5 + opts = {
6 + treesitter = { suffix = '' },
7 + window = { suffix = '' },
8 + yank = { suffix = '' },
9 + indent = { suffix = '' },
10 + comment = { suffix = '' },
11 + },

neovim/lua/bugabinga/plugins/picker.lua

Added
new file mode 100644
1 +require 'bugabinga.health'.add_dependency
2 +{
3 + name = 'ripgrep',
4 + name_of_executable = 'rg',
5 +}
6 + {
7 + name = 'find-fd',
8 + name_of_executable = 'fd',
9 + }
10 + {
11 + name = 'CMake',
12 + name_of_executable = 'cmake',
13 + }
15 +local map = require 'std.map'
16 +local icon = require 'std.icon'
18 +map.normal {
19 + description = 'Switch to recently used folders',
20 + category = 'navigation',
21 + keys = '<c-p><c-z>',
22 + command = function () require 'telescope'.extensions.zoxide.list() end,
25 +map.normal.visual.terminal {
26 + description = 'Search help files',
27 + category = 'help',
28 + keys = '<F1>',
29 + command = function () require 'telescope.builtin'.help_tags() end,
32 +map.normal {
33 + description = 'Open last search...',
34 + category = 'plugins',
35 + keys = '<c-p>',
36 + command = function () require 'telescope.builtin'.resume() end,
39 +map.normal {
40 + description = 'Open search for all files...',
41 + category = 'search',
42 + keys = '<c-p><c-p>',
43 + command = function () require 'telescope.builtin'.find_files() end,
46 +map.normal {
47 + description = 'Open search for keymaps...',
48 + category = 'search',
49 + keys = '<c-p><c-k>',
50 + command = function () require 'telescope.builtin'.keymaps() end,
53 +map.normal {
54 + description = 'Open search for symbols...',
55 + category = 'search',
56 + keys = '<c-p><c-s>',
57 + command = function () require 'telescope.builtin'.symbols() end,
60 +map.normal {
61 + description = 'Open search for all file contents...',
62 + category = 'search',
63 + keys = '<c-p><c-g>',
64 + command = function () require 'telescope.builtin'.live_grep() end,
67 +map.normal {
68 + description = 'Open undo hisory...',
69 + category = 'undo',
70 + keys = '<c-p><c-u>',
71 + command = function () require 'telescope'.extensions.undo.undo() end,
74 +map.normal {
75 + description = 'Open search for current buffer content...',
76 + category = 'search',
77 + keys = '<c-p><c-/>',
78 + command = function () require 'telescope.builtin'.current_buffer_fuzzy_find() end,
81 +map.normal {
82 + description = 'Open search for buffers...',
83 + category = 'search',
84 + keys = '<c-e>',
85 + command = function () require 'telescope.builtin'.buffers() end,
88 +map.normal {
89 + description = 'Open clipboard history...',
90 + category = 'history',
91 + keys = '<c-p><c-v>',
92 + command = function ()
93 + require 'telescope'.extensions.neoclip.default()
94 + end,
97 +return {
98 + 'nvim-telescope/telescope.nvim',
99 + version = '0.*',
100 + cmd = 'Telescope',
101 + dependencies = {
103 + 'nvim-telescope/telescope-fzf-native.nvim',
104 + build =
105 + function ( plugin_spec )
106 + local result
107 + result = vim.system( { 'cmake', '-S.', '-Bbuild', '-DCMAKE_BUILD_TYPE=Release' },
108 + { text = true, cwd = plugin_spec.dir } ):wait()
109 + if result.code ~= 0 then error( result.stderr ) end
110 + result = vim.system( { 'cmake', '--build', 'build', '--config', 'Release' },
111 + { text = true, cwd = plugin_spec.dir } ):wait()
112 + if result.code ~= 0 then error( result.stderr ) end
113 + result = vim.system( { 'cmake', '--install', 'build', '--prefix', 'build' },
114 + { text = true, cwd = plugin_spec.dir } ):wait()
115 + if result.code ~= 0 then error( result.stderr ) end
116 + end,
117 + },
118 + 'nvim-lua/plenary.nvim',
119 + 'nvim-tree/nvim-web-devicons',
120 + 'nvim-telescope/telescope-symbols.nvim',
121 + 'jvgrootveld/telescope-zoxide',
122 + 'AckslD/nvim-neoclip.lua',
123 + 'debugloop/telescope-undo.nvim',
124 + },
125 + config = function ()
126 + local telescope = require 'telescope'
127 + local actions = require 'telescope.actions'
128 + local themes = require 'telescope.themes'
130 + local ivy = themes.get_ivy { layout_config = { preview_width = 0.23 } }
132 + telescope.setup {
133 + defaults = {
134 + prompt_prefix = icon.telescope .. ' ',
135 + selection_caret = icon.arrow_right .. ' ',
136 + file_ignore_patterns = {
137 + '%.git/',
138 + '%.git/',
139 + '%.svn\\',
140 + '%.svn\\',
141 + '%.pdf',
142 + '%.mkv',
143 + '%.mp4',
144 + '%.zip',
145 + '%.spl',
146 + },
147 + mappings = {
148 + i = {
149 + ['<c-j>'] = actions.cycle_history_next,
150 + ['<c-k>'] = actions.cycle_history_prev,
151 + ['<c-n>'] = actions.move_selection_next,
152 + ['<c-p>'] = actions.move_selection_previous,
153 + ['<c-s>'] = actions.file_split,
154 + ['g?'] = actions.which_key,
155 + },
156 + n = { q = actions.close },
157 + },
158 + },
159 + pickers = {
160 + find_files = ivy,
161 + fd = ivy,
162 + keymaps = ivy,
163 + diagnostics = ivy,
164 + symbols = ivy,
165 + live_grep = ivy,
166 + current_buffer_fuzzy_find = ivy,
167 + buffers = ivy,
168 + help_tags = ivy,
169 + },
170 + extensions = {
171 + zoxide = { prompt_title = 'Navigate deez nuts!' },
172 + },
175 + require 'neoclip'.setup()
177 + telescope.load_extension 'fzf'
178 + telescope.load_extension 'zoxide'
179 + telescope.load_extension 'neoclip'
180 + telescope.load_extension 'undo'
181 + end,

neovim/lua/bugabinga/plugins/statusbar.lua

Added
new 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 + dependencies = {
14 + 'nvim-tree/nvim-web-devicons',
15 + },
16 + config = function ()
17 + local heirline = require 'heirline'
18 + local conditions = require 'heirline.conditions'
19 + local utils = require 'heirline.utils'
21 + local nugu = require 'bugabinga.nugu.palette'
22 + heirline.load_colors( nugu )
24 + auto 'reload_heirline_colors' {
25 + description = 'Reload dark/light nugu colors for Heirline',
26 + events = 'ColorScheme',
27 + command = function ()
28 + utils.on_colorscheme( nugu )
29 + end,
30 + }
32 + local vi_mode = {
33 + init = function ( self )
34 + self.mode = vim.fn.mode( 1 ) -- :h mode()
35 + end,
37 + static = {
38 + mode_names = {
39 + n = icon.normal,
40 + no = icon.normal .. '?',
41 + nov = icon.normal .. '?',
42 + noV = icon.normal .. '?',
43 + ['no\22'] = icon.normal .. '?',
44 + niI = icon.normal .. 'i',
45 + niR = icon.normal .. 'r',
46 + niV = icon.normal .. 'v',
47 + nt = icon.normal .. 't',
48 + v = icon.visual,
49 + vs = icon.visual .. 's',
50 + V = icon.visual .. '_',
51 + Vs = icon.visual .. 's',
52 + ['\22'] = '^' .. icon.visual,
53 + ['\22s'] = '^' .. icon.visual,
54 + s = icon.select,
55 + S = icon.select .. '_',
56 + ['\19'] = '^' .. icon.select,
57 + i = icon.insert,
58 + ic = icon.insert .. 'c',
59 + ix = icon.insert .. 'x',
60 + R = icon.replace,
61 + Rc = icon.replace .. 'c',
62 + Rx = icon.replace .. 'x',
63 + Rv = icon.replace .. 'v',
64 + Rvc = icon.replace .. 'v',
65 + Rvx = icon.replace .. 'v',
66 + c = icon.command,
67 + cv = icon.command .. 'x',
68 + r = icon.pending,
69 + rm = icon.pending .. 'm',
70 + ['r?'] = icon.pending .. '?',
71 + ['!'] = icon.exclaim,
72 + t = icon.terminal,
73 + },
74 + mode_colors = {
75 + n = 'ui_normal',
76 + i = 'ui_accent',
77 + v = 'ui_important_global',
78 + V = 'ui_important_global',
79 + ['\22'] = 'ui_important_global',
80 + c = 'ui_important_global',
81 + s = 'ui_important_global',
82 + S = 'ui_important_global',
83 + ['\19'] = 'ui_important_global',
84 + R = 'ui_important_global',
85 + r = 'ui_important_global',
86 + ['!'] = 'ui_important_global',
87 + t = 'ui_important_global',
88 + },
89 + },
91 + provider = function ( self )
92 + local mode_name = self.mode_names[self.mode]
93 + return ' ' .. icon.vim .. ' %3(' .. mode_name .. '%) '
94 + end,
96 + hl = function ( self )
97 + local mode = self.mode:sub( 1, 1 ) -- get only the first mode character
98 + return { fg = self.mode_colors[mode], bold = true }
99 + end,
101 + update = {
102 + 'ModeChanged',
103 + pattern = '*:*',
104 + callback = vim.schedule_wrap( function ()
105 + vim.cmd.redrawstatus()
106 + end ),
107 + },
110 + local file_icon = {
111 + init = function ( self )
112 + local filename = self.filename
113 + local extension = vim.fn.fnamemodify( filename, ':e' )
114 + self.icon = require 'nvim-web-devicons'.get_icon_color( filename, extension, { default = true } )
115 + end,
116 + provider = function ( self )
117 + return self.icon and (self.icon .. ' ')
118 + end,
119 + hl = 'DefaultIcon',
122 + local file_name = {
123 + init = function ( self )
124 + self.lfilename = vim.fs.normalize( vim.fn.fnamemodify( self.filename, ':.' ) )
125 + if self.lfilename == '' then
126 + self.lfilename = NEW_FILE
127 + end
128 + end,
130 + flexible = 2,
133 + provider = function ( self )
134 + return self.lfilename
135 + end,
136 + },
138 + provider = function ( self )
139 + return vim.fs.normalize( vim.fn.pathshorten( self.lfilename ) )
140 + end,
141 + },
144 + local file_flags = {
146 + condition = function ()
147 + return vim.bo.modified
148 + end,
149 + provider = string.format( ' %s ', icon.modified ),
150 + hl = 'Comment',
151 + },
153 + condition = function ()
154 + return not vim.bo.modifiable or vim.bo.readonly
155 + end,
156 + provider = string.format( ' %s ', icon.lock ),
157 + hl = 'ErrorMsg',
158 + },
161 + local file_name_block = {
162 + init = function ( self )
163 + self.filename = vim.fs.normalize( vim.api.nvim_buf_get_name( 0 ) )
164 + end,
166 + file_icon,
167 + { provider = ' ' },
168 + file_name,
169 + file_flags,
170 + { provider = '%<' }, -- this means that the statusline is cut here when there's not enough space
173 + local file_type = {
174 + provider = function ()
175 + return icon.file .. ' ' .. string.lower( vim.bo.filetype )
176 + end,
179 + local file_encoding = {
180 + provider = function ()
181 + local enc = (vim.bo.fenc ~= '' and vim.bo.fenc) or vim.o.enc -- :h 'enc'
182 + return enc ~= 'utf-8' and enc:upper()
183 + end,
186 + local file_format = {
187 + static = {
188 + dos = icon.newline .. icon.carriage_return,
189 + unix = icon.newline,
190 + mac = icon.carriage_return,
191 + },
192 + provider = function ( self )
193 + local fileformat = vim.bo.fileformat
194 + return self[fileformat]
195 + end,
198 + local file_size = {
199 + provider = function ()
200 + -- stackoverflow, compute human readable file size
201 + -- i want to see vim opening a 1EiB file 󰱯
202 + local suffix = { 'b', 'k', 'M', 'G', 'T', 'P', 'E' }
203 + local fsize = vim.fn.getfsize( vim.api.nvim_buf_get_name( 0 ) )
204 + fsize = (fsize < 0 and 0) or fsize
205 + if fsize < 1024 then
206 + return fsize .. suffix[1]
207 + end
208 + local i = math.floor( (math.log( fsize ) / math.log( 1024 )) )
209 + return string.format( '%.2g%s', fsize / math.pow( 1024, i ), suffix[i + 1] )
210 + end,
213 + local file_last_modified = {
214 + provider = function ()
215 + local ftime = vim.fn.getftime( vim.api.nvim_buf_get_name( 0 ) )
216 + if ftime > 0 then
217 + local timeago = require 'std.timeago'
218 + return timeago.format( ftime )
219 + end
220 + end,
223 + local escape_status = {
224 + condition = function ()
225 + local ok, _ = pcall( require, 'better_escape' )
226 + return ok
227 + end,
228 + provider = function ()
229 + local ok, _ = pcall( require, 'better_escape' )
230 + -- TODO: add to icons
231 + return ok and _.waiting and '󰂸' or ''
232 + end,
236 + local lsp_active = {
237 + condition = conditions.lsp_attached,
238 + update = { 'LspAttach', 'LspDetach', 'BufEnter', 'BufLeave' },
240 + provider = function ()
241 + local names = {}
242 + for _, client in pairs( vim.lsp.get_clients { bufnr = 0 } ) do
243 + table.insert( names, client.name )
244 + end
245 + return icon.lsp .. ' ' .. table.concat( names, ' ' )
246 + end,
249 + local diagnostic = {
250 + condition = conditions.has_diagnostics,
252 + static = {
253 + error_icon = icon.error,
254 + warn_icon = icon.warn,
255 + info_icon = icon.info,
256 + hint_icon = icon.hint,
257 + },
259 + init = function ( self )
260 + self.errors = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.ERROR } )
261 + self.warnings = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.WARN } )
262 + self.hints = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.HINT } )
263 + self.info = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.INFO } )
264 + end,
266 + update = { 'DiagnosticChanged', 'BufEnter', 'BufLeave' },
269 + provider = function ( self )
270 + -- 0 is just another output, we can decide to print it or not!
271 + return self.errors > 0 and (self.error_icon .. ' ' .. self.errors .. ' ')
272 + end,
273 + hl = 'DiagnosticError',
274 + },
276 + provider = function ( self )
277 + return self.warnings > 0 and (self.warn_icon .. ' ' .. self.warnings .. ' ')
278 + end,
279 + hl = 'DiagnosticWarn',
280 + },
282 + provider = function ( self )
283 + return self.info > 0 and (self.info_icon .. ' ' .. self.info .. ' ')
284 + end,
285 + hl = 'DiagnosticInfo',
286 + },
288 + provider = function ( self )
289 + return self.hints > 0 and (self.hint_icon .. ' ' .. self.hints)
290 + end,
291 + hl = 'DiagnosticHint',
292 + },
295 + local is_svn_repo = function ()
296 + local svn_dir = vim.fs.find( '.svn', {
297 + upward = true,
298 + stop = vim.uv.os_homedir(),
299 + path = vim.fs.dirname( vim.api.nvim_buf_get_name( 0 ) ),
300 + type = 'directory',
301 + } )
303 + return not vim.tbl_isempty( svn_dir )
304 + end
306 + local svn_get_relative_url = function ()
307 + -- FIXME: replace with vim.system
308 + local job = require 'plenary.job'
309 + local relative_url = { '[ERR]' }
311 + job
312 + :new {
313 + command = 'svn',
314 + args = { 'info', '--show-item', 'relative-url', '--no-newline' },
315 + on_exit = function ( current_job, exit_code )
316 + if exit_code == 0 then
317 + relative_url = current_job:result()
318 + end
319 + end,
321 + :sync()
323 + return relative_url[1]
324 + end
326 + local svn = {
327 + condition = is_svn_repo,
329 + update = 'BufEnter',
331 + init = function ( self )
332 + self.relative_url = svn_get_relative_url()
333 + end,
336 + provider = function ( self )
337 + return icon.subversion .. ' ' .. icon.branch .. ' ' .. self.relative_url
338 + end,
339 + },
342 + local git = {
343 + condition = conditions.is_git_repo,
345 + init = function ( self )
346 + self.status_dict = vim.b.minidiff_summary
347 + end,
350 + provider = function ( self )
351 + return icon.git .. ' ' .. icon.branch .. ' ' .. self.status_dict.source_name .. ' '
352 + end,
353 + },
355 + provider = function ( self )
356 + local count = self.status_dict.add or 0
357 + return count > 0 and (icon.diff_add .. ' ' .. count .. ' ')
358 + end,
359 + hl = 'DiffAdd',
360 + },
362 + provider = function ( self )
363 + local count = self.status_dict.delete or 0
364 + return count > 0 and (icon.diff_remove .. ' ' .. count .. ' ')
365 + end,
366 + hl = 'DiffDelete',
367 + },
369 + provider = function ( self )
370 + local count = self.status_dict.change or 0
371 + return count > 0 and (icon.diff_change .. ' ' .. count .. ' ')
372 + end,
373 + hl = 'DiffChange',
374 + },
377 + local work_dir = {
378 + init = function ( self )
379 + self.icon = (vim.fn.haslocaldir( 0 ) == 1 and icon['local'] or '') .. ' ' .. icon.global .. ' '
380 + self.cwd = vim.fs.normalize( vim.uv.cwd() ):gsub( vim.fs.normalize( vim.uv.os_homedir() ), '~' )
381 + end,
383 + flexible = 1,
386 + provider = function ( self )
387 + return self.icon .. self.cwd
388 + end,
389 + },
391 + provider = function ( self )
392 + local cwd = vim.fn.pathshorten( self.cwd )
393 + return self.icon .. cwd
394 + end,
395 + },
397 + provider = '',
398 + },
401 + local help_file_name = {
402 + condition = function ()
403 + return vim.bo.filetype == 'help'
404 + end,
405 + provider = function ()
406 + local filename = vim.api.nvim_buf_get_name( 0 )
407 + return vim.fn.fnamemodify( filename, ':t' )
408 + end,
409 + hl = 'Question',
412 + local terminal_name = {
413 + provider = function ()
414 + local name, _ = vim.api.nvim_buf_get_name( 0 ):gsub( '.*:', '' )
415 + local basename = vim.fs.basename( name )
416 + return icon.terminal .. ' ' .. (basename or 'noname')
417 + end,
418 + hl = 'Bold',
421 + local macro_recording = {
422 + condition = function ()
423 + return vim.fn.reg_recording() ~= '' and vim.o.cmdheight == 0
424 + end,
425 + provider = icon.macro .. ' ',
426 + hl = 'PreProc',
427 + utils.surround( { '░▒▓ ', ' ▓▒░' }, nil, {
428 + provider = function ()
429 + return vim.fn.reg_recording()
430 + end,
431 + hl = 'Bold',
432 + } ),
433 + update = {
434 + 'RecordingEnter',
435 + 'RecordingLeave',
436 + },
439 + local align = { provider = '%=' }
440 + local space = { provider = ' ' }
442 + local default_statusline = {
443 + vi_mode,
444 + macro_recording,
445 + work_dir,
446 + space,
447 + git,
448 + svn,
449 + align,
450 + diagnostic,
451 + align,
452 + space,
453 + space,
454 + escape_status,
455 + space,
456 + lsp_active,
457 + space,
458 + file_encoding,
459 + space,
460 + file_format,
461 + space,
462 + file_type,
463 + space,
464 + file_size,
465 + space,
466 + file_last_modified,
469 + local special_statusline = {
470 + condition = function ()
471 + return conditions.buffer_matches {
472 + buftype = ignored.buftypes,
473 + filetype = ignored.filetypes,
475 + end,
477 + file_type,
478 + space,
479 + help_file_name,
480 + align,
483 + local terminal_statusline = {
485 + condition = function ()
486 + return conditions.buffer_matches { buftype = { 'terminal' } }
487 + end,
489 + { condition = conditions.is_active, vi_mode, space },
490 + file_type,
491 + space,
492 + terminal_name,
493 + align,
496 + local inactive_statusline = {
497 + condition = conditions.is_not_active,
498 + file_type,
499 + space,
500 + file_name,
501 + align,
504 + local statuslines = {
505 + hl = function ()
506 + if conditions.is_active() then
507 + return 'StatusLine'
508 + else
509 + return 'StatusLineNC'
510 + end
511 + end,
513 + fallthrough = false,
515 + special_statusline,
516 + terminal_statusline,
517 + inactive_statusline,
518 + default_statusline,
521 + local winbars = {
522 + hl = function ()
523 + if conditions.is_active() then
524 + return 'Winbar'
525 + else
526 + return 'WinbarNC'
527 + end
528 + end,
530 + fallthrough = false,
533 + condition = function ()
534 + return conditions.buffer_matches { buftype = { 'terminal' } }
535 + end,
537 + file_type,
538 + space,
539 + terminal_name,
540 + },
543 + file_name_block,
544 + },
547 + -- local tabline_buffer_number = {
548 + -- provider = function ( self )
549 + -- return '(' .. tostring( self.bufnr ) .. ')'
550 + -- end,
551 + -- hl = function ( self )
552 + -- if self.is_active then
553 + -- return { fg = utils.get_highlight 'TabLineSel'.fg, }
554 + -- elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then
555 + -- return { fg = utils.get_highlight 'StatusLineNc'.fg, }
556 + -- else
557 + -- return { fg = utils.get_highlight 'TabLine'.fg, }
558 + -- end
559 + -- end,
560 + -- }
562 + -- local tabline_file_name = {
563 + -- provider = function ( self )
564 + -- local name = self.file_name
565 + -- return name == '' and NEW_FILE or vim.fs.normalize( vim.fn.fnamemodify( name, ':t' ) )
566 + -- end,
567 + -- hl = function ( self ) return { bold = self.is_active or self.is_visible, italic = true, } end,
568 + -- }
570 + -- local tabline_file_flags = {
571 + -- {
572 + -- condition = function ( self ) return vim.api.nvim_get_option_value( 'modified', { buf = self.bufnr, } ) end,
573 + -- provider = icon.modified .. ' ',
574 + -- },
575 + -- {
576 + -- condition = function ( self )
577 + -- return not vim.api.nvim_get_option_value( 'modifiable', { buf = self.bufnr, } ) or
578 + -- vim.api.nvim_get_option_value( 'readonly', { buf = self.bufnr, } )
579 + -- end,
580 + -- provider = function ( self )
581 + -- if vim.api.nvim_get_option_value( 'buftype', { buf = self.bufnr, } ) == 'terminal' then
582 + -- return icon.terminal
583 + -- else
584 + -- return icon.lock
585 + -- end
586 + -- end,
587 + -- },
588 + -- hl = 'Bold',
589 + -- }
591 + -- local tabline_file_name_block = {
592 + -- init = function ( self )
593 + -- self.file_name = vim.api.nvim_buf_get_name( self.bufnr )
594 + -- end,
595 + --
596 + -- hl = function ( self )
597 + -- if self.is_active then
598 + -- return 'TabLineSel'
599 + -- elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then
600 + -- return { fg = utils.get_highlight 'StatusLineNc'.fg, }
601 + -- else
602 + -- return 'TabLine'
603 + -- end
604 + -- end,
605 + --
606 + -- on_click = {
607 + -- callback = function ( _, minwid, _, button )
608 + -- if button == 'm' then --m = middle click
609 + -- vim.schedule( function ()
610 + -- vim.api.nvim_buf_delete( minwid, { force = false, } )
611 + -- vim.cmd.redrawtabline()
612 + -- end )
613 + -- else
614 + -- vim.api.nvim_win_set_buf( 0, minwid )
615 + -- end
616 + -- end,
617 + -- minwid = function ( self ) return self.bufnr end,
618 + -- name = 'heirline_tabline_buffer_callback',
619 + -- },
620 + --
621 + -- file_icon,
622 + -- { provider = ' ', },
623 + -- tabline_file_name,
624 + -- tabline_buffer_number,
625 + -- tabline_file_flags,
626 + -- }
628 + -- local tabline_buffer_block = utils.surround(
629 + -- {
630 + -- ' ' .. icon.slant_left,
631 + -- icon.slant_right .. ' ',
632 + -- },
633 + -- function ( self )
634 + -- if self.is_active then
635 + -- return utils.get_highlight 'TabLine'.bg
636 + -- else
637 + -- return utils.get_highlight 'TabLineFill'.bg
638 + -- end
639 + -- end,
640 + -- { tabline_file_name_block, }
641 + -- )
643 + -- local buffer_line = utils.make_buflist(
644 + -- tabline_buffer_block,
645 + -- { provider = icon.arrow_left .. ' ', hl = 'TabLine', },
646 + -- { provider = ' ' .. icon.arrow_right, hl = 'TabLine', }
647 + -- )
649 + local tabpage = {
650 + provider = function ( self )
651 + return '%' .. self.tabnr .. 'T ' .. self.tabpage .. ' %T'
652 + end,
653 + hl = function ( self )
654 + if self.is_active then
655 + return 'TabLineSel'
656 + else
657 + return 'TabLine'
658 + end
659 + end,
662 + local tab_pages = {
663 + { provider = '%=' },
664 + utils.make_tablist( tabpage ),
667 + -- local tabline = { buffer_line, tab_pages, }
669 + -- local statuscolumn = {}
671 + heirline.setup {
672 + statusline = statuslines,
673 + winbar = winbars,
674 + tabline = tab_pages,
675 + -- tabline = tabline,
676 + -- statuscolumn = statuscolumn,
678 + opts = {
679 + colors = nugu,
680 + disable_winbar_cb = function ( args )
681 + return conditions.buffer_matches( {
682 + buftype = ignored.buftypes,
683 + filetype = ignored.filetypes,
684 + }, args.buf )
685 + end,
686 + },
688 + end,
689 + },

neovim/lua/bugabinga/plugins/substitute.lua

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

neovim/lua/bugabinga/plugins/telescope.lua

Deleted
deleted file mode 100644
1 -require 'bugabinga.health'.add_dependency
2 -{
3 - name = 'ripgrep',
4 - name_of_executable = 'rg',
5 -}
6 - {
7 - name = 'find-fd',
8 - name_of_executable = 'fd',
9 - }
10 - {
11 - name = 'CMake',
12 - name_of_executable = 'cmake',
13 - }
15 -local map = require 'std.map'
16 -local icon = require 'std.icon'
18 -map.normal {
19 - description = 'Switch to recently used folders',
20 - category = 'navigation',
21 - keys = '<c-p><c-z>',
22 - command = function () require 'telescope'.extensions.zoxide.list() end,
25 -map.normal.visual.terminal {
26 - description = 'Search help files',
27 - category = 'help',
28 - keys = '<F1>',
29 - command = function () require 'telescope.builtin'.help_tags() end,
32 -map.normal {
33 - description = 'Open last search...',
34 - category = 'plugins',
35 - keys = '<c-p>',
36 - command = function () require 'telescope.builtin'.resume() end,
39 -map.normal {
40 - description = 'Open search for all files...',
41 - category = 'search',
42 - keys = '<c-p><c-p>',
43 - command = function () require 'telescope.builtin'.find_files() end,
46 -map.normal {
47 - description = 'Open search for keymaps...',
48 - category = 'search',
49 - keys = '<c-p><c-k>',
50 - command = function () require 'telescope.builtin'.keymaps() end,
53 -map.normal {
54 - description = 'Open search for symbols...',
55 - category = 'search',
56 - keys = '<c-p><c-s>',
57 - command = function () require 'telescope.builtin'.symbols() end,
60 -map.normal {
61 - description = 'Open search for all file contents...',
62 - category = 'search',
63 - keys = '<c-p><c-g>',
64 - command = function () require 'telescope.builtin'.live_grep() end,
67 -map.normal {
68 - description = 'Open undo hisory...',
69 - category = 'undo',
70 - keys = '<c-p><c-u>',
71 - command = function () require 'telescope'.extensions.undo.undo() end,
74 -map.normal {
75 - description = 'Open search for current buffer content...',
76 - category = 'search',
77 - keys = '<c-p><c-/>',
78 - command = function () require 'telescope.builtin'.current_buffer_fuzzy_find() end,
81 -map.normal {
82 - description = 'Open search for buffers...',
83 - category = 'search',
84 - keys = '<c-e>',
85 - command = function () require 'telescope.builtin'.buffers() end,
88 -map.normal {
89 - description = 'Open clipboard history...',
90 - category = 'history',
91 - keys = '<c-p><c-v>',
92 - command = function ()
93 - require 'telescope'.extensions.neoclip.default()
94 - end,
97 -return {
98 - 'nvim-telescope/telescope.nvim',
99 - version = '0.*',
100 - cmd = 'Telescope',
101 - dependencies = {
102 - {
103 - 'nvim-telescope/telescope-fzf-native.nvim',
104 - build =
105 - function ( plugin_spec )
106 - local result
107 - result = vim.system( { 'cmake', '-S.', '-Bbuild', '-DCMAKE_BUILD_TYPE=Release' },
108 - { text = true, cwd = plugin_spec.dir } ):wait()
109 - if result.code ~= 0 then error( result.stderr ) end
110 - result = vim.system( { 'cmake', '--build', 'build', '--config', 'Release' },
111 - { text = true, cwd = plugin_spec.dir } ):wait()
112 - if result.code ~= 0 then error( result.stderr ) end
113 - result = vim.system( { 'cmake', '--install', 'build', '--prefix', 'build' },
114 - { text = true, cwd = plugin_spec.dir } ):wait()
115 - if result.code ~= 0 then error( result.stderr ) end
116 - end,
117 - },
118 - 'nvim-lua/plenary.nvim',
119 - 'nvim-tree/nvim-web-devicons',
120 - 'nvim-telescope/telescope-symbols.nvim',
121 - 'jvgrootveld/telescope-zoxide',
122 - 'AckslD/nvim-neoclip.lua',
123 - 'debugloop/telescope-undo.nvim',
124 - },
125 - config = function ()
126 - local telescope = require 'telescope'
127 - local actions = require 'telescope.actions'
128 - local themes = require 'telescope.themes'
130 - local ivy = themes.get_ivy { layout_config = { preview_width = 0.23 } }
132 - telescope.setup {
133 - defaults = {
134 - prompt_prefix = icon.telescope .. ' ',
135 - selection_caret = icon.arrow_right .. ' ',
136 - file_ignore_patterns = {
137 - '%.git/',
138 - '%.git/',
139 - '%.svn\\',
140 - '%.svn\\',
141 - '%.pdf',
142 - '%.mkv',
143 - '%.mp4',
144 - '%.zip',
145 - '%.spl',
146 - },
147 - mappings = {
148 - i = {
149 - ['<c-j>'] = actions.cycle_history_next,
150 - ['<c-k>'] = actions.cycle_history_prev,
151 - ['<c-n>'] = actions.move_selection_next,
152 - ['<c-p>'] = actions.move_selection_previous,
153 - ['<c-s>'] = actions.file_split,
154 - ['g?'] = actions.which_key,
155 - },
156 - n = { q = actions.close },
157 - },
158 - },
159 - pickers = {
160 - find_files = ivy,
161 - fd = ivy,
162 - keymaps = ivy,
163 - diagnostics = ivy,
164 - symbols = ivy,
165 - live_grep = ivy,
166 - current_buffer_fuzzy_find = ivy,
167 - buffers = ivy,
168 - help_tags = ivy,
169 - },
170 - extensions = {
171 - zoxide = { prompt_title = 'Navigate deez nuts!' },
172 - },
173 - }
175 - require 'neoclip'.setup()
177 - telescope.load_extension 'fzf'
178 - telescope.load_extension 'zoxide'
179 - telescope.load_extension 'neoclip'
180 - telescope.load_extension 'undo'
181 - end,

neovim/lua/bugabinga/plugins/text-case.lua

Deleted
deleted file mode 100644
1 -return {
2 - 'johmsalas/text-case.nvim',
3 - version = '1.*',
4 - keys = {
5 - 'ga', -- Default invocation prefix
6 - },
7 - opts = {},
8 -}

neovim/lua/bugabinga/plugins/textobjects.lua

Modified
4 4 return {
5 5 'nvim-treesitter/nvim-treesitter-textobjects',
6 6 branch = 'master',
7 7 event = 'VeryLazy',
8 8 dependencies = 'nvim-treesitter/nvim-treesitter',
9 9 config = function ()
10 + ---@diagnostic disable-next-line: missing-fields
10 11 require 'nvim-treesitter.configs'.setup {
11 12 textobjects = {
12 13 select = {
13 14 enable = true,
14 - disable = should_disable,
15 15 lookahead = true,
16 16 keymaps = {
17 17 ['af'] = { query = '@call.outer', desc = 'outer function call' },
38 38 move = {
39 39 enable = true,
40 - disable = should_disable,
41 40 set_jumps = true,
42 41 goto_next = {
43 42 [']m'] = { query = '@function.outer', desc = 'goto next function definition' },

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

Deleted
deleted file mode 100644
1 -local map = require 'std.map'
3 -map.normal {
4 - description = 'Next todo comment',
5 - category = 'navigation',
6 - keys = ']t',
7 - command = function ()
8 - require 'todo-comments'.jump_next()
9 - end,
10 -}
12 -map.normal {
13 - description = 'Previous todo comment',
14 - category = 'navigation',
15 - keys = '[t',
16 - command = function ()
17 - require 'todo-comments'.jump_prev()
18 - end,
19 -}
21 -map.normal {
22 - description = 'Show TODOs',
23 - category = 'navigation',
24 - keys = '<leader>T',
25 - command = '<cmd>TodoQuickFix<cr>',
26 -}
28 -return {
29 - 'folke/todo-comments.nvim',
30 - version = '1.*',
31 - event = 'VeryLazy',
32 - dependencies = { 'nvim-lua/plenary.nvim' },
33 - opts = {},
34 -}

neovim/lua/bugabinga/ui.lua

Modified
18 18 buf_options = {
19 19 modifiable = true,
20 20 readonly = false,
21 - }
21 + },
23 23 popup:map( 'n', 'q', function () popup:unmount() end, { noremap = true } )
24 24 return popup

neovim/lua/patches/snippet.lua

Modified
10 10 vim.keymap.set( 'ia', trigger, function ()
11 11 -- If abbrev is expanded with keys like "(", ")", "<cr>", "<space>",
12 12 -- don't expand the snippet. Only accept "<c-]>" as trigger key.
13 + ---@diagnostic disable-next-line: redundant-parameter
13 14 local c = vim.fn.nr2char( vim.fn.getchar( 0 ) )
14 15 if c ~= '' then
15 16 vim.api.nvim_feedkeys( trigger .. c, 'i', true )

nushell/completions/jj-completions.nu

Modified
120 120 # List bookmarks and their targets
121 121 export extern "jj bookmark list" [
122 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
123 124 --tracked(-t) # Show remote tracked bookmarks only. Omits local Git-tracking bookmarks by default
124 125 --conflicted(-c) # Show conflicted bookmarks only
125 126 ...names: string # Show bookmarks whose local name matches
225 226 --help(-h) # Print help (see more with '--help')
228 - # Print this message or the help of the given subcommand(s)
229 - export extern "jj bookmark help" [
232 - # Create a new bookmark
233 - export extern "jj bookmark help create" [
236 - # Delete an existing bookmark and propagate the deletion to remotes on the next push
237 - export extern "jj bookmark help delete" [
240 - # Forget everything about a bookmark, including its local and remote targets
241 - export extern "jj bookmark help forget" [
244 - # List bookmarks and their targets
245 - export extern "jj bookmark help list" [
248 - # Move existing bookmarks to target revision
249 - export extern "jj bookmark help move" [
252 - # Rename `old` bookmark name to `new` bookmark name
253 - export extern "jj bookmark help rename" [
256 - # Create or update a bookmark to point to a certain commit
257 - export extern "jj bookmark help set" [
260 - # Start tracking given remote bookmarks
261 - export extern "jj bookmark help track" [
264 - # Stop tracking given remote bookmarks
265 - export extern "jj bookmark help untrack" [
268 - # Print this message or the help of the given subcommand(s)
269 - export extern "jj bookmark help help" [
272 229 # Manage bookmarks
273 230 export extern "jj branch" [
274 231 --repository(-R): string # Path to repository to operate on
337 294 # List bookmarks and their targets
338 295 export extern "jj branch list" [
339 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
340 298 --tracked(-t) # Show remote tracked bookmarks only. Omits local Git-tracking bookmarks by default
341 299 --conflicted(-c) # Show conflicted bookmarks only
342 300 ...names: string # Show bookmarks whose local name matches
442 400 --help(-h) # Print help (see more with '--help')
445 - # Print this message or the help of the given subcommand(s)
446 - export extern "jj branch help" [
449 - # Create a new bookmark
450 - export extern "jj branch help create" [
453 - # Delete an existing bookmark and propagate the deletion to remotes on the next push
454 - export extern "jj branch help delete" [
457 - # Forget everything about a bookmark, including its local and remote targets
458 - export extern "jj branch help forget" [
461 - # List bookmarks and their targets
462 - export extern "jj branch help list" [
465 - # Move existing bookmarks to target revision
466 - export extern "jj branch help move" [
469 - # Rename `old` bookmark name to `new` bookmark name
470 - export extern "jj branch help rename" [
473 - # Create or update a bookmark to point to a certain commit
474 - export extern "jj branch help set" [
477 - # Start tracking given remote bookmarks
478 - export extern "jj branch help track" [
481 - # Stop tracking given remote bookmarks
482 - export extern "jj branch help untrack" [
485 - # Print this message or the help of the given subcommand(s)
486 - export extern "jj branch help help" [
489 403 # Print contents of files in a revision
490 404 export extern "jj cat" [
491 405 --revision(-r): string # The revision to get the file contents from
669 583 --help(-h) # Print help (see more with '--help')
672 - # Print this message or the help of the given subcommand(s)
673 - export extern "jj config help" [
676 - # Start an editor on a jj config file
677 - export extern "jj config help edit" [
680 - # Get the value of a given config option.
681 - export extern "jj config help get" [
684 - # List variables set in config file, along with their values
685 - export extern "jj config help list" [
688 - # Print the path to the config file
689 - export extern "jj config help path" [
692 - # Update config file to set the given option to a given value
693 - export extern "jj config help set" [
696 - # Print this message or the help of the given subcommand(s)
697 - export extern "jj config help 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')
700 604 # Low-level commands not intended for users
947 851 --help(-h) # Print help (see more with '--help')
950 - # Print this message or the help of the given subcommand(s)
951 - export extern "jj debug watchman help" [
954 - # Check whether `watchman` is enabled and whether it's correctly installed
955 - export extern "jj debug watchman help status" [
958 - export extern "jj debug watchman help query-clock" [
961 - export extern "jj debug watchman help query-changed-files" [
964 - export extern "jj debug watchman help reset-clock" [
967 - # Print this message or the help of the given subcommand(s)
968 - export extern "jj debug watchman help help" [
971 854 # Show information about the working copy state
972 855 export extern "jj debug working-copy" [
973 856 --repository(-R): string # Path to repository to operate on
983 866 --help(-h) # Print help (see more with '--help')
986 - # Print this message or the help of the given subcommand(s)
987 - export extern "jj debug help" [
990 - # Rebuild commit index
991 - export extern "jj debug help copy-detection" [
994 - # Parse fileset expression
995 - export extern "jj debug help fileset" [
998 - # Show commit index stats
999 - export extern "jj debug help index" [
1002 - # Show information about the local working copy state
1003 - export extern "jj debug help local-working-copy" [
1006 - # Show information about an operation and its view
1007 - export extern "jj debug help operation" [
1010 - # Rebuild commit index
1011 - export extern "jj debug help reindex" [
1014 - # Evaluate revset to full commit IDs
1015 - export extern "jj debug help revset" [
1018 - # Trigger a snapshot in the op log
1019 - export extern "jj debug help snapshot" [
1022 - # Parse a template
1023 - export extern "jj debug help template" [
1026 - # List the recursive entries of a tree
1027 - export extern "jj debug help tree" [
1030 - export extern "jj debug help watchman" [
1033 - # Check whether `watchman` is enabled and whether it's correctly installed
1034 - export extern "jj debug help watchman status" [
1037 - export extern "jj debug help watchman query-clock" [
1040 - export extern "jj debug help watchman query-changed-files" [
1043 - export extern "jj debug help watchman reset-clock" [
1046 - # Show information about the working copy state
1047 - export extern "jj debug help working-copy" [
1050 - # Print this message or the help of the given subcommand(s)
1051 - export extern "jj debug help help" [
1054 869 # Update the change description or other metadata
1055 870 export extern "jj describe" [
1056 871 ...revisions: string # The revision(s) whose description to edit
1087 902 --color-words # Show a word-level diff with changes indicated only by color
1088 903 --tool: string # Generate diff by external command
1089 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
1090 907 --repository(-R): string # Path to repository to operate on
1091 908 --ignore-working-copy # Don't snapshot the working copy, and don't update it
1092 909 --ignore-immutable # Allow rewriting immutable commits
1170 987 --color-words # Show a word-level diff with changes indicated only by color
1171 988 --tool: string # Generate diff by external command
1172 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
1173 992 --repository(-R): string # Path to repository to operate on
1174 993 --ignore-working-copy # Don't snapshot the working copy, and don't update it
1175 994 --ignore-immutable # Allow rewriting immutable commits
1198 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')
1201 1037 def "nu-complete jj file chmod mode" [] {
1202 1038 [ "n" "x" ]
1286 1122 --help(-h) # Print help (see more with '--help')
1289 - # Print this message or the help of the given subcommand(s)
1290 - export extern "jj file help" [
1293 - # Sets or removes the executable bit for paths in the repo
1294 - export extern "jj file help chmod" [
1297 - # List files in a revision
1298 - export extern "jj file help list" [
1301 - # Print contents of files in a revision
1302 - export extern "jj file help show" [
1305 - # Start tracking specified paths in the working copy
1306 - export extern "jj file help track" [
1309 - # Stop tracking specified paths in the working copy
1310 - export extern "jj file help untrack" [
1313 - # Print this message or the help of the given subcommand(s)
1314 - export extern "jj file help help" [
1317 1125 # List files in a revision (DEPRECATED use `jj file list`)
1318 1126 export extern "jj files" [
1319 1127 --revision(-r): string # The revision to list files in
1370 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
1371 1179 --remote: string # Name of the newly created remote
1372 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
1373 1182 --repository(-R): string # Path to repository to operate on
1374 1183 --ignore-working-copy # Don't snapshot the working copy, and don't update it
1375 1184 --ignore-immutable # Allow rewriting immutable commits
1571 1380 --help(-h) # Print help (see more with '--help')
1574 - # Print this message or the help of the given subcommand(s)
1575 - export extern "jj git remote help" [
1578 - # Add a Git remote
1579 - export extern "jj git remote help add" [
1582 - # List Git remotes
1583 - export extern "jj git remote help list" [
1586 - # Remove a Git remote and forget its bookmarks
1587 - export extern "jj git remote help remove" [
1590 - # Rename a Git remote
1591 - export extern "jj git remote help rename" [
1594 - # Set the URL of a Git remote
1595 - export extern "jj git remote help set-url" [
1598 - # Print this message or the help of the given subcommand(s)
1599 - export extern "jj git remote help help" [
1602 1383 # FOR INTERNAL USE ONLY Interact with git submodules
1603 1384 export extern "jj git submodule" [
1604 1385 --repository(-R): string # Path to repository to operate on
1630 1411 --help(-h) # Print help (see more with '--help')
1633 - # Print this message or the help of the given subcommand(s)
1634 - export extern "jj git submodule help" [
1637 - # Print the relevant contents from .gitmodules. For debugging purposes only
1638 - export extern "jj git submodule help print-gitmodules" [
1414 + def "nu-complete jj help keyword" [] {
1415 + [ "revsets" "tutorial" ]
1641 1418 # Print this message or the help of the given subcommand(s)
1642 - export extern "jj git submodule help help" [
1645 - # Print this message or the help of the given subcommand(s)
1646 - export extern "jj git help" [
1649 - # Create a new repo backed by a clone of a Git repo
1650 - export extern "jj git help clone" [
1653 - # Update the underlying Git repo with changes made in the repo
1654 - export extern "jj git help export" [
1657 - # Fetch from a Git remote
1658 - export extern "jj git help fetch" [
1661 - # Update repo with changes made in the underlying Git repo
1662 - export extern "jj git help import" [
1665 - # Create a new Git backed repo
1666 - export extern "jj git help init" [
1669 - # Push to a Git remote
1670 - export extern "jj git help push" [
1673 - # Manage Git remotes
1674 - export extern "jj git help remote" [
1677 - # Add a Git remote
1678 - export extern "jj git help remote add" [
1681 - # List Git remotes
1682 - export extern "jj git help remote list" [
1685 - # Remove a Git remote and forget its bookmarks
1686 - export extern "jj git help remote remove" [
1689 - # Rename a Git remote
1690 - export extern "jj git help remote rename" [
1693 - # Set the URL of a Git remote
1694 - export extern "jj git help remote set-url" [
1697 - # FOR INTERNAL USE ONLY Interact with git submodules
1698 - export extern "jj git help submodule" [
1701 - # Print the relevant contents from .gitmodules. For debugging purposes only
1702 - export extern "jj git help submodule print-gitmodules" [
1705 - # Print this message or the help of the given subcommand(s)
1706 - export extern "jj git help help" [
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')
1709 1435 # Create a new repo in the given directory
1737 1463 --color-words # Show a word-level diff with changes indicated only by color
1738 1464 --tool: string # Generate diff by external command
1739 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
1740 1468 --repository(-R): string # Path to repository to operate on
1741 1469 --ignore-working-copy # Don't snapshot the working copy, and don't update it
1742 1470 --ignore-immutable # Allow rewriting immutable commits
1768 1496 --color-words # Show a word-level diff with changes indicated only by color
1769 1497 --tool: string # Generate diff by external command
1770 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
1771 1501 --repository(-R): string # Path to repository to operate on
1772 1502 --ignore-working-copy # Don't snapshot the working copy, and don't update it
1773 1503 --ignore-immutable # Allow rewriting immutable commits
1784 1514 # Merge work from multiple bookmarks (DEPRECATED, use `jj new`)
1785 1515 export extern "jj merge" [
1786 1516 ...revisions: string # Parent(s) of the new change
1787 - -r # Ignored (but lets you pass `-r` for consistency with other commands)
1517 + -d # Ignored (but lets you pass `-d`/`-r` for consistency with other commands)
1788 1518 --message(-m): string # The change description to use
1789 1519 --no-edit # Do not edit the newly created change
1790 1520 --edit # No-op flag to pair with --no-edit
1828 1558 # Create a new, empty change and (by default) edit it in the working copy
1829 1559 export extern "jj new" [
1830 1560 ...revisions: string # Parent(s) of the new change
1831 - -r # Ignored (but lets you pass `-r` for consistency with other commands)
1561 + -d # Ignored (but lets you pass `-d`/`-r` for consistency with other commands)
1832 1562 --message(-m): string # The change description to use
1833 1563 --no-edit # Do not edit the newly created change
1834 1564 --edit # No-op flag to pair with --no-edit
1915 1645 --color-words # Show a word-level diff with changes indicated only by color
1916 1646 --tool: string # Generate diff by external command
1917 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
1918 1650 --repository(-R): string # Path to repository to operate on
1919 1651 --ignore-working-copy # Don't snapshot the working copy, and don't update it
1920 1652 --ignore-immutable # Allow rewriting immutable commits
1944 1676 --color-words # Show a word-level diff with changes indicated only by color
1945 1677 --tool: string # Generate diff by external command
1946 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
1947 1681 --repository(-R): string # Path to repository to operate on
1948 1682 --ignore-working-copy # Don't snapshot the working copy, and don't update it
1949 1683 --ignore-immutable # Allow rewriting immutable commits
1991 1725 --color-words # Show a word-level diff with changes indicated only by color
1992 1726 --tool: string # Generate diff by external command
1993 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
1994 1730 --repository(-R): string # Path to repository to operate on
1995 1731 --ignore-working-copy # Don't snapshot the working copy, and don't update it
1996 1732 --ignore-immutable # Allow rewriting immutable commits
2025 1761 --help(-h) # Print help (see more with '--help')
2028 - # Print this message or the help of the given subcommand(s)
2029 - export extern "jj operation help" [
2032 - # Abandon operation history
2033 - export extern "jj operation help abandon" [
2036 - # Compare changes to the repository between two operations
2037 - export extern "jj operation help diff" [
2040 - # Show the operation log
2041 - export extern "jj operation help log" [
2044 - # Create a new operation that restores the repo to an earlier state
2045 - export extern "jj operation help restore" [
2048 - # Show changes to the repository in an operation
2049 - export extern "jj operation help show" [
2052 - # Create a new operation that undoes an earlier operation
2053 - export extern "jj operation help undo" [
2056 - # Print this message or the help of the given subcommand(s)
2057 - export extern "jj operation help help" [
2060 1764 # Parallelize revisions by making them siblings
2061 1765 export extern "jj parallelize" [
2062 1766 ...revisions: string # Revisions to parallelize
2220 1924 --color-words # Show a word-level diff with changes indicated only by color
2221 1925 --tool: string # Generate diff by external command
2222 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)
2223 1946 --repository(-R): string # Path to repository to operate on
2224 1947 --ignore-working-copy # Don't snapshot the working copy, and don't update it
2225 1948 --ignore-immutable # Allow rewriting immutable commits
2311 2034 --help(-h) # Print help (see more with '--help')
2314 - # Print this message or the help of the given subcommand(s)
2315 - export extern "jj sparse help" [
2318 - # Start an editor to update the patterns that are present in the working copy
2319 - export extern "jj sparse help edit" [
2322 - # List the patterns that are currently present in the working copy
2323 - export extern "jj sparse help list" [
2326 - # Reset the patterns to include all files in the working copy
2327 - export extern "jj sparse help reset" [
2330 - # Update the patterns that are present in the working copy
2331 - export extern "jj sparse help set" [
2334 - # Print this message or the help of the given subcommand(s)
2335 - export extern "jj sparse help help" [
2338 2037 # Split a revision in two
2339 2038 export extern "jj split" [
2340 2039 --interactive(-i) # Interactively choose which parts to split. This is the default if no paths are provided
2358 2057 # Move changes from a revision into another revision
2359 2058 export extern "jj squash" [
2360 2059 --revision(-r): string # Revision to squash into its parent (default: @)
2361 - --from: string # Revision(s) to squash from (default: @)
2362 - --into: string # Revision to squash into (default: @)
2060 + --from(-f): string # Revision(s) to squash from (default: @)
2061 + --into(-t): string # Revision to squash into (default: @)
2363 2062 --to: string # Revision to squash into (default: @)
2364 2063 --message(-m): string # The description to use for squashed revision (don't open editor)
2365 2064 --use-destination-message(-u) # Use the description of the destination revision and discard the description(s) of the source revision(s)
2428 2127 --help(-h) # Print help (see more with '--help')
2431 - # Print this message or the help of the given subcommand(s)
2432 - export extern "jj tag help" [
2435 - # List tags
2436 - export extern "jj tag help list" [
2439 - # Print this message or the help of the given subcommand(s)
2440 - export extern "jj tag help help" [
2443 2130 # Infrequently used commands such as for generating shell completions
2444 2131 export extern "jj util" [
2445 2132 --repository(-R): string # Path to repository to operate on
2478 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')
2481 2183 # Run backend-dependent garbage collection
2482 2184 export extern "jj util gc" [
2483 2185 --expire: string # Time threshold
2524 2226 --help(-h) # Print help (see more with '--help')
2527 - # Print the JSON schema for the jj TOML config format
2528 - export extern "jj util config-schema" [
2529 - --repository(-R): string # Path to repository to operate on
2530 - --ignore-working-copy # Don't snapshot the working copy, and don't update it
2531 - --ignore-immutable # Allow rewriting immutable commits
2532 - --at-operation: string # Operation to load the repo at
2533 - --at-op: string # Operation to load the repo at
2534 - --debug # Enable debug logging
2535 - --color: string # When to colorize output (always, never, debug, auto)
2536 - --quiet # Silence non-primary command output
2537 - --no-pager # Disable the pager
2538 - --config-toml: string # Additional configuration options (can be repeated)
2539 - --help(-h) # Print help (see more with '--help')
2542 - # Print this message or the help of the given subcommand(s)
2543 - export extern "jj util help" [
2546 - # Print a command-line-completion script
2547 - export extern "jj util help completion" [
2550 - # Run backend-dependent garbage collection
2551 - export extern "jj util help gc" [
2554 - # Print a ROFF (manpage)
2555 - export extern "jj util help mangen" [
2558 - # Print the CLI help for all subcommands in Markdown
2559 - export extern "jj util help markdown-help" [
2562 - # Print the JSON schema for the jj TOML config format
2563 - export extern "jj util help config-schema" [
2566 - # Print this message or the help of the given subcommand(s)
2567 - export extern "jj util help help" [
2570 2229 def "nu-complete jj undo what" [] {
2571 2230 [ "repo" "remote-tracking" ]
2752 2411 --help(-h) # Print help (see more with '--help')
2755 - # Print this message or the help of the given subcommand(s)
2756 - export extern "jj workspace help" [
2759 - # Add a workspace
2760 - export extern "jj workspace help add" [
2763 - # Stop tracking a workspace's working-copy commit in the repo
2764 - export extern "jj workspace help forget" [
2767 - # List workspaces
2768 - export extern "jj workspace help list" [
2771 - # Renames the current workspace
2772 - export extern "jj workspace help rename" [
2775 - # Show the current workspace root directory
2776 - export extern "jj workspace help root" [
2779 - # Update a workspace that has become stale
2780 - export extern "jj workspace help update-stale" [
2783 - # Print this message or the help of the given subcommand(s)
2784 - export extern "jj workspace help help" [
2787 - # Print this message or the help of the given subcommand(s)
2788 - export extern "jj help" [
2791 - # Abandon a revision
2792 - export extern "jj help abandon" [
2795 - # Apply the reverse of a revision on top of another revision
2796 - export extern "jj help backout" [
2799 - # Manage bookmarks
2800 - export extern "jj help bookmark" [
2803 - # Create a new bookmark
2804 - export extern "jj help bookmark create" [
2807 - # Delete an existing bookmark and propagate the deletion to remotes on the next push
2808 - export extern "jj help bookmark delete" [
2811 - # Forget everything about a bookmark, including its local and remote targets
2812 - export extern "jj help bookmark forget" [
2815 - # List bookmarks and their targets
2816 - export extern "jj help bookmark list" [
2819 - # Move existing bookmarks to target revision
2820 - export extern "jj help bookmark move" [
2823 - # Rename `old` bookmark name to `new` bookmark name
2824 - export extern "jj help bookmark rename" [
2827 - # Create or update a bookmark to point to a certain commit
2828 - export extern "jj help bookmark set" [
2831 - # Start tracking given remote bookmarks
2832 - export extern "jj help bookmark track" [
2835 - # Stop tracking given remote bookmarks
2836 - export extern "jj help bookmark untrack" [
2839 - # Manage bookmarks
2840 - export extern "jj help branch" [
2843 - # Create a new bookmark
2844 - export extern "jj help branch create" [
2847 - # Delete an existing bookmark and propagate the deletion to remotes on the next push
2848 - export extern "jj help branch delete" [
2851 - # Forget everything about a bookmark, including its local and remote targets
2852 - export extern "jj help branch forget" [
2855 - # List bookmarks and their targets
2856 - export extern "jj help branch list" [
2859 - # Move existing bookmarks to target revision
2860 - export extern "jj help branch move" [
2863 - # Rename `old` bookmark name to `new` bookmark name
2864 - export extern "jj help branch rename" [
2867 - # Create or update a bookmark to point to a certain commit
2868 - export extern "jj help branch set" [
2871 - # Start tracking given remote bookmarks
2872 - export extern "jj help branch track" [
2875 - # Stop tracking given remote bookmarks
2876 - export extern "jj help branch untrack" [
2879 - # Print contents of files in a revision
2880 - export extern "jj help cat" [
2883 - # Create a new, empty change and edit it in the working copy (DEPRECATED, use `jj new`)
2884 - export extern "jj help checkout" [
2887 - # Sets or removes the executable bit for paths in the repo
2888 - export extern "jj help chmod" [
2891 - # Update the description and create a new change on top
2892 - export extern "jj help commit" [
2895 - # Manage config options
2896 - export extern "jj help config" [
2899 - # Start an editor on a jj config file
2900 - export extern "jj help config edit" [
2903 - # Get the value of a given config option.
2904 - export extern "jj help config get" [
2907 - # List variables set in config file, along with their values
2908 - export extern "jj help config list" [
2911 - # Print the path to the config file
2912 - export extern "jj help config path" [
2915 - # Update config file to set the given option to a given value
2916 - export extern "jj help config set" [
2919 - # Low-level commands not intended for users
2920 - export extern "jj help debug" [
2923 - # Rebuild commit index
2924 - export extern "jj help debug copy-detection" [
2927 - # Parse fileset expression
2928 - export extern "jj help debug fileset" [
2931 - # Show commit index stats
2932 - export extern "jj help debug index" [
2935 - # Show information about the local working copy state
2936 - export extern "jj help debug local-working-copy" [
2939 - # Show information about an operation and its view
2940 - export extern "jj help debug operation" [
2943 - # Rebuild commit index
2944 - export extern "jj help debug reindex" [
2947 - # Evaluate revset to full commit IDs
2948 - export extern "jj help debug revset" [
2951 - # Trigger a snapshot in the op log
2952 - export extern "jj help debug snapshot" [
2955 - # Parse a template
2956 - export extern "jj help debug template" [
2959 - # List the recursive entries of a tree
2960 - export extern "jj help debug tree" [
2963 - export extern "jj help debug watchman" [
2966 - # Check whether `watchman` is enabled and whether it's correctly installed
2967 - export extern "jj help debug watchman status" [
2970 - export extern "jj help debug watchman query-clock" [
2973 - export extern "jj help debug watchman query-changed-files" [
2976 - export extern "jj help debug watchman reset-clock" [
2979 - # Show information about the working copy state
2980 - export extern "jj help debug working-copy" [
2983 - # Update the change description or other metadata
2984 - export extern "jj help describe" [
2987 - # Compare file contents between two revisions
2988 - export extern "jj help diff" [
2991 - # Touch up the content changes in a revision with a diff editor
2992 - export extern "jj help diffedit" [
2995 - # Create a new change with the same content as an existing one
2996 - export extern "jj help duplicate" [
2999 - # Sets the specified revision as the working-copy revision
3000 - export extern "jj help edit" [
3003 - # Show how a change has evolved over time
3004 - export extern "jj help evolog" [
3007 - # File operations
3008 - export extern "jj help file" [
3011 - # Sets or removes the executable bit for paths in the repo
3012 - export extern "jj help file chmod" [
3015 - # List files in a revision
3016 - export extern "jj help file list" [
3019 - # Print contents of files in a revision
3020 - export extern "jj help file show" [
3023 - # Start tracking specified paths in the working copy
3024 - export extern "jj help file track" [
3027 - # Stop tracking specified paths in the working copy
3028 - export extern "jj help file untrack" [
3031 - # List files in a revision (DEPRECATED use `jj file list`)
3032 - export extern "jj help files" [
3035 - # Update files with formatting fixes or other changes
3036 - export extern "jj help fix" [
3039 - # Commands for working with Git remotes and the underlying Git repo
3040 - export extern "jj help git" [
3043 - # Create a new repo backed by a clone of a Git repo
3044 - export extern "jj help git clone" [
3047 - # Update the underlying Git repo with changes made in the repo
3048 - export extern "jj help git export" [
3051 - # Fetch from a Git remote
3052 - export extern "jj help git fetch" [
3055 - # Update repo with changes made in the underlying Git repo
3056 - export extern "jj help git import" [
3059 - # Create a new Git backed repo
3060 - export extern "jj help git init" [
3063 - # Push to a Git remote
3064 - export extern "jj help git push" [
3067 - # Manage Git remotes
3068 - export extern "jj help git remote" [
3071 - # Add a Git remote
3072 - export extern "jj help git remote add" [
3075 - # List Git remotes
3076 - export extern "jj help git remote list" [
3079 - # Remove a Git remote and forget its bookmarks
3080 - export extern "jj help git remote remove" [
3083 - # Rename a Git remote
3084 - export extern "jj help git remote rename" [
3087 - # Set the URL of a Git remote
3088 - export extern "jj help git remote set-url" [
3091 - # FOR INTERNAL USE ONLY Interact with git submodules
3092 - export extern "jj help git submodule" [
3095 - # Print the relevant contents from .gitmodules. For debugging purposes only
3096 - export extern "jj help git submodule print-gitmodules" [
3099 - # Create a new repo in the given directory
3100 - export extern "jj help init" [
3103 - # Compare the changes of two commits
3104 - export extern "jj help interdiff" [
3107 - # Show revision history
3108 - export extern "jj help log" [
3111 - # Merge work from multiple bookmarks (DEPRECATED, use `jj new`)
3112 - export extern "jj help merge" [
3115 - # Move changes from one revision into another (DEPRECATED, use `jj squash`)
3116 - export extern "jj help move" [
3119 - # Create a new, empty change and (by default) edit it in the working copy
3120 - export extern "jj help new" [
3123 - # Move the working-copy commit to the child revision
3124 - export extern "jj help next" [
3127 - # Commands for working with the operation log
3128 - export extern "jj help operation" [
3131 - # Abandon operation history
3132 - export extern "jj help operation abandon" [
3135 - # Compare changes to the repository between two operations
3136 - export extern "jj help operation diff" [
3139 - # Show the operation log
3140 - export extern "jj help operation log" [
3143 - # Create a new operation that restores the repo to an earlier state
3144 - export extern "jj help operation restore" [
3147 - # Show changes to the repository in an operation
3148 - export extern "jj help operation show" [
3151 - # Create a new operation that undoes an earlier operation
3152 - export extern "jj help operation undo" [
3155 - # Parallelize revisions by making them siblings
3156 - export extern "jj help parallelize" [
3159 - # Change the working copy revision relative to the parent revision
3160 - export extern "jj help prev" [
3163 - # Move revisions to different parent(s)
3164 - export extern "jj help rebase" [
3167 - # Resolve a conflicted file with an external merge tool
3168 - export extern "jj help resolve" [
3171 - # Restore paths from another revision
3172 - export extern "jj help restore" [
3175 - # A dummy command that accepts any arguments
3176 - export extern "jj help revert" [
3179 - # Show the current workspace root directory
3180 - export extern "jj help root" [
3183 - # (**Stub**, does not work yet) Run a command across a set of revisions.
3184 - export extern "jj help run" [
3187 - # Show commit description and changes in a revision
3188 - export extern "jj help show" [
3191 - # Manage which paths from the working-copy commit are present in the working copy
3192 - export extern "jj help sparse" [
3195 - # Start an editor to update the patterns that are present in the working copy
3196 - export extern "jj help sparse edit" [
3199 - # List the patterns that are currently present in the working copy
3200 - export extern "jj help sparse list" [
3203 - # Reset the patterns to include all files in the working copy
3204 - export extern "jj help sparse reset" [
3207 - # Update the patterns that are present in the working copy
3208 - export extern "jj help sparse set" [
3211 - # Split a revision in two
3212 - export extern "jj help split" [
3215 - # Move changes from a revision into another revision
3216 - export extern "jj help squash" [
3219 - # Show high-level repo status
3220 - export extern "jj help status" [
3223 - # Manage tags
3224 - export extern "jj help tag" [
3227 - # List tags
3228 - export extern "jj help tag list" [
3231 - # Infrequently used commands such as for generating shell completions
3232 - export extern "jj help util" [
3235 - # Print a command-line-completion script
3236 - export extern "jj help util completion" [
3239 - # Run backend-dependent garbage collection
3240 - export extern "jj help util gc" [
3243 - # Print a ROFF (manpage)
3244 - export extern "jj help util mangen" [
3247 - # Print the CLI help for all subcommands in Markdown
3248 - export extern "jj help util markdown-help" [
3251 - # Print the JSON schema for the jj TOML config format
3252 - export extern "jj help util config-schema" [
3255 - # Undo an operation (shortcut for `jj op undo`)
3256 - export extern "jj help undo" [
3259 - # Move changes from a revision's parent into the revision
3260 - export extern "jj help unsquash" [
3263 - # Stop tracking specified paths in the working copy
3264 - export extern "jj help untrack" [
3267 - # Display version information
3268 - export extern "jj help version" [
3271 - # Commands for working with workspaces
3272 - export extern "jj help workspace" [
3275 - # Add a workspace
3276 - export extern "jj help workspace add" [
3279 - # Stop tracking a workspace's working-copy commit in the repo
3280 - export extern "jj help workspace forget" [
3283 - # List workspaces
3284 - export extern "jj help workspace list" [
3287 - # Renames the current workspace
3288 - export extern "jj help workspace rename" [
3291 - # Show the current workspace root directory
3292 - export extern "jj help workspace root" [
3295 - # Update a workspace that has become stale
3296 - export extern "jj help workspace update-stale" [
3299 - # Print this message or the help of the given subcommand(s)
3300 - export extern "jj help help" [
3305 2416 export use completions *

nushell/gen-aliases.nu

Modified
29 29 # pro aliases
30 30 aka ll ls '--long'
31 31 aka la ls '--long' '--all'
32 +aka ll lsd '--long' '--group-directories-first' '--classify' '--git'
33 +aka la lsd '--long' '--almost-all' '--group-directories-first' '--classify' '--git'
32 34 aka q exit
33 35 aka g git
34 36 aka gu gitu

nushell/login.nu

Modified
13 13 use fedora_bootstrip.nu
14 14 use notes.nu
16 -use svn-completions.nu *
17 16 source ($nu.default-config-dir | path join 'completions' | path join 'jj-completions.nu')
18 17 source ($nu.default-config-dir | path join 'completions' | path join 'pueue-completions.nu')
25 24 source ($nu.default-config-dir | path join "zoxide.nu")
26 25 source ($nu.default-config-dir | path join "carapace.nu")
27 +# neovim configs
28 +def mini [...rest] { NVIM_APPNAME=mini-nvim nvim ...$rest }
29 +def rvim [...rest] { NVIM_APPNAME=rocks-nvim nvim ...$rest }
29 31 todo commands
30 32 print (char nl)

nushell/scripts/sy.nu

Modified
38 38 export def down [] {
39 39 check-deps
41 - let git_pull_notes = [ '-C' $env.NOTES pull '-ff' ]
42 - let git_pull_dotfiles = [ '-C' $env.DOTFILES pull '-ff' ]
41 + let git_pull_notes = [ '-C' $env.NOTES pull '-ff' '--rebase' ]
42 + let git_pull_dotfiles = [ '-C' $env.DOTFILES pull '-ff' '--rebase' ]
44 44 # print git $git_pull_notes
45 45 run-external git ...$git_pull_notes

starship/starship.toml

Modified
1 +# Get editor completions based on the config schema
2 +"$schema" = 'https://starship.rs/config-schema.json'
1 4 [character]
2 5 success_symbol = ' (dimmed green)'
3 6 # does not work yet in nushell

subversion/config

Modified
36 36 ### The rest of the [auth] section in this file has been deprecated.
37 37 ### Both 'store-passwords' and 'store-auth-creds' can now be
38 38 ### specified in the 'servers' file in your config directory
39 -### and are documented there. Anything specified in this section
39 +### and are documented there. Anything specified in this section
40 40 ### is overridden by settings specified in the 'servers' file.
41 41 # store-passwords = no
42 42 # store-auth-creds = no
45 45 [helpers]
46 46 ### Set editor-cmd to the command used to invoke your text editor.
47 47 ### This will override the environment variables that Subversion
48 -### examines by default to find this information ($EDITOR,
48 +### examines by default to find this information ($EDITOR,
49 49 ### et al).
50 50 editor-cmd = nvim
51 51 ### Set diff-cmd to the absolute path of your 'diff' program.
59 59 ### Set diff3-cmd to the absolute path of your 'diff3' program.
60 60 ### This will override the compile-time default, which is to use
61 61 ### Subversion's internal diff3 implementation.
62 -diff3-cmd = svn.diff3
62 +#diff3-cmd = svn.diff3
63 63 ### Set diff3-has-program-arg to 'yes' if your 'diff3' program
64 64 ### accepts the '--diff-program' option.
65 65 # diff3-has-program-arg = no
103 103 # global-ignores = *.o *.lo *.la *.al .libs *.so *.so.[0-9]* *.a *.pyc *.pyo __pycache__
104 104 # *.rej *~ #*# .#* .*.swp .DS_Store [Tt]humbs.db
105 105 ### Set log-encoding to the default encoding for log messages
106 -# log-encoding = latin1
106 +log-encoding = utf-8
107 107 ### Set use-commit-times to make checkout/update/switch/revert
108 108 ### put last-committed timestamps on every file touched.
109 109 # use-commit-times = yes

subversion/diff

Modified
1 -#!/usr/bin/java --source 17 -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xms32m -Xmx32m -XX:+AlwaysPreTouch -Xshare:on
1 +#!/usr/bin/java --source 23 -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xms32m -Xmx32m -XX:+AlwaysPreTouch -Xshare:on
3 3 import static java.lang.System.* ;
4 4 import java.util.*;

subversion/diff.cmd

Added
new file mode 100644
1 +@echo off
2 +java --source 23 -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xms32m -Xmx32m -XX:+AlwaysPreTouch -Xshare:on %~dp0\diff %*

subversion/merge

Modified
1 -#!/usr/bin/java --source 17
1 +#!/usr/bin/java --source 23 -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xms32m -Xmx32m -XX:+AlwaysPreTouch -Xshare:on
3 3 import static java.lang.System.* ;
4 4 import java.util.*;
15 15 var merged_file = command_line_arguments[3];
16 16 var wcpath_file = command_line_arguments[4];
18 - //TODO: use neovide, once my WSL can du GUI
18 + //TODO: use neovide
19 19 var code = call("nvim", "-d", wcpath_file, merged_file, theirs_file );
20 20 throw exit(code);

subversion/merge.cmd

Added
new file mode 100644
1 +@echo off
2 +java --source 23 -XX:+UnlockExperimentalVMOptions -XX:+UseEpsilonGC -Xms32m -Xmx32m -XX:+AlwaysPreTouch -Xshare:on %~dp0\merge %*

topgrade/lnx.toml

Added
new file mode 100644
1 +[git]
2 +repos = [
3 + "/home/oli/Source/*",
4 +]
5 +arguments = "--ff --rebase"
6 +max_concurrency = 12
7 +pull_predefined = false

topgrade/topgrade.toml

Modified
2 2 [misc]
3 3 disable = ["vim"]
4 4 assume_yes = true
5 5 no_retry = true
6 -set_title = true
7 -display_time = true
8 6 cleanup = true
7 +no_self_update = true
10 9 [containers]
11 10 runtime = "podman"
13 -[composer]
14 -self_update = false
12 +[commands]
13 +"TLDR" = "tldr --update"
16 -[git]
17 -repos = [
18 - "/home/oli/Source/*",
19 -]
20 -arguments = "--ff --rebase"
21 -max_concurrency = 12
22 -pull_predefined = false

topgrade/win32.toml

Added
new file mode 100644
1 +[misc]
2 +sudo_command = "gsudo"
4 +[pre_commands]
5 +"Enable Script Execution" = 'gsudo powershell -Command "Set-ExecutionPolicy RemoteSigned"'
6 +"Enable Developer Mode" = 'gsudo powershell -File "X:\Enable Developer Mode.ps1"'
7 +"Setup Drives" = 'gsudo cmd /k "X:\Setup Drives.reg"'
8 +"Disable Caps Lock" = 'gsudo cmd /k "X:\Disable Caps Lock.reg"'
9 +"Register CMD Aliases" = 'gsudo cmd /k "X:\Register CMD Aliases.reg"'
10 +"Enable Long Paths" = 'gsudo cmd /k "X:\Enable Long Paths.reg"'
11 +"Winget Export" = 'winget export --source winget --nowarn --output X:\winget_installed_apps.json'
13 +[post_commands]
15 +[commands]
17 +[windows]
18 + accept_all_updates = true
19 +open_remotes_in_new_terminal = true
20 +wsl_update_pre_release = true
21 +wsl_update_use_web_download = true
22 +enable_winget = true

unison/common

Modified
1 1 auto = true
2 2 maxthreads = 16
3 +copyonconflict = true
4 +prefer = newer

unison/graphical

Modified
1 1 color = true
2 2 diff = delta CURRENT1 CURRENT2
3 -merge = Name {*,.*} -> neovide --maximized CURRENT1 CURRENT2 NEW

unison/ignores

Modified
12 12 ignore = Regex .*/.zig/.*
13 13 ignore = Regex .*/.svn/.*
14 14 ignore = Regex .*/.git/.*
15 +ignore = Regex .*/.jj/.*
15 16 ignore = Regex .*/target/.*
16 17 ignore = Regex .*/build/.*
17 18 ignore = Regex .*/zig-cache/.*

unison/service

Modified
1 -copyonconflict = true
2 1 repeat = watch
3 2 watch = true
4 -prefer = newer

unison/sync

Modified
1 1 path = Notes
2 2 path = Workspace
3 +path = .ssh
4 5 ignorenot = Path Workspace/dotfiles/unison/fedora.prf
5 6 ignorenot = Path Workspace/dotfiles/unison/ignores

wezterm/bugabinga/code_fonts.csv

Modified
33 33 1,GohuFont
34 34 1,Hack
35 35 1,Hasklig
36 -11,Hermit
36 +20,Hermit
37 37 11,IBM Plex Mono
38 38 1,Inconsolata
39 39 1,Inconsolata LGC
50 50 1,Liberation Mono
51 51 1,Lilex
52 52 1,Linux Libertine Mono
53 -1,Luculent
53 +3,Luculent
54 54 3,Luxi Mono
55 55 1,M+ 1m
56 56 54,M+ 1mn

wezterm/bugabinga/launch.lua

Modified
2 2 local wez = require 'wezterm'
4 4 return function ( cfg )
5 5 cfg.launch_menu = {
6 + {
7 + label = 'Editor',
8 + args = { 'nvim', },
9 + cwd = wez.home_dir,
10 + },
7 12 label = 'E-Mail',
8 13 args = { 'aerc', },

wezterm/bugabinga/options.lua

Modified
6 6 saturation = 0.42,
7 7 brightness = 0.69,
9 - cfg.default_cursor_style = 'SteadyBlock'
10 9 cfg.check_for_updates = false
11 10 cfg.audible_bell = 'Disabled'
12 11 cfg.visual_bell = {
14 13 fade_out_duration_ms = 69,
15 14 target = 'CursorColor',
17 - cfg.cursor_blink_rate = 0
18 16 cfg.front_end = 'WebGpu'
19 17 cfg.max_fps = 144
20 18 cfg.unzoom_on_switch_pane = true
24 22 name = 'unix',
25 23 no_serve_automatically = true, -- managed via systemd
26 - -- multiplexing = "WezTerm",
27 - local_echo_threshold_ms = 10,
26 + cfg.default_domain = 'unix'

wezterm/bugabinga/window.lua

Modified
1 1 return function ( cfg )
2 - cfg.window_decorations = 'RESIZE'
2 + cfg.window_background_opacity = 0.88
3 + cfg.window_decorations = 'NONE'
3 4 cfg.enable_wayland = true
4 5 cfg.use_resize_increments = true
5 6 cfg.window_padding = {

wezterm/wezterm.lua

Modified
9 9 require 'bugabinga.window' ( cfg )
10 10 require 'bugabinga.startup' ( cfg )
11 11 require 'bugabinga.status' ( cfg )
12 --- require 'bugabinga.titles' ( cfg )
12 +require 'bugabinga.titles' ( cfg )
13 13 require 'bugabinga.launch' ( cfg )
14 14 require 'bugabinga.neovim_zen_mode' (cfg)
15 15 require 'bugabinga.hosts' ( cfg )

x230.symlinks

Modified
4 4 git/gitconfig
5 5 ~/.config/git/config
7 7 git/gitconfig.bugabinga
8 8 ~/.config/git/.gitconfig.include
10 +gh
11 +~/.config/gh
10 13 cargo/config.toml
11 14 ~/.cargo/config.toml
43 46 neovim
44 47 ~/.config/nvim
49 +mini-nvim
50 +~/.config/mini-nvim
52 +subversion/config
53 +~/.subversion/config
55 +subversion/diff
56 +~/.subversion/diff
58 +subversion/merge
59 +~/.subversion/merge
46 61 neovide
47 62 ~/.config/neovide
67 82 zed/settings.json
68 83 ~/.config/zed/settings.json
70 -unison
71 -~/.unison
85 +unison/common
86 +~/.unison/common
88 +unison/fedora.prf
89 +~/.unison/fedora.prf
91 +unison/graphical
92 +~/.unison/graphical
94 +unison/ignores
95 +~/.unison/ignores
97 +unison/service
98 +~/.unison/service
100 +unison/sync
101 +~/.unison/sync
73 103 unison/unison@.service
74 104 ~/.config/systemd/user/unison@.service
89 119 ~/.config/yazi

yazi/plugins/diff.yazi/DO_NOT_MODIFY_ANYTHING_IN_THIS_DIRECTORY

Deleted
deleted file mode 100644

No text changes.

yazi/plugins/diff.yazi/LICENSE

Deleted
deleted file mode 100644
1 -MIT License
3 -Copyright (c) 2023 yazi-rs
5 -Permission is hereby granted, free of charge, to any person obtaining a copy
6 -of this software and associated documentation files (the "Software"), to deal
7 -in the Software without restriction, including without limitation the rights
8 -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 -copies of the Software, and to permit persons to whom the Software is
10 -furnished to do so, subject to the following conditions:
12 -The above copyright notice and this permission notice shall be included in all
13 -copies or substantial portions of the Software.
15 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 -SOFTWARE.

yazi/plugins/diff.yazi/README.md

Deleted
deleted file mode 100644
1 -# diff.yazi
3 -Diff the selected file with the hovered file, create a living patch, and copy it to the clipboard.
5 -https://github.com/yazi-rs/plugins/assets/17523360/eff5e949-386a-44ea-82f9-4cb4a2c37aad
7 -## Installation
9 -```sh
10 -ya pack -a yazi-rs/plugins:diff
11 -```
13 -## Usage
15 -Add this to your `~/.config/yazi/keymap.toml`:
17 -```toml
18 -[[manager.prepend_keymap]]
19 -on = "<C-d>"
20 -run = "plugin diff"
21 -desc = "Diff the selected with the hovered file"
22 -```
24 -Make sure the <kbd>C</kbd> + <kbd>d</kbd> key is not used elsewhere.

yazi/plugins/diff.yazi/init.lua

Deleted
deleted file mode 100644
1 -local function info(content)
2 - return ya.notify {
3 - title = "Diff",
4 - content = content,
5 - timeout = 5,
6 - }
7 -end
9 -local selected_url = ya.sync(function()
10 - for _, u in pairs(cx.active.selected) do
11 - return u
12 - end
13 -end)
15 -local hovered_url = ya.sync(function()
16 - local h = cx.active.current.hovered
17 - return h and h.url
18 -end)
20 -return {
21 - entry = function()
22 - local a, b = selected_url(), hovered_url()
23 - if not a then
24 - return info("No file selected")
25 - elseif not b then
26 - return info("No file hovered")
27 - end
29 - local output, err = Command("diff"):arg("-Naur"):arg(tostring(a)):arg(tostring(b)):output()
30 - if not output then
31 - return info("Failed to run diff, error: " .. err)
32 - end
34 - ya.clipboard(output.stdout)
35 - info("Diff copied to clipboard")
36 - end,
37 -}

yazi/plugins/exifaudio.yazi/DO_NOT_MODIFY_ANYTHING_IN_THIS_DIRECTORY

Deleted
deleted file mode 100644

No text changes.

yazi/plugins/exifaudio.yazi/LICENSE

Deleted
deleted file mode 100644
1 -MIT License
3 -Copyright (c) 2024 Sonico98
5 -Permission is hereby granted, free of charge, to any person obtaining a copy
6 -of this software and associated documentation files (the "Software"), to deal
7 -in the Software without restriction, including without limitation the rights
8 -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 -copies of the Software, and to permit persons to whom the Software is
10 -furnished to do so, subject to the following conditions:
12 -The above copyright notice and this permission notice shall be included in all
13 -copies or substantial portions of the Software.
15 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 -SOFTWARE.

yazi/plugins/exifaudio.yazi/README.md

Deleted
deleted file mode 100644
1 -# exifaudio.yazi
3 -Preview audio metadata and cover on [Yazi](https://github.com/sxyazi/yazi).
5 -![image](https://github.com/Sonico98/exifaudio.yazi/assets/61394886/53c1492c-9f05-4c80-a4e7-94fb36f35ca9)
7 -## Installation
9 -```sh
10 -# Automatically with yazi 0.3.0
11 -ya pack -a "Sonico98/exifaudio"
13 -# Or manually under:
14 -# Linux/macOS
15 -git clone https://github.com/Sonico98/exifaudio.yazi.git ~/.config/yazi/plugins/exifaudio.yazi
17 -# Windows
18 -git clone https://github.com/Sonico98/exifaudio.yazi.git %AppData%\yazi\config\plugins\exifaudio.yazi
19 -```
21 -## Usage
23 -Add the following to your `yazi.toml`:
25 -```toml
26 -[plugin]
27 -prepend_previewers = [
28 - { mime = "audio/*", run = "exifaudio"}
29 -]
30 -```
32 -Make sure you have [exiftool](https://exiftool.org/) installed and in your `PATH`.
34 -Optional: if you have [mediainfo](https://mediaarea.net/en/MediaInfo) installed and in your `PATH`, it will be used instead for more accurate metadata. Exiftool is still required to display the cover.
36 -## Thanks
38 -Thanks to [sxyazi](https://github.com/sxyazi) for the PDF previewer code, on which this previewer is based on.

yazi/plugins/exifaudio.yazi/init.lua

Deleted
deleted file mode 100644
1 -local M = {}
3 -function GetPath(str)
4 - local sep = '/'
5 - if ya.target_family() == "windows" then
6 - sep = '\\'
7 - end
8 - return str:match("(.*"..sep..")")
9 -end
11 -function Exiftool(...)
12 - local child = Command("exiftool")
13 - :args({
14 - "-q", "-q", "-S", "-Title", "-SortName",
15 - "-TitleSort", "-TitleSortOrder", "-Artist",
16 - "-SortArtist", "-ArtistSort", "-PerformerSortOrder",
17 - "-Album", "-SortAlbum", "-AlbumSort", "-AlbumSortOrder",
18 - "-AlbumArtist", "-SortAlbumArtist", "-AlbumArtistSort",
19 - "-AlbumArtistSortOrder", "-Genre", "-TrackNumber",
20 - "-Year", "-Duration", "-SampleRate",
21 - "-AudioSampleRate", "-AudioBitrate", "-AvgBitrate",
22 - "-Channels", "-AudioChannels", tostring(...),
23 - })
24 - :stdout(Command.PIPED)
25 - :stderr(Command.NULL)
26 - :spawn()
27 - return child
28 -end
30 -function Mediainfo(...)
31 - local file, cache_dir = ...
32 - local template = cache_dir.."mediainfo.txt"
33 - local child = Command("mediainfo")
34 - :args({
35 - "--Output=file://"..template, tostring(file)
36 - })
37 - :stdout(Command.PIPED)
38 - :stderr(Command.NULL)
39 - :spawn()
40 - return child
41 -end
43 -function M:peek()
44 - local cache = ya.file_cache(self)
45 - if not cache then
46 - return
47 - end
49 - -- Get cache dir to find the mediainfo template file
50 - local cache_dir = GetPath(tostring(cache))
52 - -- Try mediainfo, otherwise use exiftool
53 - local status, child = pcall(Mediainfo, self.file.url, cache_dir)
54 - if not status or child == nil then
55 - status, child = pcall(Exiftool, self.file.url)
56 - if not status or child == nil then
57 - local error = ui.Line { ui.Span("Make sure exiftool is installed and in your PATH") }
58 - local p = ui.Paragraph(self.area, { error }):wrap(ui.Paragraph.WRAP)
59 - ya.preview_widgets(self, { p })
60 - return
61 - end
62 - end
64 - local limit = self.area.h
65 - local i, metadata = 0, {}
66 - repeat
67 - local next, event = child:read_line()
68 - if event == 1 then
69 - return self:fallback_to_builtin()
70 - elseif event ~= 0 then
71 - break
72 - end
74 - i = i + 1
75 - if i > self.skip then
76 - local m_title, m_tag = Prettify(next)
77 - if m_title ~= "" and m_tag ~= "" then
78 - local ti = ui.Span(m_title):bold()
79 - local ta = ui.Span(m_tag)
80 - table.insert(metadata, ui.Line{ti, ta})
81 - table.insert(metadata, ui.Line{})
82 - end
83 - end
84 - until i >= self.skip + limit
86 - local p = ui.Paragraph(self.area, metadata):wrap(ui.Paragraph.WRAP)
87 - ya.preview_widgets(self, { p })
89 - local cover_width = self.area.w / 2 - 5
90 - local cover_height = (self.area.h / 4) + 3
92 - local bottom_right = ui.Rect {
93 - x = self.area.right - cover_width,
94 - y = self.area.bottom - cover_height,
95 - w = cover_width,
96 - h = cover_height,
97 - }
99 - if self:preload() == 1 then
100 - ya.image_show(cache, bottom_right)
101 - end
102 -end
104 -function Prettify(metadata)
105 - local substitutions = {
106 - Sortname = "Sort Title:",
107 - SortName = "Sort Title:",
108 - TitleSort = "Sort Title:",
109 - TitleSortOrder = "Sort Title:",
110 - ArtistSort = "Sort Artist:",
111 - SortArtist = "Sort Artist:",
112 - Artist = "Artist:",
113 - ARTIST = "Artist:",
114 - PerformerSortOrder = "Sort Artist:",
115 - SortAlbumArtist = "Sort Album Artist:",
116 - AlbumArtistSortOrder = "Sort Album Artist:",
117 - AlbumArtistSort = "Sort Album Artist:",
118 - AlbumSortOrder = "Sort Album:",
119 - AlbumSort = "Sort Album:",
120 - SortAlbum = "Sort Album:",
121 - Album = "Album:",
122 - ALBUM = "Album:",
123 - AlbumArtist = "Album Artist:",
124 - Genre = "Genre:",
125 - GENRE = "Genre:",
126 - TrackNumber = "Track Number:",
127 - Year = "Year:",
128 - Duration = "Duration:",
129 - AudioBitrate = "Bitrate:",
130 - AvgBitrate = "Average Bitrate:",
131 - AudioSampleRate = "Sample Rate:",
132 - SampleRate = "Sample Rate:",
133 - AudioChannels = "Channels:"
134 - }
136 - for k, v in pairs(substitutions) do
137 - metadata = metadata:gsub(tostring(k)..":", v, 1)
138 - end
140 - -- Separate the tag title from the tag data
141 - local t={}
142 - for str in string.gmatch(metadata , "([^"..":".."]+)") do
143 - if str ~= "\n" then
144 - table.insert(t, str)
145 - else
146 - table.insert(t, nil)
147 - end
148 - end
150 - -- Add back semicolon to title, rejoin tag data if it happened to contain a semicolon
151 - local title, tag_data = "", ""
152 - if t[1] ~= nil then
153 - title, tag_data = t[1]..":", table.concat(t, ":", 2)
154 - end
155 - return title, tag_data
157 -end
159 -function M:seek(units)
160 - local h = cx.active.current.hovered
161 - if h and h.url == self.file.url then
162 - ya.manager_emit("peek", {
163 - tostring(math.max(0, cx.active.preview.skip + units)),
164 - only_if = tostring(self.file.url),
165 - })
166 - end
167 -end
169 -function M:preload()
170 - local cache = ya.file_cache(self)
171 - if not cache or fs.cha(cache) then
172 - return 1
173 - end
175 - local mediainfo_template = 'General;"\
176 -$if(%Track%,Title: %Track%,)\
177 -$if(%Track/Sort%,Sort Title: %Track/Sort%,)\
178 -$if(%Title/Sort%,Sort Title: %Title/Sort%,)\
179 -$if(%TITLESORT%,Sort Title: %TITLESORT%,)\
180 -$if(%Performer%,Artist: %Performer%,)\
181 -$if(%Performer/Sort%,Sort Artist: %Performer/Sort%,)\
182 -$if(%ARTISTSORT%,Sort Artist: %ARTISTSORT%,)\
183 -$if(%Album%,Album: %Album%,)\
184 -$if(%Album/Sort%,Sort Album: %Album/Sort%)\
185 -$if(%ALBUMSORT%,Sort Album: %ALBUMSORT%)\
186 -$if(%Album/Performer%,Album Artist: %Album/Performer%)\
187 -$if(%Album/Performer/Sort%,Sort Album Artist: %Album/Performer/Sort%)\
188 -$if(%Genre%,Genre: %Genre%)\
189 -$if(%Track/Position%,Track Number: %Track/Position%)\
190 -$if(%Recorded_Date%,Year: %Recorded_Date%)\
191 -$if(%Duration/String%,Duration: %Duration/String%)\
192 -$if(%BitRate/String%,Bitrate: %BitRate/String%)\
193 -"\
194 -Audio;"Sample Rate: %SamplingRate%\
195 -Channels: %Channel(s)%"\
198 - -- Write the mediainfo template file into yazi's cache dir
199 - local cache_dir = GetPath(tostring(cache))
200 - fs.write(Url(cache_dir.."mediainfo.txt"), mediainfo_template)
202 - local output = Command("exiftool")
203 - :args({ "-b", "-CoverArt", "-Picture", tostring(self.file.url) })
204 - :stdout(Command.PIPED)
205 - :stderr(Command.PIPED)
206 - :output()
208 - if not output then
209 - return 0
210 - end
212 - return fs.write(cache, output.stdout) and 1 or 2
213 -end
215 -return M

yazi/plugins/git.yazi/DO_NOT_MODIFY_ANYTHING_IN_THIS_DIRECTORY

Deleted
deleted file mode 100644

No text changes.

yazi/plugins/git.yazi/LICENSE

Deleted
deleted file mode 100644
1 -MIT License
3 -Copyright (c) 2023 yazi-rs
5 -Permission is hereby granted, free of charge, to any person obtaining a copy
6 -of this software and associated documentation files (the "Software"), to deal
7 -in the Software without restriction, including without limitation the rights
8 -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 -copies of the Software, and to permit persons to whom the Software is
10 -furnished to do so, subject to the following conditions:
12 -The above copyright notice and this permission notice shall be included in all
13 -copies or substantial portions of the Software.
15 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 -SOFTWARE.

yazi/plugins/git.yazi/README.md

Deleted
deleted file mode 100644
1 -# git.yazi
3 -> [!NOTE]
4 -> Yazi v0.3.3 or later is required for this plugin to work.
6 -Show the status of Git file changes as linemode in the file list.
8 -https://github.com/user-attachments/assets/34976be9-a871-4ffe-9d5a-c4cdd0bf4576
10 -## Installation
12 -```sh
13 -ya pack -a yazi-rs/plugins:git
14 -```
16 -## Setup
18 -Add the following to your `~/.config/yazi/init.lua`:
20 -```lua
21 -require("git"):setup()
22 -```
24 -And register it as fetchers in your `~/.config/yazi/yazi.toml`:
26 -```toml
27 -[[plugin.prepend_fetchers]]
28 -id = "git"
29 -name = "*"
30 -run = "git"
32 -[[plugin.prepend_fetchers]]
33 -id = "git"
34 -name = "*/"
35 -run = "git"
36 -```
38 -## Advanced
40 -> [!NOTE]
41 -> This section currently requires Yazi nightly that includes https://github.com/sxyazi/yazi/pull/1637
43 -You can customize the [Style](https://yazi-rs.github.io/docs/plugins/layout#style) of the status sign with:
45 -- `THEME.git.modified`
46 -- `THEME.git.added`
47 -- `THEME.git.untracked`
48 -- `THEME.git.ignored`
49 -- `THEME.git.deleted`
50 -- `THEME.git.updated`
52 -For example:
54 -```lua
55 --- ~/.config/yazi/init.lua
56 -THEME.git = THEME.git or {}
57 -THEME.git.modified = ui.Style():fg("blue")
58 -THEME.git.deleted = ui.Style():fg("red"):bold()
59 -```
61 -You can also customize the text of the status sign with:
63 -- `THEME.git.modified_sign`
64 -- `THEME.git.added_sign`
65 -- `THEME.git.untracked_sign`
66 -- `THEME.git.ignored_sign`
67 -- `THEME.git.deleted_sign`
68 -- `THEME.git.updated_sign`
70 -For example:
72 -```lua
73 --- ~/.config/yazi/init.lua
74 -THEME.git = THEME.git or {}
75 -THEME.git.modified_sign = "M"
76 -THEME.git.deleted_sign = "D"
77 -```

yazi/plugins/git.yazi/init.lua

Deleted
deleted file mode 100644
1 -local WIN = ya.target_family() == "windows"
2 -local PATS = {
3 - { "[MT]", 6 }, -- Modified
4 - { "[AC]", 5 }, -- Added
5 - { "?$", 4 }, -- Untracked
6 - { "!$", 3 }, -- Ignored
7 - { "D", 2 }, -- Deleted
8 - { "U", 1 }, -- Updated
9 - { "[AD][AD]", 1 }, -- Updated
12 -local function match(line)
13 - local signs = line:sub(1, 2)
14 - for _, p in ipairs(PATS) do
15 - local path
16 - if signs:find(p[1]) then
17 - path = line:sub(4, 4) == '"' and line:sub(5, -2) or line:sub(4)
18 - path = WIN and path:gsub("/", "\\") or path
19 - end
20 - if not path then
21 - elseif path:find("[/\\]$") then
22 - return p[2] == 3 and 30 or p[2], path:sub(1, -2)
23 - else
24 - return p[2], path
25 - end
26 - end
27 -end
29 -local function root(cwd)
30 - repeat
31 - local cha = fs.cha(cwd:join(".git"))
32 - if cha and cha.is_dir then
33 - return tostring(cwd)
34 - end
35 - cwd = cwd:parent()
36 - until not cwd
37 -end
39 -local function bubble_up(changed)
40 - local new, empty = {}, Url("")
41 - for k, v in pairs(changed) do
42 - if v ~= 3 and v ~= 30 then
43 - local url = Url(k):parent()
44 - while url and url ~= empty do
45 - local s = tostring(url)
46 - new[s] = (new[s] or 0) > v and new[s] or v
47 - url = url:parent()
48 - end
49 - end
50 - end
51 - return new
52 -end
54 -local function propagate_down(ignored, cwd, repo)
55 - local new, rel = {}, cwd:strip_prefix(repo)
56 - for k, v in pairs(ignored) do
57 - if v == 30 then
58 - if rel:starts_with(k) then
59 - new[tostring(repo:join(rel))] = 30
60 - elseif cwd == repo:join(k):parent() then
61 - new[k] = 3
62 - end
63 - end
64 - end
65 - return new
66 -end
68 -local add = ya.sync(function(st, cwd, repo, changed)
69 - st.dirs[cwd] = repo
70 - st.repos[repo] = st.repos[repo] or {}
71 - for k, v in pairs(changed) do
72 - if v == 0 then
73 - st.repos[repo][k] = nil
74 - elseif v == 30 then
75 - st.dirs[k] = ""
76 - else
77 - st.repos[repo][k] = v
78 - end
79 - end
80 - ya.render()
81 -end)
83 -local remove = ya.sync(function(st, cwd)
84 - local dir = st.dirs[cwd]
85 - if not dir then
86 - return
87 - end
89 - ya.render()
90 - st.dirs[cwd] = nil
91 - if not st.repos[dir] then
92 - return
93 - end
95 - for _, r in pairs(st.dirs) do
96 - if r == dir then
97 - return
98 - end
99 - end
100 - st.repos[dir] = nil
101 -end)
103 -local function setup(st, opts)
104 - st.dirs = {}
105 - st.repos = {}
107 - opts = opts or {}
108 - opts.order = opts.order or 1500
110 - -- Chosen by ChatGPT fairly, PRs are welcome to adjust them
111 - local t = THEME.git or {}
112 - local styles = {
113 - [6] = t.modified and ui.Style(t.modified) or ui.Style():fg("#ffa500"),
114 - [5] = t.added and ui.Style(t.added) or ui.Style():fg("#32cd32"),
115 - [4] = t.untracked and ui.Style(t.untracked) or ui.Style():fg("#a9a9a9"),
116 - [3] = t.ignored and ui.Style(t.ignored) or ui.Style():fg("#696969"),
117 - [2] = t.deleted and ui.Style(t.deleted) or ui.Style():fg("#ff4500"),
118 - [1] = t.updated and ui.Style(t.updated) or ui.Style():fg("#1e90ff"),
119 - }
120 - local signs = {
121 - [6] = t.modified_sign and t.modified_sign or "",
122 - [5] = t.added_sign and t.added_sign or "",
123 - [4] = t.untracked_sign and t.untracked_sign or "",
124 - [3] = t.ignored_sign and t.ignored_sign or "",
125 - [2] = t.deleted_sign and t.deleted_sign or "",
126 - [1] = t.updated_sign and t.updated_sign or "U",
127 - }
129 - Linemode:children_add(function(self)
130 - local url = self._file.url
131 - local dir = st.dirs[tostring(url:parent())]
132 - local change
133 - if dir then
134 - change = dir == "" and 3 or st.repos[dir][tostring(url):sub(#dir + 2)]
135 - end
137 - if not change or signs[change] == "" then
138 - return ui.Line("")
139 - elseif self._file:is_hovered() then
140 - return ui.Line { ui.Span(" "), ui.Span(signs[change]) }
141 - else
142 - return ui.Line { ui.Span(" "), ui.Span(signs[change]):style(styles[change]) }
143 - end
144 - end, opts.order)
145 -end
147 -local function fetch(self)
148 - local cwd = self.files[1].url:parent()
149 - local repo = root(cwd)
150 - if not repo then
151 - remove(tostring(cwd))
152 - return 1
153 - end
155 - local paths = {}
156 - for _, f in ipairs(self.files) do
157 - paths[#paths + 1] = tostring(f.url)
158 - end
160 - -- stylua: ignore
161 - local output, err = Command("git")
162 - :cwd(tostring(cwd))
163 - :args({ "--no-optional-locks", "-c", "core.quotePath=", "status", "--porcelain", "-unormal", "--no-renames", "--ignored=matching" })
164 - :args(paths)
165 - :stdout(Command.PIPED)
166 - :output()
167 - if not output then
168 - ya.err("Cannot spawn git command, error code " .. tostring(err))
169 - return 0
170 - end
172 - local changed, ignored = {}, {}
173 - for line in output.stdout:gmatch("[^\r\n]+") do
174 - local sign, path = match(line)
175 - if sign == 30 then
176 - ignored[path] = sign
177 - else
178 - changed[path] = sign
179 - end
180 - end
182 - if self.files[1].cha.is_dir then
183 - ya.dict_merge(changed, bubble_up(changed))
184 - ya.dict_merge(changed, propagate_down(ignored, cwd, Url(repo)))
185 - else
186 - ya.dict_merge(changed, propagate_down(ignored, cwd, Url(repo)))
187 - end
189 - for _, p in ipairs(paths) do
190 - local s = p:sub(#repo + 2)
191 - changed[s] = changed[s] or 0
192 - end
193 - add(tostring(cwd), repo, changed)
195 - return 3
196 -end
198 -return { setup = setup, fetch = fetch }

yazi/plugins/hexyl.yazi/DO_NOT_MODIFY_ANYTHING_IN_THIS_DIRECTORY

Deleted
deleted file mode 100644

No text changes.

yazi/plugins/hexyl.yazi/LICENSE

Deleted
deleted file mode 100644
1 -Copyright © 2024 Reledia <reledia@prontonmail.com>
3 -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

yazi/plugins/hexyl.yazi/README.md

Deleted
deleted file mode 100644
1 -# hexyl.yazi
3 -Preview any file on [Yazi](https://github.com/sxyazi/yazi) using [hexyl](https://github.com/sharkdp/hexyl). To install, use the `ya pack` cli utility:
5 -```bash
6 -ya pack -a Reledia/hexyl
7 -```
9 -then include it in your `yazi.toml` to use:
11 -```toml
12 -[plugin]
13 -append_previewers = [
14 - { name = "*", run = "hexyl" },
15 -]
16 -```
18 -Make sure you have [hexyl](https://github.com/sharkdp/hexyl) installed, and that can be found in `PATH`.
20 -## Preview
22 -![preview.png](https://raw.githubusercontent.com/Reledia/hexyl.yazi/main/image.png)

yazi/plugins/hexyl.yazi/init.lua

Deleted
deleted file mode 100644
1 -local M = {}
3 -function M:peek()
4 - local child
5 - local l = self.file.cha.length
6 - if l == 0 then
7 - child = Command("hexyl")
8 - :args({
9 - tostring(self.file.url),
10 - })
11 - :stdout(Command.PIPED)
12 - :stderr(Command.PIPED)
13 - :spawn()
14 - else
15 - child = Command("hexyl")
16 - :args({
17 - "--border",
18 - "none",
19 - "--terminal-width",
20 - tostring(self.area.w),
21 - tostring(self.file.url),
22 - })
23 - :stdout(Command.PIPED)
24 - :stderr(Command.PIPED)
25 - :spawn()
26 - end
28 - local limit = self.area.h
29 - local i, lines = 0, ""
30 - repeat
31 - local next, event = child:read_line()
32 - if event == 1 then
33 - ya.err(tostring(event))
34 - elseif event ~= 0 then
35 - break
36 - end
38 - i = i + 1
39 - if i > self.skip then
40 - lines = lines .. next
41 - end
42 - until i >= self.skip + limit
44 - child:start_kill()
45 - if self.skip > 0 and i < self.skip + limit then
46 - ya.manager_emit(
47 - "peek",
48 - { tostring(math.max(0, i - limit)), only_if = tostring(self.file.url), upper_bound = "" }
49 - )
50 - else
51 - lines = lines:gsub("\t", string.rep(" ", PREVIEW.tab_size))
52 - ya.preview_widgets(self, { ui.Paragraph.parse(self.area, lines) })
53 - end
54 -end
56 -function M:seek(units)
57 - local h = cx.active.current.hovered
58 - if h and h.url == self.file.url then
59 - local step = math.floor(units * self.area.h / 10)
60 - ya.manager_emit("peek", {
61 - tostring(math.max(0, cx.active.preview.skip + step)),
62 - only_if = tostring(self.file.url),
63 - })
64 - end
65 -end
67 -return M

yazi/plugins/jump-to-char.yazi/DO_NOT_MODIFY_ANYTHING_IN_THIS_DIRECTORY

Deleted
deleted file mode 100644

No text changes.

yazi/plugins/jump-to-char.yazi/LICENSE

Deleted
deleted file mode 100644
1 -MIT License
3 -Copyright (c) 2023 yazi-rs
5 -Permission is hereby granted, free of charge, to any person obtaining a copy
6 -of this software and associated documentation files (the "Software"), to deal
7 -in the Software without restriction, including without limitation the rights
8 -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 -copies of the Software, and to permit persons to whom the Software is
10 -furnished to do so, subject to the following conditions:
12 -The above copyright notice and this permission notice shall be included in all
13 -copies or substantial portions of the Software.
15 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 -SOFTWARE.

yazi/plugins/jump-to-char.yazi/README.md

Deleted
deleted file mode 100644
1 -# jump-to-char.yazi
3 -Vim-like `f<char>`, jump to the next file whose name starts with `<char>`.
5 -https://github.com/yazi-rs/plugins/assets/17523360/aac9341c-b416-4e0c-aaba-889d48389869
7 -## Installation
9 -```sh
10 -ya pack -a yazi-rs/plugins:jump-to-char
11 -```
13 -## Usage
15 -Add this to your `~/.config/yazi/keymap.toml`:
17 -```toml
18 -[[manager.prepend_keymap]]
19 -on = "f"
20 -run = "plugin jump-to-char"
21 -desc = "Jump to char"
22 -```
24 -Make sure the <kbd>f</kbd> key is not used elsewhere.

yazi/plugins/jump-to-char.yazi/init.lua

Deleted
deleted file mode 100644
1 -local AVAILABLE_CHARS = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789."
3 -local changed = ya.sync(function(st, new)
4 - local b = st.last ~= new
5 - st.last = new
6 - return b or not cx.active.finder
7 -end)
9 -local escape = function(s) return s == "." and "\\." or s end
11 -return {
12 - entry = function()
13 - local cands = {}
14 - for i = 1, #AVAILABLE_CHARS do
15 - cands[#cands + 1] = { on = AVAILABLE_CHARS:sub(i, i) }
16 - end
18 - local idx = ya.which { cands = cands, silent = true }
19 - if not idx then
20 - return
21 - end
23 - local kw = escape(cands[idx].on)
24 - if changed(kw) then
25 - ya.manager_emit("find_do", { "^" .. kw })
26 - else
27 - ya.manager_emit("find_arrow", {})
28 - end
29 - end,
30 -}

yazi/plugins/miller.yazi/DO_NOT_MODIFY_ANYTHING_IN_THIS_DIRECTORY

Deleted
deleted file mode 100644

No text changes.

yazi/plugins/miller.yazi/LICENSE

Deleted
deleted file mode 100644
1 -Copyright © 2024 Reledia <reledia@prontonmail.com>
3 -Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
5 -The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
7 -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

yazi/plugins/miller.yazi/README.md

Deleted
deleted file mode 100644
1 -# miller.yazi
3 -[Miller](https://github.com/johnkerl/miller) now in [yazi](https://github.com/sxyazi/yazi). To install, use the command `ya pack -a Reledia/miller` and add to your `yazi.toml`:
5 -```toml
6 -[plugin]
7 -prepend_previewers = [
8 - { mime = "text/csv", run = "miller"},
9 -]
10 -```
12 -## Preview
14 -![preview](https://github.com/Reledia/miller.yazi/blob/main/preview.png?raw=true)
16 -## Color
18 -To change colors of keys and values, edit the `init.lua` file after the `--key-color` and `--value-color` flags. To view a list of possible colors, use `mlr --list-color-names`. Make sure to have miller installed and inside your PATH.
20 -## Other types of file
22 -To adapt this plugin to the other format supported from miller (like json):
24 -- copy the plugin folder
25 -- change the name of the copied folder into miller\_(fmt)
26 -- change the `--icsv` flag inside `init.lua` to `--i(fmt)`
27 -- add the correct mime/name rule into `prepend_previewers` and the exec as `miller_(fmt)`

yazi/plugins/miller.yazi/init.lua

Deleted
deleted file mode 100644
1 -local M = {}
3 -function M:peek()
4 - local child = Command("mlr")
5 - :args({
6 - "--icsv",
7 - "--opprint",
8 - "-C",
9 - "--key-color",
10 - "darkcyan",
11 - "--value-color",
12 - "grey70",
13 - "cat",
14 - tostring(self.file.url),
15 - })
16 - :stdout(Command.PIPED)
17 - :stderr(Command.PIPED)
18 - :spawn()
20 - local limit = self.area.h
21 - local i, lines = 0, ""
22 - repeat
23 - local next, event = child:read_line()
24 - if event == 1 then
25 - ya.err(tostring(event))
26 - elseif event ~= 0 then
27 - break
28 - end
30 - i = i + 1
31 - if i > self.skip then
32 - lines = lines .. next
33 - end
34 - until i >= self.skip + limit
36 - child:start_kill()
37 - if self.skip > 0 and i < self.skip + limit then
38 - ya.manager_emit(
39 - "peek",
40 - { tostring(math.max(0, i - limit)), only_if = tostring(self.file.url), upper_bound = "" }
41 - )
42 - else
43 - lines = lines:gsub("\t", string.rep(" ", PREVIEW.tab_size))
44 - ya.preview_widgets(self, { ui.Paragraph.parse(self.area, lines) })
45 - end
46 -end
48 -function M:seek(units)
49 - local h = cx.active.current.hovered
50 - if h and h.url == self.file.url then
51 - local step = math.floor(units * self.area.h / 10)
52 - ya.manager_emit("peek", {
53 - tostring(math.max(0, cx.active.preview.skip + step)),
54 - only_if = tostring(self.file.url),
55 - })
56 - end
57 -end
59 -return M

yazi/plugins/ouch.yazi/LICENSE

Deleted
deleted file mode 100644
1 -MIT License
3 -Copyright (c) 2024 ndtoan96
5 -Permission is hereby granted, free of charge, to any person obtaining a copy
6 -of this software and associated documentation files (the "Software"), to deal
7 -in the Software without restriction, including without limitation the rights
8 -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9 -copies of the Software, and to permit persons to whom the Software is
10 -furnished to do so, subject to the following conditions:
12 -The above copyright notice and this permission notice shall be included in all
13 -copies or substantial portions of the Software.
15 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16 -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17 -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18 -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19 -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20 -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21 -SOFTWARE.

yazi/plugins/ouch.yazi/README.md

Deleted
deleted file mode 100644
1 -# ouch.yazi
3 -[ouch](https://github.com/ouch-org/ouch) plugin for [Yazi](https://github.com/sxyazi/yazi).
5 -![ouch.yazi](https://github.com/ndtoan96/ouch.yazi/assets/33489972/946397ec-b37b-4bf4-93f1-c676fc8e59f2)
7 -## Features
8 -- Archive preview
9 -- Compression
11 -## Installation
13 -```bash
14 -# Linux/macOS
15 -git clone https://github.com/ndtoan96/ouch.yazi.git ~/.config/yazi/plugins/ouch.yazi
17 -# Windows
18 -git clone https://github.com/ndtoan96/ouch.yazi.git %AppData%\yazi\config\plugins\ouch.yazi
19 -```
21 -Make sure you have [ouch](https://github.com/ouch-org/ouch) installed and in your `PATH`.
23 -## Usage
25 -### Preview
26 -For archive preview, add this to your `yazi.toml`:
28 -```toml
29 -[plugin]
30 -prepend_previewers = [
31 - # Archive previewer
32 - { mime = "application/*zip", run = "ouch" },
33 - { mime = "application/x-tar", run = "ouch" },
34 - { mime = "application/x-bzip2", run = "ouch" },
35 - { mime = "application/x-7z-compressed", run = "ouch" },
36 - { mime = "application/x-rar", run = "ouch" },
37 - { mime = "application/x-xz", run = "ouch" },
38 -]
39 -```
41 -Now go to an archive on Yazi, you should see the archive's content in the preview pane. You can use `Alt-j` and `Alt-k` to roll up and down the preview.
43 -If you want to change the icon or the style of text, you can modify the `peek` function in `init.lua` file (all of them are stored in the `lines` variable).
45 -### Compression
46 -For compession, add this to your `keymap.toml`:
48 -```toml
49 -[[manager.prepend_keymap]]
50 -on = ["C"]
51 -run = "plugin ouch --args=zip"
52 -desc = "Compress with ouch"
53 -```
55 -The `--args=zip` part tells the plugin that default format is `zip`. You can change that to whatever format you want.
57 -### Decompression
58 -This plugin does not provide a decompression feature because it already is supported by Yazi.
59 -To decompress with `ouch`, configure the opener in `yazi.toml`.
61 -```toml
62 -[opener]
63 -extract = [
64 - { run = 'ouch d -y "%*"', desc = "Extract here with ouch", for = "windows" },
65 - { run = 'ouch d -y "$@"', desc = "Extract here with ouch", for = "unix" },
66 -]
67 -```

yazi/plugins/ouch.yazi/init.lua

Deleted
deleted file mode 100644
1 -local M = {}
3 -function M:peek()
4 - local child = Command("ouch")
5 - :args({ "l", "-t", "-y", tostring(self.file.url) })
6 - :stdout(Command.PIPED)
7 - :stderr(Command.PIPED)
8 - :spawn()
9 - local limit = self.area.h
10 - local file_name = string.match(tostring(self.file.url), ".*[/\\](.*)")
11 - local lines = string.format("\x1b[2m📁 %s\x1b[0m\n", file_name)
12 - local num_lines = 1
13 - local num_skip = 0
14 - repeat
15 - local line, event = child:read_line()
16 - if event == 1 then
17 - ya.err(tostring(event))
18 - elseif event ~= 0 then
19 - break
20 - end
22 - if line:find('Archive', 1, true) ~= 1 and line:find('[INFO]', 1, true) ~= 1 then
23 - if num_skip >= self.skip then
24 - lines = lines .. line
25 - num_lines = num_lines + 1
26 - else
27 - num_skip = num_skip + 1
28 - end
29 - end
30 - until num_lines >= limit
32 - child:start_kill()
33 - if self.skip > 0 and num_lines < limit then
34 - ya.manager_emit(
35 - "peek",
36 - { tostring(math.max(0, self.skip - (limit - num_lines))), only_if = tostring(self.file.url), upper_bound = "" }
37 - )
38 - else
39 - ya.preview_widgets(self, { ui.Paragraph.parse(self.area, lines) })
40 - end
41 -end
43 -function M:seek(units)
44 - local h = cx.active.current.hovered
45 - if h and h.url == self.file.url then
46 - local step = math.floor(units * self.area.h / 10)
47 - ya.manager_emit("peek", {
48 - math.max(0, cx.active.preview.skip + step),
49 - only_if = tostring(self.file.url),
50 - })
51 - end
52 -end
54 --- Check if file exists
55 -local function file_exists(name)
56 - local f = io.open(name, "r")
57 - if f ~= nil then
58 - io.close(f)
59 - return true
60 - else
61 - return false
62 - end
63 -end
65 --- Get the files that need to be compressed and infer a default archive name
66 -local get_compression_target = ya.sync(function()
67 - local tab = cx.active
68 - local default_name
69 - local paths = {}
70 - if #tab.selected == 0 then
71 - if tab.current.hovered then
72 - local name = tab.current.hovered.name
73 - default_name = name
74 - table.insert(paths, name)
75 - else
76 - return
77 - end
78 - else
79 - default_name = tab.current.cwd:name()
80 - for _, url in pairs(tab.selected) do
81 - table.insert(paths, tostring(url))
82 - end
83 - -- The compression targets are aquired, now unselect them
84 - ya.manager_emit("escape", {})
85 - end
86 - return paths, default_name
87 -end)
89 -local function invoke_compress_command(paths, name)
90 - local cmd_output, err_code = Command("ouch")
91 - :args({ "c", "-y" })
92 - :args(paths)
93 - :arg(name)
94 - :stderr(Command.PIPED)
95 - :output()
96 - if err_code ~= nil then
97 - ya.notify({
98 - title = "Failed to run ouch command",
99 - content = "Status: " .. err_code,
100 - timeout = 5.0,
101 - level = "error",
102 - })
103 - elseif not cmd_output.status.success then
104 - ya.notify({
105 - title = "Compression failed: status code " .. cmd_output.status.code,
106 - content = cmd_output.stderr,
107 - timeout = 5.0,
108 - level = "error",
109 - })
110 - end
111 -end
113 -function M:entry(args)
114 - local default_fmt = args[1]
116 - -- Get the files that need to be compressed and infer a default archive name
117 - local paths, default_name = get_compression_target()
119 - -- Get archive name from user
120 - local output_name, name_event = ya.input({
121 - title = "Create archive:",
122 - value = default_name .. "." .. default_fmt,
123 - position = { "top-center", y = 3, w = 40 },
124 - })
125 - if name_event ~= 1 then
126 - return
127 - end
129 - -- Get confirmation if file exists
130 - if file_exists(output_name) then
131 - local confirm, confirm_event = ya.input({
132 - title = "Overwrite " .. output_name .. "? (y/N)",
133 - position = { "top-center", y = 3, w = 40 },
134 - })
135 - if not (confirm_event == 1 and confirm:lower() == "y") then
136 - return
137 - end
138 - end
140 - invoke_compress_command(paths, output_name)
141 -end
143 -return M

yazi/plugins/relative-motions.yazi/DO_NOT_MODIFY_ANYTHING_IN_THIS_DIRECTORY

Deleted
deleted file mode 100644

No text changes.

yazi/plugins/relative-motions.yazi/LICENSE

Deleted
deleted file mode 100644
1 -Copyright (c) 2024 dedukun
3 -Permission is hereby granted, free of charge, to any person obtaining a copy
4 -of this software and associated documentation files (the "Software"), to deal
5 -in the Software without restriction, including without limitation the rights
6 -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
7 -copies of the Software, and to permit persons to whom the Software is
8 -furnished to do so, subject to the following conditions:
10 -The above copyright notice and this permission notice shall be included in
11 -all copies or substantial portions of the Software.
13 -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
14 -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
15 -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
16 -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
17 -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
18 -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
19 -THE SOFTWARE.

yazi/plugins/relative-motions.yazi/README.md

Deleted
deleted file mode 100644
1 -# relative-motions.yazi
3 -A [Yazi](https://github.com/sxyazi/yazi) plugin based about vim motions.
5 -https://github.com/dedukun/relative-motions.yazi/assets/25795432/04fb186a-5efe-442d-8d7b-2dccb6eee408
7 -## Requirements
9 -- [Yazi](https://github.com/sxyazi/yazi) v0.3.0+
11 -## Installation
13 -```sh
14 -ya pack -a dedukun/relative-motions
15 -```
17 -## Configuration
19 -If you want to use the numbers directly to start a motion add this to your `keymap.toml`:
21 -<details>
23 -```toml
24 -[[manager.prepend_keymap]]
25 -on = [ "1" ]
26 -run = "plugin relative-motions --args=1"
27 -desc = "Move in relative steps"
29 -[[manager.prepend_keymap]]
30 -on = [ "2" ]
31 -run = "plugin relative-motions --args=2"
32 -desc = "Move in relative steps"
34 -[[manager.prepend_keymap]]
35 -on = [ "3" ]
36 -run = "plugin relative-motions --args=3"
37 -desc = "Move in relative steps"
39 -[[manager.prepend_keymap]]
40 -on = [ "4" ]
41 -run = "plugin relative-motions --args=4"
42 -desc = "Move in relative steps"
44 -[[manager.prepend_keymap]]
45 -on = [ "5" ]
46 -run = "plugin relative-motions --args=5"
47 -desc = "Move in relative steps"
49 -[[manager.prepend_keymap]]
50 -on = [ "6" ]
51 -run = "plugin relative-motions --args=6"
52 -desc = "Move in relative steps"
54 -[[manager.prepend_keymap]]
55 -on = [ "7" ]
56 -run = "plugin relative-motions --args=7"
57 -desc = "Move in relative steps"
59 -[[manager.prepend_keymap]]
60 -on = [ "8" ]
61 -run = "plugin relative-motions --args=8"
62 -desc = "Move in relative steps"
64 -[[manager.prepend_keymap]]
65 -on = [ "9" ]
66 -run = "plugin relative-motions --args=9"
67 -desc = "Move in relative steps"
68 -```
70 -</details>
72 -Alternatively you can use a key to trigger a new motion without any initial value, for that add the following in `keymap.toml`:
74 -```toml
75 -[[manager.prepend_keymap]]
76 -on = [ "m" ]
77 -run = "plugin relative-motions"
78 -desc = "Trigger a new relative motion"
79 -```
81 ----
83 -Additionally there are a couple of initial configurations that can be given to the plugin's `setup` function:
85 -| Configuration | Values | Default | Description |
86 -| -------------- | ----------------------------------------------------- | ------- | ---------------------------------------------------------------------------------------------------------------------------------- |
87 -| `show_numbers` | `relative`, `absolute`, `relative_absolute` or `none` | `none` | Shows relative or absolute numbers before the file icon |
88 -| `show_motion` | `true` or `false` | `false` | Shows current motion in Status bar |
89 -| `only_motions` | `true` or `false` | `false` | If true, only the motion movements will be enabled, i.e., the commands for delete, cut, yank and visual selection will be disabled |
91 -If you want, for example, to enable relative numbers as well as to show the motion in the status bar,
92 -add the following to Yazi's `init.lua`, i.e. `~/.config/yazi/init.lua`:
94 -```lua
95 --- ~/.config/yazi/init.lua
96 -require("relative-motions"):setup({ show_numbers="relative", show_motion = true })
97 -```
99 -> [!NOTE]
100 -> The `show_numbers` and `show_motion` functionalities overwrite [`Current:render`](https://github.com/sxyazi/yazi/blob/ec33085f672e52adb934503d78703b8dd70621a8/yazi-plugin/preset/components/current.lua#L26)
101 -> and [`Status:children_render`](https://github.com/sxyazi/yazi/blob/ec33085f672e52adb934503d78703b8dd70621a8/yazi-plugin/preset/components/status.lua#L173) respectively.
102 -> If you have custom implementations for any of this functions
103 -> you can add the provided `Entity:number` and `Status:motion` to your implementations, just check [here](https://github.com/dedukun/relative-motions.yazi/blob/main/init.lua#L126) how we are doing things.
105 -## Usage
107 -This plugin adds the some basic vim motions like `3k`, `12j`, `10gg`, etc.
108 -The following table show all the available motions:
110 -| Command | Description |
111 -| -------------- | ------------------- |
112 -| `j`/`<Down>` | Move `n` lines down |
113 -| `k`/`<Up>` | Move `n` lines up |
114 -| `gj`/`g<Down>` | Go `n` lines down |
115 -| `gk`/`g<Up>` | Go `n` lines up |
116 -| `gg` | Go to line |
118 -Furthermore, the following operations were also added:
120 -| Command | Description |
121 -| ------- | ------------- |
122 -| `v` | visual select |
123 -| `y` | Yank |
124 -| `x` | Cut |
125 -| `d` | Delete motion |
127 -This however must be followed by a direction, which can be `j`/`<Down>`, `k`/`<Up>` or repeating the command key,
128 -which will operate from the cursor down, e.g. `2yy` will copy two files.
130 -Finally, we also support some tab operations:
132 -| Command | Description |
133 -| ------- | ------------------------------------ |
134 -| `t` | create `n` tabs |
135 -| `H` | Move `n` tabs left |
136 -| `L` | Move `n` tabs right |
137 -| `gt` | Go to the `n` tab |
138 -| `w` | Close tab `n` |
139 -| `W` | Close `n` tabs right |
140 -| `<` | Swap current tab with `n` tabs left |
141 -| `>` | Swap current tab with `n` tabs right |
142 -| `~` | Swap current tab with tab `n` |

yazi/plugins/relative-motions.yazi/init.lua

Deleted
deleted file mode 100644
1 --- stylua: ignore
2 -local MOTIONS_AND_OP_KEYS = {
3 - { on = "0" }, { on = "1" }, { on = "2" }, { on = "3" }, { on = "4" },
4 - { on = "5" }, { on = "6" }, { on = "7" }, { on = "8" }, { on = "9" },
5 - -- commands
6 - { on = "d" }, { on = "v" }, { on = "y" }, { on = "x" },
7 - -- tab commands
8 - { on = "t" }, { on = "L" }, { on = "H" }, { on = "w" },
9 - { on = "W" }, { on = "<" }, { on = ">" }, { on = "~" },
10 - -- movement
11 - { on = "g" }, { on = "j" }, { on = "k" }, { on = "<Down>" }, { on = "<Up>" }
14 --- stylua: ignore
15 -local MOTION_KEYS = {
16 - { on = "0" }, { on = "1" }, { on = "2" }, { on = "3" }, { on = "4" },
17 - { on = "5" }, { on = "6" }, { on = "7" }, { on = "8" }, { on = "9" },
18 - -- movement
19 - { on = "g" }, { on = "j" }, { on = "k" }
22 --- stylua: ignore
23 -local DIRECTION_KEYS = {
24 - { on = "j" }, { on = "k" }, { on = "<Down>" }, { on = "<Up>" },
25 - -- tab movement
26 - { on = "t" }
29 -local SHOW_NUMBERS_ABSOLUTE = 0
30 -local SHOW_NUMBERS_RELATIVE = 1
31 -local SHOW_NUMBERS_RELATIVE_ABSOLUTE = 2
33 ------------------------------------------------
34 ------------------ R E N D E R -----------------
35 ------------------------------------------------
37 -local render_motion_setup = ya.sync(function(_)
38 - ya.render()
40 - Status.motion = function() return ui.Span("") end
42 - Status.children_render = function(self, side)
43 - local lines = {}
44 - if side == self.RIGHT then
45 - lines[1] = self:motion(self)
46 - end
47 - for _, c in ipairs(side == self.RIGHT and self._right or self._left) do
48 - lines[#lines + 1] = (type(c[1]) == "string" and self[c[1]] or c[1])(self)
49 - end
50 - return ui.Line(lines)
51 - end
53 - -- TODO: check why it doesn't work line this
54 - -- Status:children_add(Status.motion, 100, Status.RIGHT)
55 -end)
57 -local render_motion = ya.sync(function(_, motion_num, motion_cmd)
58 - ya.render()
60 - Status.motion = function(self)
61 - if not motion_num then
62 - return ui.Span("")
63 - end
65 - local style = self:style()
67 - local motion_span
68 - if not motion_cmd then
69 - motion_span = ui.Span(string.format(" %3d ", motion_num)):style(style)
70 - else
71 - motion_span = ui.Span(string.format(" %3d%s ", motion_num, motion_cmd)):style(style)
72 - end
74 - return ui.Line {
75 - ui.Span(THEME.status.separator_open):fg(style.bg),
76 - motion_span,
77 - ui.Span(THEME.status.separator_close):fg(style.bg),
78 - ui.Span(" "),
79 - }
80 - end
81 -end)
83 -local render_numbers = ya.sync(function(_, mode)
84 - ya.render()
86 - Entity.number = function(_, index, file, hovered)
87 - local idx
88 - if mode == SHOW_NUMBERS_RELATIVE then
89 - idx = math.abs(hovered - index)
90 - elseif mode == SHOW_NUMBERS_ABSOLUTE then
91 - idx = file.idx
92 - else -- SHOW_NUMBERS_RELATIVE_ABSOLUTE
93 - if hovered == index then
94 - idx = file.idx
95 - else
96 - idx = math.abs(hovered - index)
97 - end
98 - end
100 - -- emulate vim's hovered offset
101 - if idx >= 100 then
102 - return ui.Span(string.format("%4d ", idx))
103 - elseif hovered == index then
104 - return ui.Span(string.format("%3d ", idx))
105 - else
106 - return ui.Span(string.format(" %3d ", idx))
107 - end
108 - end
110 - Current.render = function(self)
111 - local files = self._folder.window
112 - if #files == 0 then
113 - return self:empty()
114 - end
116 - local hovered_index
117 - for i, f in ipairs(files) do
118 - if f:is_hovered() then
119 - hovered_index = i
120 - break
121 - end
122 - end
124 - local entities, linemodes = {}, {}
125 - for i, f in ipairs(files) do
126 - linemodes[#linemodes + 1] = Linemode:new(f):render()
128 - local entity = Entity:new(f)
129 - entities[#entities + 1] = ui.ListItem(ui.Line { Entity:number(i, f, hovered_index), entity:render() })
130 - :style(entity:style())
131 - end
133 - return {
134 - ui.List(self._area, entities),
135 - ui.Paragraph(self._area, linemodes):align(ui.Paragraph.RIGHT),
136 - }
137 - end
138 -end)
140 -local function render_clear() render_motion() end
142 ------------------------------------------------
143 ---------- C O M M A N D P A R S E R ---------
144 ------------------------------------------------
146 -local get_keys = ya.sync(function(state) return state._only_motions and MOTION_KEYS or MOTIONS_AND_OP_KEYS end)
148 -local function normal_direction(dir)
149 - if dir == "<Down>" then
150 - return "j"
151 - elseif dir == "<Up>" then
152 - return "k"
153 - end
154 - return dir
155 -end
157 -local function get_cmd(first_char, keys)
158 - local last_key
159 - local lines = first_char or ""
161 - while true do
162 - render_motion(tonumber(lines))
163 - local key = ya.which { cands = keys, silent = true }
164 - if not key then
165 - return nil, nil, nil
166 - end
168 - last_key = keys[key].on
169 - if not tonumber(last_key) then
170 - last_key = normal_direction(last_key)
171 - break
172 - end
174 - lines = lines .. last_key
175 - end
177 - render_motion(tonumber(lines), last_key)
179 - -- command direction
180 - local direction
181 - if last_key == "g" or last_key == "v" or last_key == "d" or last_key == "y" or last_key == "x" then
182 - DIRECTION_KEYS[#DIRECTION_KEYS + 1] = {
183 - on = last_key,
184 - }
185 - local direction_key = ya.which { cands = DIRECTION_KEYS, silent = true }
186 - if not direction_key then
187 - return nil, nil, nil
188 - end
190 - direction = DIRECTION_KEYS[direction_key].on
191 - direction = normal_direction(direction)
192 - end
194 - return tonumber(lines), last_key, direction
195 -end
197 -local function is_tab_command(command)
198 - local tab_commands = { "t", "L", "H", "w", "W", "<", ">", "~" }
199 - for _, cmd in ipairs(tab_commands) do
200 - if command == cmd then
201 - return true
202 - end
203 - end
204 - return false
205 -end
207 -local get_active_tab = ya.sync(function(_) return cx.tabs.idx end)
209 ------------------------------------------------
210 ----------- E N T R Y / S E T U P ----------
211 ------------------------------------------------
213 -return {
214 - entry = function(_, args)
215 - local initial_value
217 - -- this is checking if the argument is a valid number
218 - if args then
219 - initial_value = tostring(tonumber(args[1]))
220 - if initial_value == "nil" then
221 - return
222 - end
223 - end
225 - local lines, cmd, direction = get_cmd(initial_value, get_keys())
226 - if not lines or not cmd then
227 - -- command was cancelled
228 - render_clear()
229 - return
230 - end
232 - if cmd == "g" then
233 - if direction == "g" then
234 - ya.manager_emit("arrow", { -99999999 })
235 - ya.manager_emit("arrow", { lines - 1 })
236 - render_clear()
237 - return
238 - elseif direction == "j" then
239 - cmd = "j"
240 - elseif direction == "k" then
241 - cmd = "k"
242 - elseif direction == "t" then
243 - ya.manager_emit("tab_switch", { lines - 1 })
244 - render_clear()
245 - return
246 - else
247 - -- no valid direction
248 - render_clear()
249 - return
250 - end
251 - end
253 - if cmd == "j" then
254 - ya.manager_emit("arrow", { lines })
255 - elseif cmd == "k" then
256 - ya.manager_emit("arrow", { -lines })
257 - elseif is_tab_command(cmd) then
258 - if cmd == "t" then
259 - for _ = 1, lines do
260 - ya.manager_emit("tab_create", {})
261 - end
262 - elseif cmd == "H" then
263 - ya.manager_emit("tab_switch", { -lines, relative = true })
264 - elseif cmd == "L" then
265 - ya.manager_emit("tab_switch", { lines, relative = true })
266 - elseif cmd == "w" then
267 - ya.manager_emit("tab_close", { lines - 1 })
268 - elseif cmd == "W" then
269 - local curr_tab = get_active_tab()
270 - local del_tab = curr_tab + lines - 1
271 - for _ = curr_tab, del_tab do
272 - ya.manager_emit("tab_close", { curr_tab - 1 })
273 - end
274 - ya.manager_emit("tab_switch", { curr_tab - 1 })
275 - elseif cmd == "<" then
276 - ya.manager_emit("tab_swap", { -lines })
277 - elseif cmd == ">" then
278 - ya.manager_emit("tab_swap", { lines })
279 - elseif cmd == "~" then
280 - local jump = lines - get_active_tab()
281 - ya.manager_emit("tab_swap", { jump })
282 - end
283 - else
284 - ya.manager_emit("visual_mode", {})
285 - -- invert direction when user specifies it
286 - if direction == "k" then
287 - ya.manager_emit("arrow", { -lines })
288 - elseif direction == "j" then
289 - ya.manager_emit("arrow", { lines })
290 - else
291 - ya.manager_emit("arrow", { lines - 1 })
292 - end
293 - ya.manager_emit("escape", {})
295 - if cmd == "d" then
296 - ya.manager_emit("remove", {})
297 - elseif cmd == "y" then
298 - ya.manager_emit("yank", {})
299 - elseif cmd == "x" then
300 - ya.manager_emit("yank", { cut = true })
301 - end
302 - end
304 - render_clear()
305 - end,
306 - setup = function(state, args)
307 - if not args then
308 - return
309 - end
311 - -- initialize state variables
312 - state._only_motions = args["only_motions"] or false
314 - if args["show_motion"] then
315 - render_motion_setup()
316 - end
318 - if args["show_numbers"] == "absolute" then
319 - render_numbers(SHOW_NUMBERS_ABSOLUTE)
320 - elseif args["show_numbers"] == "relative" then
321 - render_numbers(SHOW_NUMBERS_RELATIVE)
322 - elseif args["show_numbers"] == "relative_absolute" then
323 - render_numbers(SHOW_NUMBERS_RELATIVE_ABSOLUTE)
324 - end
325 - end,

yazi/plugins/video-ffmpeg.yazi/DO_NOT_MODIFY_ANYTHING_IN_THIS_DIRECTORY

Deleted
deleted file mode 100644

No text changes.

yazi/plugins/video-ffmpeg.yazi/LICENSE

Deleted
deleted file mode 100644
1 -The MIT License (MIT)
3 -Copyright © 2024
6 -Permission is hereby granted, free of charge, to any person obtaining a copy
7 -of this software and associated documentation files (the “Software”), to deal
8 -in the Software without restriction, including without limitation the rights
9 -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
10 -copies of the Software, and to permit persons to whom the Software is
11 -furnished to do so, subject to the following conditions:
13 -The above copyright notice and this permission notice shall be included in
14 -all copies or substantial portions of the Software.
16 -THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
17 -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
18 -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
19 -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
20 -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
21 -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
22 -THE SOFTWARE.

yazi/plugins/video-ffmpeg.yazi/README.md

Deleted
deleted file mode 100644
1 -# video-ffmpeg.yazi
3 -A plugin for [yazi](https://github.com/sxyazi/yazi) to preview videos without using
4 -[ffmpegthumbnailer](https://github.com/dirkvdb/ffmpegthumbnailer) since I couldn't get it working for windows.
6 -## Requirements
8 -- `ffmpeg`
10 -## Installation
12 -```sh
13 -ya pack -a 'Tyarel8/video-ffmpeg'
14 -```
16 -## Usage
18 -Add this to your `yazi.toml`:
20 -```toml
21 -[plugin]
22 -prepend_previewers = [
23 - { mime = "video/*", run = "video-ffmpeg" },
24 -]
26 -prepend_preloaders = [
27 - { mime = "video/*", run = "video-ffmpeg" },
28 -]
29 -```

yazi/plugins/video-ffmpeg.yazi/init.lua

Deleted
deleted file mode 100644
1 -local M = {}
3 -function M:peek()
4 - local start, cache = os.clock(), ya.file_cache(self)
5 - if not cache or self:preload() ~= 1 then
6 - return
7 - end
9 - ya.sleep(math.max(0, PREVIEW.image_delay / 1000 + start - os.clock()))
10 - ya.image_show(cache, self.area)
11 - ya.preview_widgets(self, {})
12 -end
14 -function M:seek(units)
15 - local h = cx.active.current.hovered
16 - if h and h.url == self.file.url then
17 - ya.manager_emit("peek", {
18 - math.max(0, cx.active.preview.skip + units),
19 - only_if = self.file.url,
20 - })
21 - end
22 -end
24 -function M:preload()
25 - local percentage = 5 + self.skip
26 - if percentage > 95 then
27 - ya.manager_emit("peek", { 90, only_if = self.file.url, upper_bound = true })
28 - return 2
29 - end
31 - local cache = ya.file_cache(self)
32 - if not cache or fs.cha(cache) then
33 - return 1
34 - end
36 - -- Get the video duration in seconds
37 - local probe = Command("ffprobe"):args({
38 - "-i", tostring(self.file.url), "-show_entries", "format=duration", "-v", "quiet", "-of", "csv=p=0"
39 - }):stdout(Command.PIPED):output()
41 - -- Calculate second to take thumbnail
42 - local sec = tonumber(probe.stdout) * percentage / 100
44 - local child, code = Command("ffmpeg"):args({
45 - "-ss",
46 - -- Replace `,` with `.` to prevent locale issues where the decimal separator is `,`
47 - tostring(sec):gsub(",", "."),
48 - "-i",
49 - tostring(self.file.url),
50 - "-vf",
51 - "scale=" .. tostring(PREVIEW.max_width) .. ":-1",
52 - "-q:v",
53 - "6",
54 - "-frames:v",
55 - "1",
56 - "-f",
57 - "image2",
58 - tostring(cache),
59 - }):spawn()
61 - if not child then
62 - ya.err("spawn `ffmpeg` command returns " .. tostring(code))
63 - return 0
64 - end
66 - local status = child:wait()
67 - return status and status.success and 1 or 2
68 -end
70 -return M