repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

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

0bacce5c4200feecaf509c4655c7ce39c0bf4473

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (36)

neovim/README.md

Modified
24 24 ftplugin
25 25 : file type specific config
27 -----------
27 +---
29 29 # ai poem
39 39 # todo
41 -* navic highlights do not fit winbar
42 41 * indent line bg overwrites visual selection bg
43 -* fix bg gihlight of treesitter-context
42 +* fix bg highlight of treesitter-context
43 +* stabilize plugins that are only dependencies. move to own file?
44 +* fix markdown rendering in doc popup
44 45 * make highlights more visible when expanding snippets
46 +* kill mason again and get lsps via packages.nu
47 +* simplify lsp config
48 + - make my config identical to vim.lsp.ClientConfig
49 + - fuck all that single file and workspace stuff
50 + - move start function and config creation from lsp/init.lua to ftplugin/*.lua
45 51 * make assignment to map.x fail, e.g. `map.normal = {}`...
46 52 * figure out desirable cmp key maps
47 53 * try loading lsp async for better startup perf
48 54 * check out `vim.snippet`
49 -* adapt config to respect `vim.g.nerdfont` (std.constants?)
50 -* Do I want multiple LSPs per buffer?
51 - In case of markdown and text it seems useful, for code it seems like a
52 - headache...
53 - But it seems inevitable, because more and more tools use the LSP infrastructure.
54 - For example, grammar checkers like harper or code transform tools like ast-grep
55 +* replace cmp with vim.lsp.completion when 0.11 comes out
56 +* adapt config to respect `vim.g.nerdfont` (std.const?)
55 57 * check out harper-ls
56 58 * check out ast-grep
57 -* flesh out 'const.lua', move to std?
58 59 * nvim spell for camel case words
59 60 * create skeleton-plugin for default file content based on file type
60 61 (BufNewFile?)

neovim/colors/nugu.lua

Modified
1 --- TODO: move this to std and refactor to retun bool
2 --- Set color theme to light/dark based on current system preferences.
3 -function get_background_based_on_os()
4 - -- Default value
5 - local background = 'light'
6 - local uname = vim.uv.os_uname()
7 - -- First check whether we are on WSL or Windows
8 - if uname.sysname == "Windows_NT" or string.match(uname.release, "WSL") then
9 - -- Check if 'reg.exe' is executable
10 - if vim.fn.executable('reg.exe') ~= 0 then
11 - -- Execute command to check if the win32 appearance is set to Dark
12 - local appsUseLightTheme = vim.fn.system({"reg.exe", "Query", "HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize", "/v", "AppsUseLightTheme"})
13 - if not appsUseLightTheme:find("0x1") then
14 - background = 'dark'
15 - end
16 - end
17 - -- Check if 'busctl' is executable (part of systemd)
18 - elseif vim.fn.executable('busctl') ~= 0 then
19 - -- Get the current color scheme from xdg-desktop-portal using busctl
20 - local result = vim.fn.system({
21 - "busctl", "--user", "call", "org.freedesktop.portal.Desktop", "/org/freedesktop/portal/desktop",
22 - "org.freedesktop.portal.Settings", "ReadOne", "ss", "org.freedesktop.appearance", "color-scheme"
23 - })
24 - -- The result is in the form of "v u 0" for light and "v u 1" for dark
25 - local color_scheme = result:match("u%s+(%d+)")
27 - if color_scheme == '1' then
28 - background = 'dark'
29 - end
30 - else
31 - end
33 - return background
34 -end
1 +local const = require'std.const'
36 3 if vim.g.colors_name == nil then
37 - vim.opt.background = get_background_based_on_os()
4 + vim.opt.background = const.os_background
38 5 else
39 6 -- Reset all highlights if another colorscheme was previously set
40 7 vim.cmd [[ highlight clear ]]

neovim/ftplugin/lua.lua

Modified
10 10 -- those are defined in 'after/queries/lua/highlights.scm'
11 11 vim.opt_local.conceallevel = 1
12 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/init.lua

Modified
14 14 vim.cmd.colorscheme 'nugu'
16 ----create special global, that serves as a more graceful alternative to `require`
16 +-- create special global, that serves as a more graceful alternative to `require`
17 +-- FIXME: use normal imports instead of global
17 18 prequire = require 'std.prequire'
19 -prequire 'bugabinga.options'
20 -prequire 'bugabinga.editorconfig'
21 -prequire 'bugabinga.sessions'
22 -prequire 'bugabinga.lazy'
23 -prequire 'bugabinga.save_actions'
20 +require 'patches'
25 -prequire 'bugabinga.lsp'
22 +require 'bugabinga.options'
23 +require 'bugabinga.editorconfig'
24 +require 'bugabinga.sessions'
25 +require 'bugabinga.lazy'
27 -vim.defer_fn (function ()
28 - prequire 'bugabinga.terminal'
29 - prequire 'bugabinga.diagnostic'
30 -end, 444)
27 +require 'bugabinga.lsp'
29 +vim.defer_fn( function ()
30 + require 'bugabinga.terminal'
31 + require 'bugabinga.diagnostic'
32 + require 'bugabinga.save_actions'
33 + require 'bugabinga.lsp.lightbulb'
34 + end, 444 )

neovim/justfile

Modified
2 2 set shell := ['nu', '--commands']
4 4 # List available recipes.
5 5 default:
6 - @just --list
6 + @just --list
8 8 # Reproduce some neovim issue
9 9 repro:
10 - nvim -u repro.lua
10 + nvim -u repro.lua
12 12 # update nvim plugins
13 13 update:
14 - nvim --headless "+Lazy! sync" +qa
14 + nvim --headless "+Lazy! sync" +qa
16 -# delete all current neovim state, cache and other ephemeral data.
17 -# does NOT delete the configs
16 +# TODO install treesitter parser for neovim to use
17 +treesitter:
18 + luarocks \
19 + --lua-version=5.1 \
20 + --tree=$HOME/.local/share/nvim/rocks \
21 + install --dev \
22 + tree-sitter-rust
24 +# delete all current neovim state, cache and other ephemeral data. does NOT delete the configs
18 25 nuke:
19 - rm -r (run-external --redirect-combine nvim "--headless" "-n" "-R" +'lua = vim.fn.stdpath[[data]]' +:q | lines | last)
20 - rm -r (run-external --redirect-combine nvim "--headless" "-n" "-R" +'lua = vim.fn.stdpath[[cache]]' +:q | lines | last)
21 - rm -r (run-external --redirect-combine nvim "--headless" "-n" "-R" +'lua = vim.fn.stdpath[[state]]' +:q | lines | last)
26 + rm -r (run-external --redirect-combine nvim "--headless" "-n" "-R" +'lua = vim.fn.stdpath[[data]]' +:q | lines | last)
27 + rm -r (run-external --redirect-combine nvim "--headless" "-n" "-R" +'lua = vim.fn.stdpath[[cache]]' +:q | lines | last)
28 + rm -r (run-external --redirect-combine nvim "--headless" "-n" "-R" +'lua = vim.fn.stdpath[[state]]' +:q | lines | last)

neovim/lazy-lock.json

Modified
2 2 "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" },
3 + "CopilotChat.nvim": { "branch": "canary", "commit": "9333944fde3c65868818e245c73aa29eef826e9b" },
3 4 "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
4 5 "better-escape.nvim": { "branch": "master", "commit": "f45b52f8f87792e8659526f23261ffe278a54be5" },
6 + "cmd-parser.nvim": { "branch": "master", "commit": "6363b8bddef968c3ec51a38172af44f675f01ef3" },
5 7 "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
8 + "cmp-dotenv": { "branch": "main", "commit": "4dd53aab60982f1f75848aec5e6214986263325e" },
6 9 "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
10 + "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
7 11 "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
8 12 "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
9 13 "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
10 - "colorizer.nvim": { "branch": "master", "commit": "c1602ff3f11566bb7f16f90985b0c59d3d7db0ef" },
11 14 "conform.nvim": { "branch": "master", "commit": "50649648851cd0e126dfedd0f3c33b900a6f1ef8" },
15 + "copilot-cmp": { "branch": "master", "commit": "b6e5286b3d74b04256d0a7e3bd2908eabec34b44" },
16 + "copilot.lua": { "branch": "master", "commit": "1a237cf50372830a61d92b0adf00d3b23882e0e1" },
17 + "decisive.nvim": { "branch": "main", "commit": "a7251adebccbc9c899cff39a524b20d06e2b78b5" },
12 18 "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
13 19 "dressing.nvim": { "branch": "master", "commit": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2" },
20 + "eagle.nvim": { "branch": "main", "commit": "f590404f510be11ef2cf7c68e135441bfa48c9a8" },
14 21 "flash.nvim": { "branch": "main", "commit": "ec0bf2842189f65f60fd40bf3557cac1029cc932" },
15 22 "heirline.nvim": { "branch": "master", "commit": "7a79753c1a42c3f52e89a6c42429e7f871e560cd" },
23 + "in-and-out.nvim": { "branch": "master", "commit": "ab24cafadc3418dffb0c7e9b0621cff60b9ac551" },
16 24 "indent-blankline.nvim": { "branch": "master", "commit": "3fe94b8034dd5241cb882bb73847303b58857ecf" },
25 + "iswap.nvim": { "branch": "master", "commit": "e02cc91f2a8feb5c5a595767d208c54b6e3258ec" },
26 + "ivy.nvim": { "branch": "0.x", "commit": "cfa7e29ae4d955508d4f7f2ef08cc0c51ee745ed" },
27 + "layers.nvim": { "branch": "main", "commit": "67666f59a2dbe36a469766be6a4c484ae98c4895" },
17 28 "lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" },
29 + "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" },
18 30 "lspkind.nvim": { "branch": "master", "commit": "59c3f419af48a2ffb2320cea85e44e5a95f71664" },
31 + "markdown-table-mode.nvim": { "branch": "main", "commit": "f830cd15a97deb3acc53d9f6607bc609f7f32e49" },
19 32 "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
20 33 "mini.bracketed": { "branch": "main", "commit": "833d66df6e0588222312a963780c6ec42ed7437d" },
21 34 "mini.bufremove": { "branch": "main", "commit": "1ee294a97e091d3cf967974df622c0d887890dc2" },
22 35 "mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" },
36 + "neodim": { "branch": "master", "commit": "d87470828690342d0139efc2fd56ea0b29e9ecb3" },
37 + "no-neck-pain.nvim": { "branch": "main", "commit": "c0d8061f18bccceff0991e096c8f864a720e1ebf" },
23 38 "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
24 39 "nvim-autopairs": { "branch": "master", "commit": "f158dcb865c36f72c92358f87787dab2c272eaf3" },
25 40 "nvim-cmp": { "branch": "main", "commit": "ae644feb7b67bf1ce4260c231d1d4300b19c6f30" },
41 + "nvim-dap": { "branch": "master", "commit": "7ff6936010b7222fea2caea0f67ed77f1b7c60dd" },
42 + "nvim-docs-view": { "branch": "master", "commit": "365593534e0acd762bfddce6e8313315ffa4fa36" },
43 + "nvim-dr-lsp": { "branch": "main", "commit": "bbed27eb6eba20242d59fc6ac11852730c9af632" },
26 44 "nvim-genghis": { "branch": "main", "commit": "ca258b1e466d131e17eacf0c632abe932bce20ab" },
27 45 "nvim-gomove": { "branch": "main", "commit": "2b44ae7ac0804f4e3959228122f7c85bef1964e3" },
46 + "nvim-highlight-colors": { "branch": "main", "commit": "a411550ef85cae467b889ba7d1a96bd78332d90e" },
28 47 "nvim-lastplace": { "branch": "main", "commit": "0bb6103c506315044872e0f84b1f736c4172bb20" },
29 48 "nvim-lint": { "branch": "master", "commit": "968a35d54b3a4c1ce66609cf80b14d4ae44fe77f" },
49 + "nvim-lsp-endhints": { "branch": "main", "commit": "391ef40521b631a8a2fb7aef78db6967ead6b39d" },
50 + "nvim-luapad": { "branch": "master", "commit": "176686eb616a5ada5dfc748f2b5109194bbe8a71" },
30 51 "nvim-neoclip.lua": { "branch": "main", "commit": "32e05f2d23dc5b6a284a688c0535a83d1bfc633f" },
52 + "nvim-rulebook": { "branch": "main", "commit": "bc5e3874a9870709ec91152f9efce6dad49ca862" },
31 53 "nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
32 - "nvim-treesitter": { "branch": "master", "commit": "f027762845fa35ff27fe0487c86537a74a480a0c" },
54 + "nvim-treesitter": { "branch": "master", "commit": "707313b80a2f1e65fa06dba2052cc49ce6762a60" },
33 55 "nvim-treesitter-endwise": { "branch": "master", "commit": "8b34305ffc28bd75a22f5a0a9928ee726a85c9a6" },
34 56 "nvim-treesitter-textobjects": { "branch": "master", "commit": "4a2d05ec24eaa6b655c7d19092a3b6c0219d46b9" },
35 57 "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
36 - "nvim-web-devicons": { "branch": "master", "commit": "26220156aafb198b2de6a4cf80c1b120a3768da0" },
58 + "nvim-web-devicons": { "branch": "master", "commit": "1e5a2a796a88b5d696acb07dd5c285b13d13da21" },
37 59 "oil.nvim": { "branch": "master", "commit": "1eb9fb35a4613518f79790117ed82c367a0b4a22" },
38 60 "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
61 + "precognition.nvim": { "branch": "main", "commit": "8a81c310b4e76b4884fc5350a5741cf683c645c7" },
62 + "range-highlight.nvim": { "branch": "master", "commit": "8b5e8ccb3460b2c3675f4639b9f54e64eaab36d9" },
63 + "refjump.nvim": { "branch": "main", "commit": "a78b585cff29505f7558f3a596bca567474cd663" },
64 + "scratch.nvim": { "branch": "main", "commit": "3e3d2ad0d7f565bc794d9d3ad40e92509802ecad" },
39 65 "specs.nvim": { "branch": "main", "commit": "8a108c8b37dec1b184a1d3d76c6cf867bfbe9636" },
66 + "spellwarn.nvim": { "branch": "main", "commit": "2f4dbc58bb90bc63b295461216b91ccf4e7f782d" },
40 67 "substitute.nvim": { "branch": "main", "commit": "17ffaeb5a1dc2dbef39cf0865d8a4b6000836714" },
68 + "surround-ui.nvim": { "branch": "main", "commit": "40abcba017a943d6d3dd304e523f34a43d80405b" },
69 + "symbol-usage.nvim": { "branch": "main", "commit": "0f9b3da014b7e41559b643e7461fcabb2a7dc83a" },
70 + "telescope-frecency.nvim": { "branch": "master", "commit": "f67baca08423a6fd00167801a54db38e0b878063" },
41 71 "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
42 72 "telescope-symbols.nvim": { "branch": "master", "commit": "a6d0127a53d39b9fc2af75bd169d288166118aec" },
73 + "telescope-undo.nvim": { "branch": "main", "commit": "51be9ae7c42fc27c0b05505e3a0162e0f05fbb6a" },
43 74 "telescope-zoxide": { "branch": "main", "commit": "54bfe630bad08dc9891ec78c7cf8db38dd725c97" },
44 75 "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
45 76 "text-case.nvim": { "branch": "main", "commit": "13daf28a829e6d0646904c94214cb289bb0c6f34" },
77 + "timespent.nvim": { "branch": "master", "commit": "6346ea9556344a44fdbc83a8a80d68ca66dd8778" },
78 + "tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "1a83e7ce5c9d0ae4d89fc5c812b55ff8ed1d39e7" },
46 79 "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
80 + "toggle.nvim": { "branch": "main", "commit": "50769ba8982d3d3a8fbd1d1a2e5cad63c73df662" },
47 81 "tree-sitter-nu": { "branch": "main", "commit": "e3b4c967937cad628dca09bd098cd780d8288750" },
48 82 "treesj": { "branch": "main", "commit": "0d81326b5afd36babe7dd480aabbb0b05f33e688" },
49 83 "vim-vscode-snippets": { "branch": "master", "commit": "c34e9edee6a00cf3d0b8edb515e08e3df450bcfa" },
50 84 "virt-column.nvim": { "branch": "master", "commit": "b62b4ef0774d19452d4ed18e473e824c7a756f2f" },
85 + "wezterm-types": { "branch": "main", "commit": "1518752906ba3fac0060d9efab6e4d3ec15d4b5a" },
51 86 "which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" },
52 87 "zen-mode.nvim": { "branch": "main", "commit": "04b52674b8c800f8b7d4609e8bd8d0212e3ffa79" }

neovim/lua/bugabinga/const.lua

Deleted
deleted file mode 100644
1 ---- constant 'global' values
2 -return {
3 - win32 = vim.loop.os_uname().sysname:match 'Win',
4 - wsl2 = vim.loop.os_uname().release:match 'WSL2',
5 -}

neovim/lua/bugabinga/lsp/init.lua

Modified
13 13 local _ = {}
15 -require 'bugabinga.lsp.lightbulb'
17 16 local token_update = function ( lsp_client )
18 17 local token = lsp_client.data.token
300 299 buffer = bufnr,
301 300 keys = '<leader>ti',
302 301 command = function ()
303 - vim.lsp.inlay_hint.enable( bufnr, nil )
302 + vim.lsp.inlay_hint.enable( not vim.lsp.inlay_hint.is_enabled() )

neovim/lua/bugabinga/nugu/init.lua

Modified
181 181 _.VisualNOS { bg = ui_unfocus }
182 182 _.WarningMsg { fg = warning, bold = true }
183 183 _.WildMenu = _.Debug
184 +_.TextYankPost { fg = content_backdrop, bg = ui_important_local }
185 186 _.String { fg = content_important_local, italic = true }
186 187 _.Constant = _.String

neovim/lua/bugabinga/nugu/palette.lua

Modified
10 10 return {
11 - debug = choose { light = '#3dd45d', dark = '#3dd45d', },
12 - error = choose { light = '#740523', dark = '#f27a9a', },
13 - info = choose { light = '#4187a7', dark = '#e7f0f3', },
14 - warning = choose { light = '#a7802d', dark = '#f1e8d6', },
11 + debug = choose { light = '#3dd45d', dark = '#3dd45d' },
12 + error = choose { light = '#740523', dark = '#f27a9a' },
13 + info = choose { light = '#4187a7', dark = '#e7f0f3' },
14 + warning = choose { light = '#a7802d', dark = '#f1e8d6' },
16 - content_normal = choose { light = '#494949', dark = '#cfcfcf', },
17 - content_backdrop = choose { light = '#e3e3e3', dark = '#131313', },
18 - content_accent = choose { light = '#800080', dark = '#800080', },
19 - content_minor = choose { light = '#878787', dark = '#727272', },
20 - content_focus = choose { light = '#646464', dark = '#a5bdb6', },
21 - content_unfocus = choose { light = '#c9c9c9', dark = '#3f4543', },
22 - content_important_global = choose { light = '#48256e', dark = '#8e58cc', },
23 - content_important_local = choose { light = '#643398', dark = '#7a3bc3', },
16 + content_normal = choose { light = '#494949', dark = '#cfcfcf' },
17 + content_backdrop = choose { light = '#e3e3e3', dark = '#131313' },
18 + content_accent = choose { light = '#800080', dark = '#800080' },
19 + content_minor = choose { light = '#878787', dark = '#727272' },
20 + content_focus = choose { light = '#646464', dark = '#a5bdb6' },
21 + content_unfocus = choose { light = '#c9c9c9', dark = '#3f4543' },
22 + content_important_global = choose { light = '#48256e', dark = '#8e58cc' },
23 + content_important_local = choose { light = '#643398', dark = '#7a3bc3' },
25 - ui_normal = choose { light = '#929292', dark = '#e2e2e2', },
26 - ui_backdrop = choose { light = '#f9f9f9', dark = '#000000', },
27 - ui_accent = choose { light = '#d43dd4', dark = '#7a067a', },
28 - ui_minor = choose { light = '#d0d0d0', dark = '#424242', },
29 - ui_focus = choose { light = '#646464', dark = '#788984', },
30 - ui_unfocus = choose { light = '#c9c9c9', dark = '#121212', },
31 - ui_important_global = choose { light = '#9170b5', dark = '#5f368d', },
32 - ui_important_local = choose { light = '#ae95c8', dark = '#4c2b72', },
25 + ui_normal = choose { light = '#929292', dark = '#e2e2e2' },
26 + ui_backdrop = choose { light = '#f9f9f9', dark = '#000000' },
27 + ui_accent = choose { light = '#d43dd4', dark = '#7a067a' },
28 + ui_minor = choose { light = '#d0d0d0', dark = '#424242' },
29 + ui_focus = choose { light = '#646464', dark = '#788984' },
30 + ui_unfocus = choose { light = '#c9c9c9', dark = '#121212' },
31 + ui_important_global = choose { light = '#9170b5', dark = '#5f368d' },
32 + ui_important_local = choose { light = '#ae95c8', dark = '#4c2b72' },

neovim/lua/bugabinga/options/behaviour.lua

Modified
1 1 local debug = require 'std.dbg'
2 +local const = require 'std.const'
2 3 local auto = require 'std.auto'
4 5 -- How many milliseconds must pass before neovim decides I was "idle"
54 55 -- disable popup menu on right click
55 56 vim.opt.mousemodel = 'extend'
57 --- integrate Nushell with nvim
58 -vim.opt.shell = 'nu'
59 -vim.opt.shellcmdflag = '--stdin --no-newline --commands'
60 -vim.opt.shellredir = 'out+err> %s'
61 -vim.opt.shellpipe = '| complete | update stderr { ansi strip } | tee { get stderr | save --force --raw %s} | into record'
62 -vim.opt.shelltemp = false
63 -vim.opt.shellxquote = ''
64 -vim.opt.shellxescape = ''
65 -vim.opt.shellquote = ''
58 +if vim.fn.executable 'nu' then
59 + -- integrate Nushell with nvim
60 + vim.opt.shell = 'nu'
61 + -- flags for nu:
62 + -- * `--stdin` redirect all input to -c
63 + -- * `--no-newline` do not append `\n` to stdout
64 + -- * `--commands` execute a command
65 + vim.opt.shellcmdflag = '--stdin --no-newline --commands'
66 + -- string to be used to put the output of shell commands in a temp file
67 + -- 1. when 'shelltemp' is `true`
68 + -- 2. in the `diff-mode` (`nvim -d file1 file2`) when `diffopt` is set
69 + -- to use an external diff command: `set diffopt-=internal`
70 + vim.opt.shellredir = 'out+err> "%s"'
71 + -- string to be used with `:make` command to:
72 + -- 1. save the stderr of `makeprg` in the temp file which Neovim reads using `errorformat` to populate the `quickfix` buffer
73 + -- 2. show the stdout, stderr on the screen
74 + -- NOTE: `ansi strip` removes all ansi coloring from nushell errors
75 + vim.opt.shellpipe =
76 + '| complete | get stderr stdout | str join (char nl) | ansi strip | tee { save --force --raw "%s" }'
77 + -- WARN: disable the usage of temp files for shell commands
78 + -- because Nu doesn't support `input redirection` which Neovim uses to send buffer content to a command:
79 + -- `{shell_command} < {temp_file_with_selected_buffer_content}`
80 + -- When set to `false` the stdin pipe will be used instead.
81 + -- NOTE: some info about `shelltemp`: https://github.com/neovim/neovim/issues/1008
82 + vim.opt.shelltemp = false
83 + vim.opt.shellxquote = ''
84 + vim.opt.shellxescape = ''
85 + vim.opt.shellquote = ''
86 +end
67 88 require 'bugabinga.health'.add_dependency
82 103 -- Show the effects of substitutions incrementally
83 104 vim.opt.inccommand = 'nosplit'
85 --- use ripgrep instead of grep
86 -vim.opt.grepprg = 'rg --hidden --vimgrep --no-heading --smart-case --'
87 -vim.opt.grepformat = '%f:%l:%c:%m'
106 +if vim.fn.executable 'rg' then
107 + -- use ripgrep instead of grep
108 + vim.opt.grepprg = 'rg --hidden --vimgrep --no-heading --smart-case -- '
109 + vim.opt.grepformat = '%f:%l:%c:%m'
110 +end
89 112 require 'bugabinga.health'.add_dependency
95 118 -- ask me to force failed commands
96 119 vim.opt.confirm = true
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,
134 +end

neovim/lua/bugabinga/options/keymaps.lua

Modified
1 1 local map = require 'std.map'
2 -local const = require 'bugabinga.const'
2 +local const = require 'std.const'
3 3 local togglers = require 'bugabinga.options.togglers'
5 5 -- set <SPACE> as leader key
10 10 vim.g.mapleader = ' '
11 11 vim.g.maplocalleader = ' '
13 -map.normal.visual {
14 - description = 'Yanks the selected text (in normal mode or visual mode) to the system clipboard.',
15 - category = 'editing',
16 - keys = '<leader>y',
17 - command = '"+y',
20 -map.normal {
21 - description = 'Pastes from the system clipboard (in normal mode or visual mode).',
22 - category = 'editing',
23 - keys = '<leader>p',
24 - command = '"+p',
27 -map.normal.visual {
28 - description = 'Yanks the entire line (when used in normal mode with motion).',
29 - category = 'editing',
30 - keys = '<leader>Y',
31 - command = '"+Y',
34 13 -- disable command history keymap, because i fatfinger it too often
35 14 map {
36 15 keys = 'q:',

neovim/lua/bugabinga/options/ui.lua

Modified
7 7 description = 'briefly highlight yanked text',
8 8 events = 'TextYankPost',
9 9 pattern = '*',
10 - command = function () vim.highlight.on_yank() end,
10 + command = function ()
11 + vim.highlight.on_yank {
12 + higroup = 'TextYankPost',
13 + timeout = 333,
14 + }
15 + end,
13 18 auto 'disable_columns_in_special_buffers' {
14 19 description = 'Hide columns in buffers, that do not show source code.',
15 - events = { 'FileType', },
20 + events = { 'FileType' },
16 21 pattern = ignored.filetypes,
17 22 command = function ()
18 23 dbg.print 'Hiding columns in buffers without source code'
90 95 vim.opt.foldenable = false
92 97 -- show visual indicators for lines too long
93 -vim.opt.colorcolumn = { '80', '120', '140', }
98 +vim.opt.colorcolumn = { '80', '120', '140' }
95 100 -- highlight the current line
96 101 vim.opt.cursorline = false

neovim/lua/bugabinga/plugins/bracketed.lua

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

neovim/lua/bugabinga/plugins/cmp.lua

Modified
11 11 'hrsh7th/cmp-buffer',
12 12 'hrsh7th/cmp-path',
13 13 'hrsh7th/cmp-nvim-lua',
14 + 'hrsh7th/cmp-nvim-lsp-signature-help',
15 + 'SergioRibera/cmp-dotenv',
14 16 'saadparwaiz1/cmp_luasnip',
15 17 'onsails/lspkind.nvim',
16 18 'L3MON4D3/LuaSnip',
48 50 ['<C-x>'] = cmp.mapping.complete(),
51 - local formatting = {}
52 - local ok, lspkind = pcall( require, 'lspkind' )
53 - if ok then
54 - formatting.format = lspkind.cmp_format {
55 - mode = 'symbol',
56 - symbol_map = {
57 - Copilot = icon.copilot,
58 - Class = icon.class,
59 - Color = icon.color,
60 - Constant = icon.constant,
61 - Constructor = icon.constructor,
62 - Enum = icon.enum,
63 - EnumMember = icon.enum_member,
64 - Event = icon.event,
65 - Field = icon.field,
66 - File = icon.file,
67 - Folder = icon.folder,
68 - Function = icon['function'],
69 - Interface = icon.interface,
70 - Keyword = icon.keyword,
71 - Method = icon.method,
72 - Module = icon.module,
73 - Operator = icon.operator,
74 - Property = icon.property,
75 - Reference = icon.reference,
76 - Snippet = icon.snippet,
77 - Struct = icon.struct,
78 - Text = icon.text,
79 - TypeParameter = icon.type_parameter,
80 - Unit = icon.unit,
81 - Value = icon.value,
82 - Variable = icon.variable,
83 - },
84 - menu = {
85 - buffer = '[buf]',
86 - nvim_lsp = '[LSP]',
87 - nvim_lua = '[nvim]',
88 - path = '[path]',
89 - luasnip = '[snip]',
90 - },
91 - }
92 - end
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,
94 106 local sources = {
107 + { name = 'copilot' }, -- FIXME: depends on incubating plugin!
95 108 { name = 'nvim_lua' },
109 + { name = 'nvim_lsp_signature_help' },
96 110 { name = 'nvim_lsp' },
111 + { name = 'dotenv' },
97 112 { name = 'path' },
98 - { name = 'luasnip' },
100 114 name = 'buffer',
101 115 keyword_length = 4,

neovim/lua/bugabinga/plugins/colorizer.lua

Modified
1 1 return {
3 - 'litoj/colorizer.nvim',
4 - commit = 'c1602ff3f11566bb7f16f90985b0c59d3d7db0ef',
5 - event = 'VeryLazy',
3 + 'brenoprata10/nvim-highlight-colors',
4 + commit = 'a411550ef85cae467b889ba7d1a96bd78332d90e',
5 + lazy = false,
6 + init = function ()
7 + vim.opt.termguicolors = true
8 + end,
6 9 opts = {
7 - filetypes = { '*' },
8 - user_default_options = {
9 - RGB = true, -- #RGB hex codes
10 - RRGGBB = true, -- #RRGGBB hex codes
11 - RRGGBBAA = true, -- #RRGGBBAA hex codes
12 - AARRGGBB = true, -- 0xAARRGGBB hex codes
13 - rgb_fn = true, -- CSS rgb() and rgba() functions
14 - hsl_fn = true, -- CSS hsl() and hsla() functions
15 - css = false, -- Enable all CSS features: rgb_fn, hsl_fn, names, RGB, RRGGBB
16 - css_fn = false, -- Enable all CSS *functions*: rgb_fn, hsl_fn
17 - -- Available modes for `mode`: foreground, background, virtualtext
18 - mode = 'virtualtext', -- Set the display mode.
19 - -- names = function () return require 'bugabinga.nugu.palette' end,
20 - -- parsers can contain values used in |user_default_options|
21 - sass = { enable = false, parsers = { 'css' } }, -- Enable sass colors
22 - virtualtext = '██',
23 - -- update color values even if buffer is not focused
24 - -- example use: cmp_menu, cmp_docs
25 - always_update = false,
26 - },
27 - -- all the sub-options of filetypes apply to buftypes
28 - buftypes = {
29 - '*',
30 - '!prompt',
31 - '!popup',
32 - '!nofile',
33 - },
10 + render = 'virtual',

neovim/lua/bugabinga/plugins/conform.lua

Modified
25 25 cmd = { 'ConformInfo' },
26 26 opts = {
27 27 formatters_by_ft = {
28 - -- https://github.com/razziel89/mdslw/issues/14
29 - markdown = { 'mdslw' },
30 - -- lua = { "stylua" },
31 28 toml = { 'taplo' },
32 29 sh = { 'shfmt' },
33 30 just = { 'just' },
34 - nu = { 'nufmt' },
35 31 zig = { 'zigfmt' },
36 32 -- Use the "*" file type to run formatters on all file types.
37 33 ['*'] = { 'injected', 'typos' },
39 35 -- have other formatters configured.
40 36 ['_'] = { 'trim_whitespace', 'trim_newlines' },
42 - formatters = {
43 - mdslw = {
44 - -- remove `:` from the default set of end markers
45 - -- prepend_args = { '--end-markers', '?!.', },
46 - },
47 - },
48 38 log_level = debug.get() and vim.log.levels.TRACE or vim.log.levels.INFO,
50 40 init = function ()

neovim/lua/bugabinga/plugins/genghis.lua

Modified
1 -local const = require 'bugabinga.const'
1 +local const = require 'std.const'
2 2 if const.win32 then
3 3 require 'bugabinga.health'.add_dependency {
4 4 name_of_executable = 'recycle-bin',

neovim/lua/bugabinga/plugins/heirline.lua

Modified
236 + -- FIXME: still incubating
237 + local lsp_dr_count = {
238 + condition = conditions.lsp_attached,
239 + update = { 'CursorMoved' },
240 + provider = function ()
241 + local lsp_count = prequire 'dr-lsp'.lspCount()
242 + return lsp_count and lsp_count:gsub( 'LSP', '' )
243 + end,
236 246 local lsp_active = {
237 247 condition = conditions.lsp_attached,
238 - -- FIXME: updates from parent components do not seem to update children,
239 - -- if those have their own updates?
240 248 update = { 'LspAttach', 'LspDetach', 'BufEnter', 'BufLeave' },
242 250 provider = function ()
474 482 space,
475 483 escape_status,
476 484 space,
485 + lsp_dr_count,
486 + space,
477 487 lsp_active,
478 488 space,
479 489 file_encoding,

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

Added
new file mode 100644
1 +local map = require 'std.map'
3 +map.insert {
4 + description = 'Moves in or out of balanced tokens',
5 + category = 'editing',
6 + keys = '<c-space>',
7 + command = function () require 'in-and-out'.in_and_out() end,
8 +}
10 +return {
11 + 'ysmb-wtsg/in-and-out.nvim',
12 + commit = 'ab24cafadc3418dffb0c7e9b0621cff60b9ac551',
13 + event = 'VeryLazy',

neovim/lua/bugabinga/plugins/incubator.lua

Added
new file mode 100644
1 +-- this file lists plugins in their "incubation" phase.
2 +-- that means i am testing those out of curiosity, but am not sure yet i wish
3 +-- to use and depend on them.
5 +-- global toggle for all incubating plugins. set to false to quickly, but
6 +-- temporarily, get rid of all incubating plugins.
7 +local FUCK_STABILITY = true
9 +local ignored = require 'std.ignored'
10 +local icon = require 'std.icon'
12 +return {
13 + -------------------------------------------------------------------------------
14 + {
15 + 'gregorias/toggle.nvim',
16 + lazy = false,
17 + version = '2.0',
18 + config = true,
19 + enable = FUCK_STABILITY,
20 + },
21 + -------------------------------------------------------------------------------
22 + {
23 + 'zbirenbaum/copilot-cmp',
24 + event = 'InsertEnter',
25 + config = function () require 'copilot_cmp'.setup() end,
26 + dependencies = {
27 + 'zbirenbaum/copilot.lua',
28 + cmd = 'Copilot',
29 + config = function ()
30 + require 'copilot'.setup {
31 + suggestion = { enabled = false },
32 + panel = { enabled = false },
33 + }
34 + end,
35 + },
36 + enable = FUCK_STABILITY,
37 + },
38 + -------------------------------------------------------------------------------
39 + {
40 + -- FIXME: if view stays open, when saving session, reloading the session results in borked view.
41 + 'amrbashir/nvim-docs-view',
42 + keys = {
43 + {
44 + '<leader>tk',
45 + '<cmd>DocsViewToggle<cr>',
46 + mode = { 'n' },
47 + desc = 'Toggle stable documentation panel.',
48 + },
49 + },
50 + cmd = 'DocsViewToggle',
51 + opts = {
52 + position = 'right',
53 + width = 69,
54 + },
55 + enable = FUCK_STABILITY,
56 + },
57 + -------------------------------------------------------------------------------
58 + {
59 + -- TODO: look into demicolon.nvim for ,; repition
60 + 'mawkler/refjump.nvim',
61 + dependencies = {
63 + },
64 + keys = { ']r', '[r' },
65 + opts = {},
66 + enable = FUCK_STABILITY,
67 + },
68 + -------------------------------------------------------------------------------
69 + {
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 + enable = FUCK_STABILITY,
82 + },
83 + -------------------------------------------------------------------------------
84 + {
85 + 'chrisgrieser/nvim-rulebook',
86 + keys = {
87 + { '<leader>ri', function () require 'rulebook'.ignoreRule() end },
88 + { '<leader>rl', function () require 'rulebook'.lookupRule() end },
89 + { '<leader>ry', function () require 'rulebook'.yankDiagnosticCode() end },
90 + { '<leader>sf', function () require 'rulebook'.suppressFormatter() end, mode = { 'n', 'x' } },
91 + },
92 + enable = FUCK_STABILITY,
93 + },
94 + -------------------------------------------------------------------------------
95 + {
96 + 'chrisgrieser/nvim-dr-lsp',
97 + event = 'LspAttach',
98 + opts = {},
99 + enable = FUCK_STABILITY,
100 + },
101 + -------------------------------------------------------------------------------
103 + 'Wansmer/symbol-usage.nvim',
104 + event = 'LspAttach',
105 + opts = {},
106 + enable = FUCK_STABILITY,
107 + },
108 + -------------------------------------------------------------------------------
110 + -- FIXME: no worky in wezterm ?
111 + -- mouse idle seems to send no event.
112 + 'soulis-1256/eagle.nvim',
113 + lazy = false,
114 + init = function ()
115 + vim.o.mousemoveevent = true
116 + end,
117 + enable = FUCK_STABILITY,
118 + },
119 + -------------------------------------------------------------------------------
121 + 'quentingruber/timespent.nvim',
122 + keys = {
124 + '<leader>tS',
125 + '<cmd>:ShowTimeSpent<cr>',
126 + mode = { 'n' },
127 + desc = 'Show time spent',
128 + },
129 + },
130 + enable = FUCK_STABILITY,
131 + },
132 + -------------------------------------------------------------------------------
134 + 'nvim-telescope/telescope-frecency.nvim',
135 + config = function ()
136 + require 'telescope'.load_extension 'frecency'
137 + end,
138 + keys = {
140 + '<c-p><c-f>',
141 + '<cmd>Telescope frecency<cr>',
142 + mode = { 'n' },
143 + desc = 'telescope: Show recently and frequently used files.',
144 + },
145 + },
146 + enable = FUCK_STABILITY,
147 + },
150 + 'cenk1cenk2/scratch.nvim',
151 + enable = FUCK_STABILITY,
152 + },
153 + -------------------------------------------------------------------------------
155 + 'AdeAttwood/ivy.nvim',
156 + lazy = false,
157 + build = 'cargo build --release',
158 + opts = {},
159 + enable = FUCK_STABILITY,
160 + },
161 + -------------------------------------------------------------------------------
163 + 'roobert/surround-ui.nvim',
164 + lazy = false,
165 + dependencies = {
166 + 'kylechui/nvim-surround',
167 + 'folke/which-key.nvim',
168 + },
169 + opts = {
170 + root_key = 'ms',
171 + },
172 + enable = FUCK_STABILITY,
173 + },
174 + -------------------------------------------------------------------------------
176 + 'rachartier/tiny-inline-diagnostic.nvim',
177 + event = 'LspAttach',
178 + config = function ()
179 + require 'tiny-inline-diagnostic'.setup()
180 + end,
181 + enable = FUCK_STABILITY,
182 + },
183 + -------------------------------------------------------------------------------
185 + 'winston0410/range-highlight.nvim',
186 + lazy = false,
187 + dependencies = { 'winston0410/cmd-parser.nvim' },
188 + opts = { highlight = 'Visual' },
189 + enable = FUCK_STABILITY,
190 + },
191 + -------------------------------------------------------------------------------
193 + 'chrisgrieser/nvim-lsp-endhints',
194 + event = 'LspAttach',
195 + opts = {
196 + icons = {
197 + type = icon.type .. ' ',
198 + parameter = icon.paramter,
199 + offspec = '', -- hint kind not defined in official LSP spec
200 + unknown = icon.hint, -- hint kind
201 + },
202 + label = {
203 + padding = 2,
204 + },
205 + },
206 + enable = FUCK_STABILITY,
207 + },
208 + -------------------------------------------------------------------------------
210 + -- FIXME: does not seem to worky? at least for lua.
211 + 'zbirenbaum/neodim',
212 + event = 'LspAttach',
213 + opts = {},
214 + enable = FUCK_STABILITY,
215 + },
216 + -------------------------------------------------------------------------------
218 + 'rafcamlet/nvim-luapad',
219 + cmd = { 'Luapad', 'LuaRun' },
220 + opts = {},
221 + enable = FUCK_STABILITY,
223 + },
224 + -------------------------------------------------------------------------------
226 + 'ravibrock/spellwarn.nvim',
227 + event = 'VeryLazy',
228 + config = true,
229 + enable = FUCK_STABILITY,
230 + },
231 + -------------------------------------------------------------------------------
233 + 'emmanueltouzery/decisive.nvim',
234 + config = function ()
235 + require 'decisive'.setup {}
236 + end,
237 + lazy = true,
238 + ft = { 'csv' },
239 + keys = {
240 + { '<leader>cca', ":lua require('decisive').align_csv({})<cr>", { silent = true }, desc = 'Align CSV', mode = 'n' },
241 + { '<leader>ccA', ":lua require('decisive').align_csv_clear({})<cr>", { silent = true }, desc = 'Align CSV clear', mode = 'n' },
242 + { '[c', ":lua require('decisive').align_csv_prev_col()<cr>", { silent = true }, desc = 'Align CSV prev col', mode = 'n' },
243 + { ']c', ":lua require('decisive').align_csv_next_col()<cr>", { silent = true }, desc = 'Align CSV next col', mode = 'n' },
244 + },
245 + enable = FUCK_STABILITY,
246 + },
247 + -------------------------------------------------------------------------------
249 + 'tris203/precognition.nvim',
250 + event = 'VeryLazy',
251 + opts = {
252 + startVisible = true,
253 + showBlankVirtLine = true,
254 + highlightColor = { link = 'LineNr' },
255 + -- hints = {
256 + -- Caret = { text = "^", prio = 2 },
257 + -- Dollar = { text = "$", prio = 1 },
258 + -- MatchingPair = { text = "%", prio = 5 },
259 + -- Zero = { text = "0", prio = 1 },
260 + -- w = { text = "w", prio = 10 },
261 + -- b = { text = "b", prio = 9 },
262 + -- e = { text = "e", prio = 8 },
263 + -- W = { text = "W", prio = 7 },
264 + -- B = { text = "B", prio = 6 },
265 + -- E = { text = "E", prio = 5 },
266 + -- },
267 + -- gutterHints = {
268 + -- G = { text = "G", prio = 10 },
269 + -- gg = { text = "gg", prio = 9 },
270 + -- PrevParagraph = { text = "{", prio = 8 },
271 + -- NextParagraph = { text = "}", prio = 8 },
272 + -- },
273 + disabled_fts = ignored.filetypes,
274 + },
275 + enable = FUCK_STABILITY,
276 + },
277 + -------------------------------------------------------------------------------
279 + 'folke/lazydev.nvim',
280 + dependencies = { 'justinsgithub/wezterm-types' },
281 + ft = 'lua', -- only load on lua files
282 + opts = {
283 + library = {
284 + -- Or relative, which means they will be resolved from the plugin dir.
285 + 'lazy.nvim',
286 + -- It can also be a table with trigger words / mods
287 + -- Only load luvit types when the `vim.uv` word is found
288 + { path = 'luvit-meta/library', words = { 'vim%.uv' } },
289 + -- Load the wezterm types when the `wezterm` module is required
290 + -- Needs `justinsgithub/wezterm-types` to be installed
291 + { path = 'wezterm-types', mods = { 'wezterm' } },
292 + },
293 + },
294 + enable = FUCK_STABILITY,
295 + },
297 + 'shortcuts/no-neck-pain.nvim',
298 + lazy = false,
299 + enable = FUCK_STABILITY,
300 + },
301 + -------------------------------------------------------------------------------
303 + -- TODO: bind IMove* to alt+h and alt+l with fallback to gomove
304 + -- NOTE: if this one does not work out, check https://github.com/Wansmer/sibling-swap.nvim
305 + 'mizlan/iswap.nvim',
306 + event = 'VeryLazy',
307 + enable = FUCK_STABILITY,
308 + },
309 + -------------------------------------------------------------------------------
311 + 'mfussenegger/nvim-dap',
312 + dependencies = {
314 + 'debugloop/layers.nvim',
315 + opts = {},
316 + },
317 + },
318 + keys = {
320 + '<leader>d',
321 + function ()
322 + local dap = require 'dap'
323 + if dap.session() ~= nil then
324 + DEBUG_MODE:activate()
325 + return
326 + end
327 + dap.continue()
328 + end,
329 + desc = 'launch debugger',
330 + },
331 + opts = {},
332 + config = function ( _, opts )
333 + local dap = require 'dap'
334 + -- do the setup you'd do anyway for your language of choice
335 + dap.adapters = opts.adapters
336 + dap.configurations = opts.configurations
337 + -- this is where the example starts
338 + DEBUG_MODE = Layers.mode.new() -- global, accessible from anywhere
339 + DEBUG_MODE:auto_show_help()
340 + -- this actually relates to the next example, but it is most convenient to add here
341 + DEBUG_MODE:add_hook( function ( _ )
342 + vim.cmd 'redrawstatus' -- update status line when toggled
343 + end )
344 + -- nvim-dap hooks
345 + dap.listeners.after.event_initialized['debug_mode'] = function ()
346 + DEBUG_MODE:activate()
347 + end
348 + dap.listeners.before.event_terminated['debug_mode'] = function ()
349 + DEBUG_MODE:deactivate()
350 + end
351 + dap.listeners.before.event_exited['debug_mode'] = function ()
352 + DEBUG_MODE:deactivate()
353 + end
354 + -- map our custom mode keymaps
355 + DEBUG_MODE:keymaps {
356 + n = {
358 + 's',
359 + function ()
360 + dap.step_over()
361 + end,
362 + { desc = 'step forward' },
363 + },
365 + 'c',
366 + function ()
367 + dap.continue()
368 + end,
369 + { desc = 'continue' },
370 + },
371 + { -- this acts as a way to leave debug mode without quitting the debugger
372 + '<esc>',
373 + function ()
374 + DEBUG_MODE:deactivate()
375 + end,
376 + { desc = 'exit' },
377 + },
378 + },
380 + end,
381 + },
382 + enable = FUCK_STABILITY,
383 + },

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

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

neovim/lua/bugabinga/plugins/telescope.lua

Modified
64 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,
67 74 map.normal {
68 75 description = 'Open search for current buffer content...',
69 76 category = 'search',
97 104 build =
98 105 function ( plugin_spec )
99 106 local result
100 - result = vim.system( { 'cmake', '-S.', '-Bbuild', '-DCMAKE_BUILD_TYPE=Release', },
101 - { text = true, cwd = plugin_spec.dir, } ):wait()
107 + result = vim.system( { 'cmake', '-S.', '-Bbuild', '-DCMAKE_BUILD_TYPE=Release' },
108 + { text = true, cwd = plugin_spec.dir } ):wait()
102 109 if result.code ~= 0 then error( result.stderr ) end
103 - result = vim.system( { 'cmake', '--build', 'build', '--config', 'Release', },
104 - { text = true, cwd = plugin_spec.dir, } ):wait()
110 + result = vim.system( { 'cmake', '--build', 'build', '--config', 'Release' },
111 + { text = true, cwd = plugin_spec.dir } ):wait()
105 112 if result.code ~= 0 then error( result.stderr ) end
106 - result = vim.system( { 'cmake', '--install', 'build', '--prefix', 'build', },
107 - { text = true, cwd = plugin_spec.dir, } ):wait()
113 + result = vim.system( { 'cmake', '--install', 'build', '--prefix', 'build' },
114 + { text = true, cwd = plugin_spec.dir } ):wait()
108 115 if result.code ~= 0 then error( result.stderr ) end
113 120 'nvim-telescope/telescope-symbols.nvim',
114 121 'jvgrootveld/telescope-zoxide',
115 122 'AckslD/nvim-neoclip.lua',
123 + 'debugloop/telescope-undo.nvim',
117 125 config = function ()
118 126 local telescope = require 'telescope'
119 127 local actions = require 'telescope.actions'
120 128 local themes = require 'telescope.themes'
122 - local ivy = themes.get_ivy { layout_config = { preview_width = 0.23, }, }
130 + local ivy = themes.get_ivy { layout_config = { preview_width = 0.23 } }
124 132 telescope.setup {
125 133 defaults = {
145 153 ['<c-s>'] = actions.file_split,
146 154 ['g?'] = actions.which_key,
148 - n = { q = actions.close, },
156 + n = { q = actions.close },
151 159 pickers = {
160 168 help_tags = ivy,
162 170 extensions = {
163 - zoxide = { prompt_title = 'Navigate deez nuts!', },
171 + zoxide = { prompt_title = 'Navigate deez nuts!' },
169 177 telescope.load_extension 'fzf'
170 178 telescope.load_extension 'zoxide'
171 179 telescope.load_extension 'neoclip'
180 + telescope.load_extension 'undo'

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

Modified
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,
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,
21 +map.normal {
22 + description = 'Show TODOs',
23 + category = 'navigation',
24 + keys = '<leader>T',
25 + command = '<cmd>TodoQuickFix<cr>',
1 28 return {
2 29 'folke/todo-comments.nvim',
3 30 version = '1.*',
4 - dependencies = { 'nvim-lua/plenary.nvim', },
5 31 event = 'VeryLazy',
32 + dependencies = { 'nvim-lua/plenary.nvim' },
6 33 opts = {},

neovim/lua/bugabinga/save_actions.lua

Modified
10 10 vim.iter( all_actions ):each(
11 11 function ( action )
12 12 vim.validate {
13 - action = { action, 'string', },
13 + action = { action, 'string' },
15 15 local parsed_command = vim.api.nvim_parse_cmd( action, {} )
16 - vim.api.nvim_cmd( parsed_command, { output = true, } )
16 + ---@diagnostic disable-next-line: param-type-mismatch
17 + vim.api.nvim_cmd( parsed_command, { output = true } )
24 25 user_command.SaveActions 'Execute all declared save actions' ( apply_save_actions )
26 -map.normal.visual {
27 +map.normal.insert.visual {
27 28 description = 'Save all buffers and apply save actions',
28 29 category = 'actions',
29 30 keys = '<c-s>',

neovim/lua/bugabinga/sessions.lua

Modified
4 4 local map = require 'std.map'
5 5 local auto = require 'std.auto'
7 7 local sessions = vim.fs.normalize( vim.fn.stdpath 'data' .. '/sessions' )
8 8 vim.fn.mkdir( sessions, 'p' )
10 --- FIXME: this needs to live somewhere in std
11 10 local file_exists = function ( path )
12 11 local stat = vim.uv.fs_stat( path )
13 12 ---@diagnostic disable-next-line: undefined-field
14 13 local encode = function ( data )
15 - vim.validate { data = { data, 'string', }, }
14 + vim.validate { data = { data, 'string' } }
17 16 -- replace some chars in base64, that are not allowed in file names.
18 17 return vim.base64.encode( data ):gsub( '%+', '-' ):gsub( '%/', '.' ):gsub( '%=', '_' )
21 20 local decode = function ( data )
22 - vim.validate { data = { data, 'string', }, }
21 + vim.validate { data = { data, 'string' } }
23 22 return vim.base64.decode( data:gsub( '%-', '+' ):gsub( '%.', '/' ):gsub( '%_', '=' )
33 32 local save_session_for_cwd = function ()
34 33 local cwd = vim.uv.cwd()
35 34 local session_save_path = to_session_path( cwd )
36 - vim.cmd.mksession { session_save_path, bang = true, }
35 + vim.cmd.mksession { session_save_path, bang = true }
39 38 local load_session = function ( session )
40 39 local session_path = vim.fs.normalize( sessions .. '/' .. session )
42 41 if file_exists( session_path ) then
43 - vim.cmd.source { session_path, }
42 + vim.cmd.source { session_path }
45 44 vim.notify( 'No session `' .. session .. '` found!' )

neovim/lua/patches/init.lua

Added
new file mode 100644
1 +require 'patches.snippet'

neovim/lua/patches/snippet.lua

Added
new file mode 100644
1 +--- source https://boltlessengineer.github.io/posts/neovim-config-without-plugins/
2 +---
3 +---@param trigger string trigger string for snippet
4 +---@param body string snippet text that will be expanded
5 +---@param opts? vim.keymap.set.Opts
6 +---
7 +---Refer to <https://microsoft.github.io/language-server-protocol/specification/#snippet_syntax>
8 +---for the specification of valid body.
9 +function vim.snippet.add( trigger, body, opts )
10 + vim.keymap.set( 'ia', trigger, function ()
11 + -- If abbrev is expanded with keys like "(", ")", "<cr>", "<space>",
12 + -- don't expand the snippet. Only accept "<c-]>" as trigger key.
13 + local c = vim.fn.nr2char( vim.fn.getchar( 0 ) )
14 + if c ~= '' then
15 + vim.api.nvim_feedkeys( trigger .. c, 'i', true )
16 + return
17 + end
18 + vim.snippet.expand( body )
19 + end, opts )
20 +end

neovim/lua/std/const.lua

Added
new file mode 100644
1 +return {
2 + win32 = vim.loop.os_uname().sysname:match 'Win',
3 + wsl2 = vim.loop.os_uname().release:match 'WSL2',
4 + os_background = (function ()
5 + -- Default value
6 + local background = 'light'
7 + local uname = vim.uv.os_uname()
8 + -- First check whether we are on WSL or Windows
9 + if vim.loop.os_uname().release:match 'WSL2' then
10 + -- Check if 'reg.exe' is executable
11 + if vim.fn.executable 'reg.exe' ~= 0 then
12 + -- Execute command to check if the win32 appearance is set to Dark
13 + local appsUseLightTheme = vim.fn.system { 'reg.exe', 'Query',
14 + 'HKCU\\SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Themes\\Personalize', '/v', 'AppsUseLightTheme' }
15 + if not appsUseLightTheme:find '0x1' then
16 + background = 'dark'
17 + end
18 + end
19 + -- Check if 'busctl' is executable (part of systemd)
20 + elseif vim.fn.executable 'busctl' ~= 0 then
21 + -- Get the current color scheme from xdg-desktop-portal using busctl
22 + local result = vim.fn.system {
23 + 'busctl', '--user', 'call', 'org.freedesktop.portal.Desktop', '/org/freedesktop/portal/desktop',
24 + 'org.freedesktop.portal.Settings', 'ReadOne', 'ss', 'org.freedesktop.appearance', 'color-scheme',
25 + }
26 + -- The result is in the form of "v u 0" for light and "v u 1" for dark
27 + local color_scheme = result:match 'u%s+(%d+)'
29 + if color_scheme == '1' then
30 + background = 'dark'
31 + end
32 + else
33 + end
35 + return background
36 + end)(),

neovim/lua/std/icon.lua

Modified
31 31 exclaim = '',
32 32 extends = '❯',
33 33 failed = ' ',
34 + type = '󱔞',
35 + parameter = '',
34 36 field = ' ',
35 37 file = '',
36 38 folder = '',
108 110 virtual = '󰢔',
109 111 visual = '󰒉',
110 112 warn = '󰱯',
111 - wrap = '󰖶'
113 + wrap = '󰖶',

neovim/lua/std/ignored.lua

Modified
1 +-- TODO: add functions to add stuff to lists so that plugins can register these
2 +-- and they get cleaned up when plugins get removed
1 3 local filetypes = {
2 4 'NvimTree',
3 5 'Outline',
8 10 '^git.*',
9 11 'flash_prompt',
10 12 'help',
13 + 'ivy',
11 14 'lazy',
12 15 'noice',
13 16 'notify',
16 19 'starter',
17 20 'svn',
18 21 'toggleterm',
22 + 'copilot-chat',
21 25 local buftypes = {

wezterm/bugabinga/code_font.lua

Modified
1 1 local wez = require 'wezterm'
3 -return {
4 - random = function ()
5 - local selected = 'JetBrains Mono' -- safe default, because built in to wezterm
6 - local font_names = {}
7 - local weights = {}
8 - local total_weight = 1 -- to account for luas 1 based indexing
9 - local code_fonts = io.open( wez.config_dir .. '/bugabinga/code_fonts.csv', 'r' )
11 - if code_fonts then
12 - for line in code_fonts:lines() do
13 - local weight, font_name = line:match '^%s*(%d*)%s*,%s*(.*)%s*$'
14 - table.insert( font_names, font_name )
15 - table.insert( weights, tonumber( weight ) )
16 - total_weight = total_weight + weight
3 +local adjust_font_randomness_weight = function ( font_family, adjust )
4 + local code_fonts = io.open( wez.config_dir .. '/bugabinga/code_fonts.csv', 'r+' )
5 + if code_fonts then
6 + local new_lines = {}
7 + for line in code_fonts:lines() do
8 + local weight, font_name = line:match '^%s*(%d+)%s*,%s*(.-)%s*$'
9 + if not weight or not font_name then
10 + wez.log_error 'Could not parse code_fonts.csv. Borked?'
11 + return
18 - code_fonts:close()
13 + weight = tonumber( weight )
14 + if font_name == font_family then
15 + weight = math.max( 0, adjust( weight ) )
16 + end
17 + table.insert( new_lines, weight .. ', ' .. font_name )
18 + end
19 + code_fonts:seek( 'set', 0 )
20 + for _, new_line in ipairs( new_lines ) do
21 + code_fonts:write( new_line, '\n' )
22 + end
23 + code_fonts:close()
24 + else
25 + wez.log_error 'Unable to read and write code_fonts.csv!'
26 + end
27 +end
20 - local random_weight = math.random( total_weight )
21 - local cursor = 0
22 - for idx, weight in ipairs( weights ) do
23 - cursor = cursor + weight
24 - if cursor >= random_weight then
25 - selected = font_names[idx]
26 - break
27 - end
29 +-- like the current font.
30 +-- liked fonts have higher probablity of being picked on wezterm boot.
31 +-- increase the weight of the font in code_fonts.csv.
32 +-- not to be confused with a font weigth (aka bold).
33 +-- here weight means the likelyhood of being "randomly" picked.
34 +local like_current_font = function ( window )
35 + local font = window:effective_config().font.font
36 + -- not sure why font is a list
37 + local family = font[1].family
38 + adjust_font_randomness_weight( family, function ( weight )
39 + local new_weight = weight + 1
40 + -- TODO: remove notification once weight is displayed in status
41 + window:toast_notification( 'code_fonts', 'Font ' .. family .. '(' .. new_weight .. ') liked! ', nil, 500 )
42 + return new_weight
43 + end )
44 +end
46 +local dislike_current_font = function ( window )
47 + local font = window:effective_config().font.font
48 + -- not sure why font is a list
49 + local family = font[1].family
50 + adjust_font_randomness_weight( family, function ( weight )
51 + local new_weight = weight - 1
52 + window:toast_notification( 'code_fonts', 'Font ' .. family .. '(' .. new_weight .. ') NOT liked! ', nil, 500 )
53 + return new_weight
54 + end )
55 +end
57 +local ban_current_font = function ( window )
58 + local font = window:effective_config().font.font
59 + -- not sure why font is a list
60 + local family = font[1].family
61 + adjust_font_randomness_weight( family, function ()
62 + window:toast_notification( 'code_fonts', 'Font ' .. family .. ' BANNED!', nil, 500 )
63 + return 0
64 + end )
65 +end
67 +-- register those events with wezterm, so that key binds can trigger them
68 +wez.on( 'like-current-font', like_current_font )
69 +wez.on( 'dislike-current-font', dislike_current_font )
70 +wez.on( 'ban-current-font', ban_current_font )
72 +local random = function ()
73 + local selected = 'JetBrains Mono' -- safe default, because built in to wezterm
74 + local font_names = {}
75 + local weights = {}
76 + local total_weight = 1 -- to account for luas 1 based indexing
77 + local code_fonts = io.open( wez.config_dir .. '/bugabinga/code_fonts.csv', 'r' )
79 + if code_fonts then
80 + for line in code_fonts:lines() do
81 + local weight, font_name = line:match '^%s*(%d+)%s*,%s*(.-)%s*$'
82 + if not weight or not font_name then
83 + wez.log_error 'Could not parse code_fonts.csv. Borked?'
84 + break
85 + end
86 + weight = tonumber( weight )
87 + table.insert( font_names, font_name )
88 + table.insert( weights, weight )
89 + total_weight = total_weight + weight
90 + end
91 + code_fonts:close()
93 + local random_weight = math.random( total_weight )
94 + local cursor = 0
95 + for idx, weight in ipairs( weights ) do
96 + cursor = cursor + weight
97 + if cursor >= random_weight then
98 + selected = font_names[idx]
99 + break
102 + end
31 - return wez.font( selected )
32 - end,
104 + return wez.font( selected )
105 +end
107 +return {
108 + like_current_font = like_current_font,
109 + dislike_current_font = dislike_current_font,
110 + ban_current_font = ban_current_font,
111 + random = random,

wezterm/bugabinga/code_fonts.csv

Modified
1 - 1, Anonymous Pro
2 - 1, Anonymous Pro Minus
3 - 1, Aurulent Sans Mono
4 - 1, AverageMono
5 - 1, BPmono
6 - 1, BigBlue TerminalPlus
7 - 1, Bitstream Vera Sans Mono
8 - 1, Bront
9 - 1, CMU Typewriter Text
10 - 1, CPMono_v07
11 - 1, CamingoCode
12 - 1, Cascadia Code
13 - 1, Code New Roman
14 - 1, CodingFontTobi
15 - 1, Consola Mono
16 - 1, Courier Prime Code
17 - 1, Cousine
18 - 1, Crisp
19 - 1, Cutive Mono
20 - 1, D2Coding
21 - 1, DejaVu Sans Mono
22 - 1, Dina ttf 10px
23 - 1, Droid Sans Mono
24 - 1, Edlo
25 - 1, Envy Code R
26 - 1, Fantasque Sans Mono
27 - 1, Fira Code
28 - 1, Fira Mono
29 - 1, Fixedsys Excelsior 3.01
30 - 1, FreeMono
31 - 1, Geist Mono
32 - 1, Generic Mono II
33 - 1, GohuFont
34 - 1, Hack
35 - 1, Hasklig
36 - 10, Hermit
37 - 10, IBM Plex Mono
38 - 1, Inconsolata
39 - 1, Inconsolata LGC
40 - 1, Inconsolata-dz
41 - 1, Inconsolata-g
42 - 1, Intel One Mono
43 - 1, Iosevka
44 - 1, Iosevka Slab
45 - 1, JetBrains Mono
46 - 1, JetBrains Mono NL
47 - 1, Kawkab Mono
48 - 1, Latin Modern Mono Light
49 - 10, Lekton
50 - 1, Liberation Mono
51 - 1, Lilex
52 - 1, Linux Libertine Mono
53 - 1, Luculent
54 - 1, Luxi Mono
55 - 1, M+ 1m
56 - 1, M+ 1mn
57 - 1, M+ 2m
58 - 1, Martian Mono
59 - 1, Mensch
60 - 0, Meslo LG M DZ
61 - 1, Metrickal
62 - 1, Monaspace Argon Var
63 - 1, Monaspace Krypton Var
64 - 1, Monaspace Neon Var
65 - 1, Monaspace Radon Var
66 - 1, Monaspace Xenon Var
67 - 1, MonoSpatial
68 - 1, Monoid
69 - 1, Monospace
70 - 1, MonteCarlo Fixed 12
71 - 1, NanumGothic_Coding
72 - 1, NotCourierSans
73 - 1, Office Code Pro
74 - 1, Office Code Pro D
75 - 1, Oxygen Mono
76 - 1, PT Mono
77 - 1, Panic Sans
78 - 0, PixelCarnageMonoTT
79 - 1, Pointfree
80 - 1, ProFontWindows
81 - 1, ProggyCleanTT
82 - 1, ProggyCleanTTSZ
83 - 1, ProggySmallTT
84 - 1, ProggySquareTT
85 - 1, ProggySquareTTSZ
86 - 1, ProggyTinyTT
87 - 1, ProggyTinyTTSZ
88 - 1, Rec Mono Casual
89 - 1, Rec Mono Linear
90 - 1, Roboto Mono
91 - 1, SV Basic Manual
92 - 1, Share Tech Mono
93 - 1, Share-TechMonoTrue
94 - 1, SmallTypeWriting
95 - 1, Source Code Pro
96 - 1, Sudo
97 - 1, Symbols Nerd Font
98 - 1, Symbols Nerd Font Mono
99 - 1, TeX Gyre Cursor
100 - 1, Terminus
101 - 1, Ubuntu Mono
102 - 1, Verily Serif Mono
103 - 1, Victor Mono
104 - 1, Whois
105 - 1, agave
106 - 1, iA Writer Mono V
107 - 1, monoOne
108 - 1, monofur
109 - 1, mononoki
110 - 20, saxMono
1 +1, Anonymous Pro
2 +1, Anonymous Pro Minus
3 +1, Aurulent Sans Mono
4 +1, AverageMono
5 +1, BPmono
6 +1, BigBlue TerminalPlus
7 +1, Bitstream Vera Sans Mono
8 +1, Bront
9 +1, CMU Typewriter Text
10 +1, CPMono_v07
11 +1, CamingoCode
12 +1, Cascadia Code
13 +1, Code New Roman
14 +1, CodingFontTobi
15 +1, Consola Mono
16 +1, Courier Prime Code
17 +1, Cousine
18 +1, Crisp
19 +1, Cutive Mono
20 +1, D2Coding
21 +1, DejaVu Sans Mono
22 +1, Dina ttf 10px
23 +1, Droid Sans Mono
24 +1, Edlo
25 +1, Envy Code R
26 +1, Fantasque Sans Mono
27 +1, Fira Code
28 +1, Fira Mono
29 +1, Fixedsys Excelsior 3.01
30 +1, FreeMono
31 +1, Geist Mono
32 +20, Generic Mono II
33 +1, GohuFont
34 +1, Hack
35 +1, Hasklig
36 +11, Hermit
37 +11, IBM Plex Mono
38 +1, Inconsolata
39 +1, Inconsolata LGC
40 +1, Inconsolata-dz
41 +1, Inconsolata-g
42 +1, Intel One Mono
43 +1, Iosevka
44 +1, Iosevka Slab
45 +0, JetBrains Mono
46 +0, JetBrains Mono NL
47 +1, Kawkab Mono
48 +1, Latin Modern Mono Light
49 +11, Lekton
50 +1, Liberation Mono
51 +1, Lilex
52 +1, Linux Libertine Mono
53 +1, Luculent
54 +1, Luxi Mono
55 +1, M+ 1m
56 +1, M+ 1mn
57 +1, M+ 2m
58 +1, Martian Mono
59 +1, Mensch
60 +0, Meslo LG M DZ
61 +1, Metrickal
62 +1, Monaspace Argon Var
63 +1, Monaspace Krypton Var
64 +1, Monaspace Neon Var
65 +1, Monaspace Radon Var
66 +1, Monaspace Xenon Var
67 +1, MonoSpatial
68 +1, Monoid
69 +1, Monospace
70 +1, MonteCarlo Fixed 12
71 +1, NanumGothic_Coding
72 +1, NotCourierSans
73 +1, Office Code Pro
74 +1, Office Code Pro D
75 +6, Oxygen Mono
76 +1, PT Mono
77 +1, Panic Sans
78 +0, PixelCarnageMonoTT
79 +1, Pointfree
80 +1, ProFontWindows
81 +1, ProggyCleanTT
82 +1, ProggyCleanTTSZ
83 +1, ProggySmallTT
84 +1, ProggySquareTT
85 +1, ProggySquareTTSZ
86 +1, ProggyTinyTT
87 +1, ProggyTinyTTSZ
88 +1, Rec Mono Casual
89 +1, Rec Mono Linear
90 +1, Roboto Mono
91 +1, SV Basic Manual
92 +1, Share Tech Mono
93 +1, Share-TechMonoTrue
94 +1, SmallTypeWriting
95 +1, Source Code Pro
96 +1, Sudo
97 +1, Symbols Nerd Font
98 +1, Symbols Nerd Font Mono
99 +1, TeX Gyre Cursor
100 +1, Terminus
101 +1, Ubuntu Mono
102 +0, Verily Serif Mono
103 +1, Victor Mono
104 +1, Whois
105 +1, agave
106 +1, iA Writer Mono V
107 +1, monoOne
108 +1, monofur
109 +1, mononoki
110 +0, saxMono

wezterm/bugabinga/fonts.lua

Modified
1 1 local wez = require 'wezterm'
3 3 return function ( cfg )
4 - local font_size = 16.0
4 + local font_size = 11.0
5 5 local font = wez.font 'Cousine'
6 6 cfg.font = font
7 7 cfg.font_size = font_size

wezterm/bugabinga/key_binds.lua

Modified
10 10 if wez.target_triple:find 'windows' then
11 11 leader = { key = 'raw:255', }
13 -local font_size_mode = ' Change Font Size (=-+)'
13 +local font_mode = ' Font mode (-=🠙🠛␡)'
14 14 local pane_mode = ' Pane (hjklqr)'
15 15 local resize_pane_mode = 'ﭕ Resize Pane (hjkl)'
17 +wez.on("inc-font-size", function(window)
18 + local size = window:effective_config().font_size + 1
19 + local overrides = window:get_config_overrides() or {}
20 + overrides.font_size = size
21 + window:set_config_overrides(overrides)
22 +end)
24 +wez.on("dec-font-size", function(window)
25 + local size = window:effective_config().font_size - 1
26 + local overrides = window:get_config_overrides() or {}
27 + overrides.font_size = size
28 + window:set_config_overrides(overrides)
29 +end)
17 31 local key_tables = {
18 32 [resize_pane_mode] = {
19 33 { key = 'h', action = wez.action.AdjustPaneSize { 'Left', 1, }, },
24 38 -- Cancel the mode
25 39 { key = 'Escape', action = 'PopKeyTable', },
27 - [font_size_mode] = {
28 - { key = '-', action = wez.action.DecreaseFontSize, },
29 - { key = '=', action = wez.action.IncreaseFontSize, },
41 + [font_mode] = {
42 + { key = '-', action = wez.action.EmitEvent 'dec-font-size', },
43 + { key = '=', action = wez.action.EmitEvent 'inc-font-size', },
30 44 { key = '0', action = wez.action.ResetFontSize, },
46 + { key = 'UpArrow', action = wez.action.EmitEvent 'like-current-font' },
47 + { key = 'DownArrow', action = wez.action.EmitEvent 'dislike-current-font' },
48 + { key = 'Delete', action = wez.action.EmitEvent 'ban-current-font' },
32 50 { key = 'Escape', action = 'PopKeyTable', },
34 52 [pane_mode] = {
54 72 key = '0',
55 73 mods = 'LEADER',
56 - action = wez.action.ActivateKeyTable { name = font_size_mode, one_shot = false, },
74 + action = wez.action.ActivateKeyTable { name = font_mode, one_shot = false, },
59 77 key = 'w',
97 115 { Foreground = { AnsiColor = 'Purple', }, },
98 116 { Text = 'New workspace:', },
118 + -- FIXME: move to workspace module and use emitevent instead of custom_action
100 119 action = wez.action_callback( function ( window, pane, line )
101 120 if line then
102 121 window:perform_action(

wezterm/bugabinga/status.lua

Modified
22 22 local zoomed_state = zoomed( pane )
23 23 local leader = nil
24 24 if window:leader_is_active() then
25 - leader = 'LEADER'
25 + leader = '󱁐 '
27 27 local fonts = {}
28 28 local config = window:effective_config()
39 39 local pane_domain = pane:get_domain_name()
41 - local status = { '', }
41 + local status = { ' ', }
42 42 if leader then
43 43 table.insert( status, leader )