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)

+1022 / −380 text lines · all files grouped into 32 bars

Diff layout

neovim/README.md

Modified

+11 / −10 text lines

2424ftplugin
2525: file type specific config
27----------
27---
2929# ai poem
3939# todo
41* navic highlights do not fit winbar
4241* 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
4445* 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
4551* make assignment to map.x fail, e.g. `map.normal = {}`...
4652* figure out desirable cmp key maps
4753* try loading lsp async for better startup perf
4854* 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?)
5557* check out harper-ls
5658* check out ast-grep
57* flesh out 'const.lua', move to std?
5859* nvim spell for camel case words
5960* create skeleton-plugin for default file content based on file type
6061 (BufNewFile?)

neovim/colors/nugu.lua

Modified

+2 / −35 text lines

1-- TODO: move this to std and refactor to retun bool
2-- Set color theme to light/dark based on current system preferences.
3function 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
34end
1local const = require'std.const'
363if vim.g.colors_name == nil then
37 vim.opt.background = get_background_based_on_os()
4 vim.opt.background = const.os_background
385else
396 -- Reset all highlights if another colorscheme was previously set
407 vim.cmd [[ highlight clear ]]

neovim/ftplugin/lua.lua

Modified

+11 / −0 text lines

1010-- those are defined in 'after/queries/lua/highlights.scm'
1111vim.opt_local.conceallevel = 1
1212vim.opt_local.concealcursor = 'n'
14vim.snippet.add(
15 'fn',
16 'function ${1:name}($2)\n\t${3:-- content}\nend',
17 { buffer = 0 }
18)
19vim.snippet.add(
20 'lfn',
21 'local ${1:name} = function($2)\n\t${3:-- gogogo}\nend',
22 { buffer = 0 }
23)

neovim/init.lua

Modified

+15 / −11 text lines

1414vim.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
1718prequire = require 'std.prequire'
19prequire 'bugabinga.options'
20prequire 'bugabinga.editorconfig'
21prequire 'bugabinga.sessions'
22prequire 'bugabinga.lazy'
23prequire 'bugabinga.save_actions'
20require 'patches'
25prequire 'bugabinga.lsp'
22require 'bugabinga.options'
23require 'bugabinga.editorconfig'
24require 'bugabinga.sessions'
25require 'bugabinga.lazy'
27vim.defer_fn (function ()
28 prequire 'bugabinga.terminal'
29 prequire 'bugabinga.diagnostic'
30end, 444)
27require 'bugabinga.lsp'
29vim.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

+15 / −8 text lines

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

neovim/lazy-lock.json

Modified

+38 / −3 text lines

11{
22 "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" },
3 "CopilotChat.nvim": { "branch": "canary", "commit": "9333944fde3c65868818e245c73aa29eef826e9b" },
34 "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
45 "better-escape.nvim": { "branch": "master", "commit": "f45b52f8f87792e8659526f23261ffe278a54be5" },
6 "cmd-parser.nvim": { "branch": "master", "commit": "6363b8bddef968c3ec51a38172af44f675f01ef3" },
57 "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
8 "cmp-dotenv": { "branch": "main", "commit": "4dd53aab60982f1f75848aec5e6214986263325e" },
69 "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
10 "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
711 "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
812 "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
913 "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
10 "colorizer.nvim": { "branch": "master", "commit": "c1602ff3f11566bb7f16f90985b0c59d3d7db0ef" },
1114 "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" },
1218 "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
1319 "dressing.nvim": { "branch": "master", "commit": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2" },
20 "eagle.nvim": { "branch": "main", "commit": "f590404f510be11ef2cf7c68e135441bfa48c9a8" },
1421 "flash.nvim": { "branch": "main", "commit": "ec0bf2842189f65f60fd40bf3557cac1029cc932" },
1522 "heirline.nvim": { "branch": "master", "commit": "7a79753c1a42c3f52e89a6c42429e7f871e560cd" },
23 "in-and-out.nvim": { "branch": "master", "commit": "ab24cafadc3418dffb0c7e9b0621cff60b9ac551" },
1624 "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" },
1728 "lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" },
29 "lazydev.nvim": { "branch": "main", "commit": "491452cf1ca6f029e90ad0d0368848fac717c6d2" },
1830 "lspkind.nvim": { "branch": "master", "commit": "59c3f419af48a2ffb2320cea85e44e5a95f71664" },
31 "markdown-table-mode.nvim": { "branch": "main", "commit": "f830cd15a97deb3acc53d9f6607bc609f7f32e49" },
1932 "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
2033 "mini.bracketed": { "branch": "main", "commit": "833d66df6e0588222312a963780c6ec42ed7437d" },
2134 "mini.bufremove": { "branch": "main", "commit": "1ee294a97e091d3cf967974df622c0d887890dc2" },
2235 "mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" },
36 "neodim": { "branch": "master", "commit": "d87470828690342d0139efc2fd56ea0b29e9ecb3" },
37 "no-neck-pain.nvim": { "branch": "main", "commit": "c0d8061f18bccceff0991e096c8f864a720e1ebf" },
2338 "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
2439 "nvim-autopairs": { "branch": "master", "commit": "f158dcb865c36f72c92358f87787dab2c272eaf3" },
2540 "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" },
2644 "nvim-genghis": { "branch": "main", "commit": "ca258b1e466d131e17eacf0c632abe932bce20ab" },
2745 "nvim-gomove": { "branch": "main", "commit": "2b44ae7ac0804f4e3959228122f7c85bef1964e3" },
46 "nvim-highlight-colors": { "branch": "main", "commit": "a411550ef85cae467b889ba7d1a96bd78332d90e" },
2847 "nvim-lastplace": { "branch": "main", "commit": "0bb6103c506315044872e0f84b1f736c4172bb20" },
2948 "nvim-lint": { "branch": "master", "commit": "968a35d54b3a4c1ce66609cf80b14d4ae44fe77f" },
49 "nvim-lsp-endhints": { "branch": "main", "commit": "391ef40521b631a8a2fb7aef78db6967ead6b39d" },
50 "nvim-luapad": { "branch": "master", "commit": "176686eb616a5ada5dfc748f2b5109194bbe8a71" },
3051 "nvim-neoclip.lua": { "branch": "main", "commit": "32e05f2d23dc5b6a284a688c0535a83d1bfc633f" },
52 "nvim-rulebook": { "branch": "main", "commit": "bc5e3874a9870709ec91152f9efce6dad49ca862" },
3153 "nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
32 "nvim-treesitter": { "branch": "master", "commit": "f027762845fa35ff27fe0487c86537a74a480a0c" },
54 "nvim-treesitter": { "branch": "master", "commit": "707313b80a2f1e65fa06dba2052cc49ce6762a60" },
3355 "nvim-treesitter-endwise": { "branch": "master", "commit": "8b34305ffc28bd75a22f5a0a9928ee726a85c9a6" },
3456 "nvim-treesitter-textobjects": { "branch": "master", "commit": "4a2d05ec24eaa6b655c7d19092a3b6c0219d46b9" },
3557 "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
36 "nvim-web-devicons": { "branch": "master", "commit": "26220156aafb198b2de6a4cf80c1b120a3768da0" },
58 "nvim-web-devicons": { "branch": "master", "commit": "1e5a2a796a88b5d696acb07dd5c285b13d13da21" },
3759 "oil.nvim": { "branch": "master", "commit": "1eb9fb35a4613518f79790117ed82c367a0b4a22" },
3860 "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" },
3965 "specs.nvim": { "branch": "main", "commit": "8a108c8b37dec1b184a1d3d76c6cf867bfbe9636" },
66 "spellwarn.nvim": { "branch": "main", "commit": "2f4dbc58bb90bc63b295461216b91ccf4e7f782d" },
4067 "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" },
4171 "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
4272 "telescope-symbols.nvim": { "branch": "master", "commit": "a6d0127a53d39b9fc2af75bd169d288166118aec" },
73 "telescope-undo.nvim": { "branch": "main", "commit": "51be9ae7c42fc27c0b05505e3a0162e0f05fbb6a" },
4374 "telescope-zoxide": { "branch": "main", "commit": "54bfe630bad08dc9891ec78c7cf8db38dd725c97" },
4475 "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
4576 "text-case.nvim": { "branch": "main", "commit": "13daf28a829e6d0646904c94214cb289bb0c6f34" },
77 "timespent.nvim": { "branch": "master", "commit": "6346ea9556344a44fdbc83a8a80d68ca66dd8778" },
78 "tiny-inline-diagnostic.nvim": { "branch": "main", "commit": "1a83e7ce5c9d0ae4d89fc5c812b55ff8ed1d39e7" },
4679 "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
80 "toggle.nvim": { "branch": "main", "commit": "50769ba8982d3d3a8fbd1d1a2e5cad63c73df662" },
4781 "tree-sitter-nu": { "branch": "main", "commit": "e3b4c967937cad628dca09bd098cd780d8288750" },
4882 "treesj": { "branch": "main", "commit": "0d81326b5afd36babe7dd480aabbb0b05f33e688" },
4983 "vim-vscode-snippets": { "branch": "master", "commit": "c34e9edee6a00cf3d0b8edb515e08e3df450bcfa" },
5084 "virt-column.nvim": { "branch": "master", "commit": "b62b4ef0774d19452d4ed18e473e824c7a756f2f" },
85 "wezterm-types": { "branch": "main", "commit": "1518752906ba3fac0060d9efab6e4d3ec15d4b5a" },
5186 "which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" },
5287 "zen-mode.nvim": { "branch": "main", "commit": "04b52674b8c800f8b7d4609e8bd8d0212e3ffa79" }

neovim/lua/bugabinga/const.lua

Deleted
deleted file mode 100644

+0 / −5 text lines

1--- constant 'global' values
2return {
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

+1 / −2 text lines

1313local _ = {}
15require 'bugabinga.lsp.lightbulb'
1716local token_update = function ( lsp_client )
1817 local token = lsp_client.data.token
300299 buffer = bufnr,
301300 keys = '<leader>ti',
302301 command = function ()
303 vim.lsp.inlay_hint.enable( bufnr, nil )
302 vim.lsp.inlay_hint.enable( not vim.lsp.inlay_hint.is_enabled() )
304303 end,
305304 } )
306305 end

neovim/lua/bugabinga/nugu/init.lua

Modified

+1 / −0 text lines

181181_.VisualNOS { bg = ui_unfocus }
182182_.WarningMsg { fg = warning, bold = true }
183183_.WildMenu = _.Debug
184_.TextYankPost { fg = content_backdrop, bg = ui_important_local }
185186_.String { fg = content_important_local, italic = true }
186187_.Constant = _.String

neovim/lua/bugabinga/nugu/palette.lua

Modified

+20 / −20 text lines

88end
1010return {
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

+50 / −12 text lines

11local debug = require 'std.dbg'
2local const = require 'std.const'
23local auto = require 'std.auto'
45-- How many milliseconds must pass before neovim decides I was "idle"
5455-- disable popup menu on right click
5556vim.opt.mousemodel = 'extend'
57-- integrate Nushell with nvim
58vim.opt.shell = 'nu'
59vim.opt.shellcmdflag = '--stdin --no-newline --commands'
60vim.opt.shellredir = 'out+err> %s'
61vim.opt.shellpipe = '| complete | update stderr { ansi strip } | tee { get stderr | save --force --raw %s} | into record'
62vim.opt.shelltemp = false
63vim.opt.shellxquote = ''
64vim.opt.shellxescape = ''
65vim.opt.shellquote = ''
58if 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 = ''
86end
6788require 'bugabinga.health'.add_dependency
82103-- Show the effects of substitutions incrementally
83104vim.opt.inccommand = 'nosplit'
85-- use ripgrep instead of grep
86vim.opt.grepprg = 'rg --hidden --vimgrep --no-heading --smart-case --'
87vim.opt.grepformat = '%f:%l:%c:%m'
106if 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'
110end
89112require 'bugabinga.health'.add_dependency
95118-- ask me to force failed commands
96119vim.opt.confirm = true
121if 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 }
134end

neovim/lua/bugabinga/options/keymaps.lua

Modified

+1 / −22 text lines

11local map = require 'std.map'
2local const = require 'bugabinga.const'
2local const = require 'std.const'
33local togglers = require 'bugabinga.options.togglers'
55-- set <SPACE> as leader key
1010vim.g.mapleader = ' '
1111vim.g.maplocalleader = ' '
13map.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',
18}
20map.normal {
21 description = 'Pastes from the system clipboard (in normal mode or visual mode).',
22 category = 'editing',
23 keys = '<leader>p',
24 command = '"+p',
25}
27map.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',
32}
3413-- disable command history keymap, because i fatfinger it too often
3514map {
3615 keys = 'q:',

neovim/lua/bugabinga/options/ui.lua

Modified

+8 / −3 text lines

77 description = 'briefly highlight yanked text',
88 events = 'TextYankPost',
99 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,
1318auto 'disable_columns_in_special_buffers' {
1419 description = 'Hide columns in buffers, that do not show source code.',
15 events = { 'FileType', },
20 events = { 'FileType' },
1621 pattern = ignored.filetypes,
1722 command = function ()
1823 dbg.print 'Hiding columns in buffers without source code'
9095vim.opt.foldenable = false
9297-- show visual indicators for lines too long
93vim.opt.colorcolumn = { '80', '120', '140', }
98vim.opt.colorcolumn = { '80', '120', '140' }
95100-- highlight the current line
96101vim.opt.cursorline = false

neovim/lua/bugabinga/plugins/bracketed.lua

Modified

+7 / −1 text lines

22 'echasnovski/mini.bracketed',
33 version = '0.*',
44 event = 'VeryLazy',
5 opts = {},
5 opts = {
6 treesitter = { suffix = '' },
7 window = { suffix = '' },
8 yank = { suffix = '' },
9 indent = { suffix = '' },
10 comment = { suffix = '' },
11 },
612}

neovim/lua/bugabinga/plugins/cmp.lua

Modified

+57 / −43 text lines

1111 'hrsh7th/cmp-buffer',
1212 'hrsh7th/cmp-path',
1313 'hrsh7th/cmp-nvim-lua',
14 'hrsh7th/cmp-nvim-lsp-signature-help',
15 'SergioRibera/cmp-dotenv',
1416 'saadparwaiz1/cmp_luasnip',
1517 'onsails/lspkind.nvim',
1618 'L3MON4D3/LuaSnip',
4850 ['<C-x>'] = cmp.mapping.complete(),
4951 }
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,
104 }
94106 local sources = {
107 { name = 'copilot' }, -- FIXME: depends on incubating plugin!
95108 { name = 'nvim_lua' },
109 { name = 'nvim_lsp_signature_help' },
96110 { name = 'nvim_lsp' },
111 { name = 'dotenv' },
97112 { name = 'path' },
98 { name = 'luasnip' },
99113 {
100114 name = 'buffer',
101115 keyword_length = 4,

neovim/lua/bugabinga/plugins/colorizer.lua

Modified

+7 / −30 text lines

11return {
22 {
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,
69 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',
3411 },
3512 },

neovim/lua/bugabinga/plugins/conform.lua

Modified

+0 / −10 text lines

2525 cmd = { 'ConformInfo' },
2626 opts = {
2727 formatters_by_ft = {
28 -- https://github.com/razziel89/mdslw/issues/14
29 markdown = { 'mdslw' },
30 -- lua = { "stylua" },
3128 toml = { 'taplo' },
3229 sh = { 'shfmt' },
3330 just = { 'just' },
34 nu = { 'nufmt' },
3531 zig = { 'zigfmt' },
3632 -- Use the "*" file type to run formatters on all file types.
3733 ['*'] = { 'injected', 'typos' },
3935 -- have other formatters configured.
4036 ['_'] = { 'trim_whitespace', 'trim_newlines' },
4137 },
42 formatters = {
43 mdslw = {
44 -- remove `:` from the default set of end markers
45 -- prepend_args = { '--end-markers', '?!.', },
46 },
47 },
4838 log_level = debug.get() and vim.log.levels.TRACE or vim.log.levels.INFO,
4939 },
5040 init = function ()

neovim/lua/bugabinga/plugins/genghis.lua

Modified

+1 / −1 text lines

1local const = require 'bugabinga.const'
1local const = require 'std.const'
22if const.win32 then
33 require 'bugabinga.health'.add_dependency {
44 name_of_executable = 'recycle-bin',

neovim/lua/bugabinga/plugins/heirline.lua

Modified

+12 / −2 text lines

233233 end,
234234 }
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,
244 }
236246 local lsp_active = {
237247 condition = conditions.lsp_attached,
238 -- FIXME: updates from parent components do not seem to update children,
239 -- if those have their own updates?
240248 update = { 'LspAttach', 'LspDetach', 'BufEnter', 'BufLeave' },
242250 provider = function ()
474482 space,
475483 escape_status,
476484 space,
485 lsp_dr_count,
486 space,
477487 lsp_active,
478488 space,
479489 file_encoding,

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

Added
new file mode 100644

+14 / −0 text lines

1local map = require 'std.map'
2
3map.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}
9
10return {
11 'ysmb-wtsg/in-and-out.nvim',
12 commit = 'ab24cafadc3418dffb0c7e9b0621cff60b9ac551',
13 event = 'VeryLazy',
14}

neovim/lua/bugabinga/plugins/incubator.lua

Added
new file mode 100644

+384 / −0 text lines

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.
4
5-- global toggle for all incubating plugins. set to false to quickly, but
6-- temporarily, get rid of all incubating plugins.
7local FUCK_STABILITY = true
8
9local ignored = require 'std.ignored'
10local icon = require 'std.icon'
12return {
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 -------------------------------------------------------------------------------
102 {
103 'Wansmer/symbol-usage.nvim',
104 event = 'LspAttach',
105 opts = {},
106 enable = FUCK_STABILITY,
107 },
108 -------------------------------------------------------------------------------
109 {
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 -------------------------------------------------------------------------------
120 {
121 'quentingruber/timespent.nvim',
122 keys = {
123 {
124 '<leader>tS',
125 '<cmd>:ShowTimeSpent<cr>',
126 mode = { 'n' },
127 desc = 'Show time spent',
128 },
129 },
130 enable = FUCK_STABILITY,
131 },
132 -------------------------------------------------------------------------------
133 {
134 'nvim-telescope/telescope-frecency.nvim',
135 config = function ()
136 require 'telescope'.load_extension 'frecency'
137 end,
138 keys = {
139 {
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 },
149 {
150 'cenk1cenk2/scratch.nvim',
151 enable = FUCK_STABILITY,
152 },
153 -------------------------------------------------------------------------------
154 {
155 'AdeAttwood/ivy.nvim',
156 lazy = false,
157 build = 'cargo build --release',
158 opts = {},
159 enable = FUCK_STABILITY,
160 },
161 -------------------------------------------------------------------------------
162 {
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 -------------------------------------------------------------------------------
175 {
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 -------------------------------------------------------------------------------
184 {
185 'winston0410/range-highlight.nvim',
186 lazy = false,
187 dependencies = { 'winston0410/cmd-parser.nvim' },
188 opts = { highlight = 'Visual' },
189 enable = FUCK_STABILITY,
190 },
191 -------------------------------------------------------------------------------
192 {
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 -------------------------------------------------------------------------------
209 {
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 -------------------------------------------------------------------------------
217 {
218 'rafcamlet/nvim-luapad',
219 cmd = { 'Luapad', 'LuaRun' },
220 opts = {},
221 enable = FUCK_STABILITY,
223 },
224 -------------------------------------------------------------------------------
225 {
226 'ravibrock/spellwarn.nvim',
227 event = 'VeryLazy',
228 config = true,
229 enable = FUCK_STABILITY,
230 },
231 -------------------------------------------------------------------------------
232 {
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 -------------------------------------------------------------------------------
248 {
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 -------------------------------------------------------------------------------
278 {
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 },
296 {
297 'shortcuts/no-neck-pain.nvim',
298 lazy = false,
299 enable = FUCK_STABILITY,
300 },
301 -------------------------------------------------------------------------------
302 {
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 -------------------------------------------------------------------------------
310 {
311 'mfussenegger/nvim-dap',
312 dependencies = {
313 {
314 'debugloop/layers.nvim',
315 opts = {},
316 },
317 },
318 keys = {
319 {
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 = {
357 {
358 's',
359 function ()
360 dap.step_over()
361 end,
362 { desc = 'step forward' },
363 },
364 {
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 },
379 }
380 end,
381 },
382 enable = FUCK_STABILITY,
383 },
384}

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

Added
new file mode 100644

+6 / −0 text lines

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

neovim/lua/bugabinga/plugins/telescope.lua

Modified

+18 / −9 text lines

6464 command = function () require 'telescope.builtin'.live_grep() end,
67map.normal {
68 description = 'Open undo hisory...',
69 category = 'undo',
70 keys = '<c-p><c-u>',
71 command = function () require 'telescope'.extensions.undo.undo() end,
72}
6774map.normal {
6875 description = 'Open search for current buffer content...',
6976 category = 'search',
97104 build =
98105 function ( plugin_spec )
99106 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()
102109 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()
105112 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()
108115 if result.code ~= 0 then error( result.stderr ) end
109116 end,
110117 },
113120 'nvim-telescope/telescope-symbols.nvim',
114121 'jvgrootveld/telescope-zoxide',
115122 'AckslD/nvim-neoclip.lua',
123 'debugloop/telescope-undo.nvim',
116124 },
117125 config = function ()
118126 local telescope = require 'telescope'
119127 local actions = require 'telescope.actions'
120128 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 } }
124132 telescope.setup {
125133 defaults = {
145153 ['<c-s>'] = actions.file_split,
146154 ['g?'] = actions.which_key,
147155 },
148 n = { q = actions.close, },
156 n = { q = actions.close },
149157 },
150158 },
151159 pickers = {
160168 help_tags = ivy,
161169 },
162170 extensions = {
163 zoxide = { prompt_title = 'Navigate deez nuts!', },
171 zoxide = { prompt_title = 'Navigate deez nuts!' },
164172 },
165173 }
169177 telescope.load_extension 'fzf'
170178 telescope.load_extension 'zoxide'
171179 telescope.load_extension 'neoclip'
180 telescope.load_extension 'undo'
172181 end,

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

Modified

+28 / −1 text lines

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

neovim/lua/bugabinga/save_actions.lua

Modified

+4 / −3 text lines

1010 vim.iter( all_actions ):each(
1111 function ( action )
1212 vim.validate {
13 action = { action, 'string', },
13 action = { action, 'string' },
1414 }
1515 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 } )
1718 end
1819 )
2425user_command.SaveActions 'Execute all declared save actions' ( apply_save_actions )
26map.normal.visual {
27map.normal.insert.visual {
2728 description = 'Save all buffers and apply save actions',
2829 category = 'actions',
2930 keys = '<c-s>',

neovim/lua/bugabinga/sessions.lua

Modified

+4 / −5 text lines

44local sessions = vim.fs.normalize( vim.fn.stdpath 'data' .. '/sessions' )
55vim.fn.mkdir( sessions, 'p' )
7-- FIXME: this needs to live somewhere in std
87local file_exists = function ( path )
98 local stat = vim.uv.fs_stat( path )
109 ---@diagnostic disable-next-line: undefined-field
1211end
1413local encode = function ( data )
15 vim.validate { data = { data, 'string', }, }
14 vim.validate { data = { data, 'string' } }
1716 -- replace some chars in base64, that are not allowed in file names.
1817 return vim.base64.encode( data ):gsub( '%+', '-' ):gsub( '%/', '.' ):gsub( '%=', '_' )
1918end
2120local decode = function ( data )
22 vim.validate { data = { data, 'string', }, }
21 vim.validate { data = { data, 'string' } }
2322 return vim.base64.decode( data:gsub( '%-', '+' ):gsub( '%.', '/' ):gsub( '%_', '=' )
2423 )
2524end
3332local save_session_for_cwd = function ()
3433 local cwd = vim.uv.cwd()
3534 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 }
3736end
3938local load_session = function ( session )
4039 local session_path = vim.fs.normalize( sessions .. '/' .. session )
4241 if file_exists( session_path ) then
43 vim.cmd.source { session_path, }
42 vim.cmd.source { session_path }
4443 else
4544 vim.notify( 'No session `' .. session .. '` found!' )
4645 end

neovim/lua/patches/init.lua

Added
new file mode 100644

+1 / −0 text lines

1require 'patches.snippet'

neovim/lua/patches/snippet.lua

Added
new file mode 100644

+20 / −0 text lines

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.
9function 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 )
20end

neovim/lua/std/const.lua

Added
new file mode 100644

+38 / −0 text lines

1return {
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)(),
38}

neovim/lua/std/icon.lua

Modified

+3 / −1 text lines

3131 exclaim = '',
3232 extends = '❯',
3333 failed = ' ',
34 type = '󱔞',
35 parameter = '',
3436 field = ' ',
3537 file = '',
3638 folder = '',
108110 virtual = '󰢔',
109111 visual = '󰒉',
110112 warn = '󰱯',
111 wrap = '󰖶'
113 wrap = '󰖶',

neovim/lua/std/ignored.lua

Modified

+4 / −0 text lines

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
13local filetypes = {
24 'NvimTree',
35 'Outline',
810 '^git.*',
911 'flash_prompt',
1012 'help',
13 'ivy',
1114 'lazy',
1215 'noice',
1316 'notify',
1619 'starter',
1720 'svn',
1821 'toggleterm',
22 'copilot-chat',
2125local buftypes = {

wezterm/bugabinga/code_font.lua

Modified

+104 / −25 text lines

11local wez = require 'wezterm'
3return {
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
3local 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
1712 end
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
27end
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.
34local 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 )
44end
46local 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 )
55end
57local 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 )
65end
67-- register those events with wezterm, so that key binds can trigger them
68wez.on( 'like-current-font', like_current_font )
69wez.on( 'dislike-current-font', dislike_current_font )
70wez.on( 'ban-current-font', ban_current_font )
72local 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
28100 end
29101 end
102 end
31 return wez.font( selected )
32 end,
104 return wez.font( selected )
105end
107return {
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

+110 / −110 text lines

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
11, Anonymous Pro
21, Anonymous Pro Minus
31, Aurulent Sans Mono
41, AverageMono
51, BPmono
61, BigBlue TerminalPlus
71, Bitstream Vera Sans Mono
81, Bront
91, CMU Typewriter Text
101, CPMono_v07
111, CamingoCode
121, Cascadia Code
131, Code New Roman
141, CodingFontTobi
151, Consola Mono
161, Courier Prime Code
171, Cousine
181, Crisp
191, Cutive Mono
201, D2Coding
211, DejaVu Sans Mono
221, Dina ttf 10px
231, Droid Sans Mono
241, Edlo
251, Envy Code R
261, Fantasque Sans Mono
271, Fira Code
281, Fira Mono
291, Fixedsys Excelsior 3.01
301, FreeMono
311, Geist Mono
3220, Generic Mono II
331, GohuFont
341, Hack
351, Hasklig
3611, Hermit
3711, IBM Plex Mono
381, Inconsolata
391, Inconsolata LGC
401, Inconsolata-dz
411, Inconsolata-g
421, Intel One Mono
431, Iosevka
441, Iosevka Slab
450, JetBrains Mono
460, JetBrains Mono NL
471, Kawkab Mono
481, Latin Modern Mono Light
4911, Lekton
501, Liberation Mono
511, Lilex
521, Linux Libertine Mono
531, Luculent
541, Luxi Mono
551, M+ 1m
561, M+ 1mn
571, M+ 2m
581, Martian Mono
591, Mensch
600, Meslo LG M DZ
611, Metrickal
621, Monaspace Argon Var
631, Monaspace Krypton Var
641, Monaspace Neon Var
651, Monaspace Radon Var
661, Monaspace Xenon Var
671, MonoSpatial
681, Monoid
691, Monospace
701, MonteCarlo Fixed 12
711, NanumGothic_Coding
721, NotCourierSans
731, Office Code Pro
741, Office Code Pro D
756, Oxygen Mono
761, PT Mono
771, Panic Sans
780, PixelCarnageMonoTT
791, Pointfree
801, ProFontWindows
811, ProggyCleanTT
821, ProggyCleanTTSZ
831, ProggySmallTT
841, ProggySquareTT
851, ProggySquareTTSZ
861, ProggyTinyTT
871, ProggyTinyTTSZ
881, Rec Mono Casual
891, Rec Mono Linear
901, Roboto Mono
911, SV Basic Manual
921, Share Tech Mono
931, Share-TechMonoTrue
941, SmallTypeWriting
951, Source Code Pro
961, Sudo
971, Symbols Nerd Font
981, Symbols Nerd Font Mono
991, TeX Gyre Cursor
1001, Terminus
1011, Ubuntu Mono
1020, Verily Serif Mono
1031, Victor Mono
1041, Whois
1051, agave
1061, iA Writer Mono V
1071, monoOne
1081, monofur
1091, mononoki
1100, saxMono

wezterm/bugabinga/fonts.lua

Modified

+1 / −1 text lines

11local wez = require 'wezterm'
33return function ( cfg )
4 local font_size = 16.0
4 local font_size = 11.0
55 local font = wez.font 'Cousine'
66 cfg.font = font
77 cfg.font_size = font_size

wezterm/bugabinga/key_binds.lua

Modified

+24 / −5 text lines

1010if wez.target_triple:find 'windows' then
1111 leader = { key = 'raw:255', }
1212end
13local font_size_mode = ' Change Font Size (=-+)'
13local font_mode = ' Font mode (-=🠙🠛␡)'
1414local pane_mode = ' Pane (hjklqr)'
1515local resize_pane_mode = 'ﭕ Resize Pane (hjkl)'
17wez.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)
22end)
24wez.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)
29end)
1731local key_tables = {
1832 [resize_pane_mode] = {
1933 { key = 'h', action = wez.action.AdjustPaneSize { 'Left', 1, }, },
2438 -- Cancel the mode
2539 { key = 'Escape', action = 'PopKeyTable', },
2640 },
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', },
3044 { 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' },
3250 { key = 'Escape', action = 'PopKeyTable', },
3351 },
3452 [pane_mode] = {
5371 {
5472 key = '0',
5573 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, },
5775 },
5876 {
5977 key = 'w',
97115 { Foreground = { AnsiColor = 'Purple', }, },
98116 { Text = 'New workspace:', },
99117 },
118 -- FIXME: move to workspace module and use emitevent instead of custom_action
100119 action = wez.action_callback( function ( window, pane, line )
101120 if line then
102121 window:perform_action(

wezterm/bugabinga/status.lua

Modified

+2 / −2 text lines

2222 local zoomed_state = zoomed( pane )
2323 local leader = nil
2424 if window:leader_is_active() then
25 leader = 'LEADER'
25 leader = '󱁐 '
2626 end
2727 local fonts = {}
2828 local config = window:effective_config()
3838 }
3939 local pane_domain = pane:get_domain_name()
41 local status = { '', }
41 local status = { '', }
4242 if leader then
4343 table.insert( status, leader )
4444 end