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)
25 25 : file type specific config
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
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
neovim/colors/nugu.lua
Modified 3 -function get_background_based_on_os()
5 - local background
= 'light' 6 - local uname
= vim.uv.os_uname()
8 - if uname.sysname
== "Windows_NT" or string.
match(uname.release,
"WSL")
then 10 - if vim.fn.executable(
'reg.exe')
~= 0 then 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 18 - elseif vim.fn.executable(
'busctl')
~= 0 then 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" 25 - local color_scheme
= result:match(
"u%s+(%d+)")
27 - if color_scheme
== '1' then 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
40 7 vim.cmd
[[ highlight clear ]] neovim/ftplugin/lua.lua
Modified11 11 vim.opt_local.conceallevel
= 1 12 12 vim.opt_local.concealcursor
= 'n' 16 + 'function ${1:name}($2)\n\t${3:-- content}\nend',
21 + 'local ${1:name} = function($2)\n\t${3:-- gogogo}\nend',
14 14 vim.cmd.colorscheme
'nugu' 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' 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' 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' 2 2 set shell := [
'nu',
'--commands']
14 - nvim --headless
"+Lazy! sync" +qa
14 + nvim --headless
"+Lazy! sync" +qa
20 + --tree=$HOME/.local/share/nvim/rocks \
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
Deleteddeleted file mode 1006443 - win32 = vim.loop.os_uname().sysname:match
'Win',
4 - wsl2 = vim.loop.os_uname().release:match
'WSL2',
neovim/lua/bugabinga/lsp/init.lua
Modified 15 -require 'bugabinga.lsp.lightbulb' 17 16 local token_update = function ( lsp_client )
18 17 local token
= lsp_client.data.token
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
Modified181 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
Modified11 - 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' 55 56 vim.opt.mousemodel
= 'extend' 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 60 + vim.opt.shell
= 'nu' 65 + vim.opt.shellcmdflag
= '--stdin --no-newline --commands' 70 + vim.opt.shellredir
= 'out+err> "%s"' 76 + '| complete | get stderr stdout | str join (char nl) | ansi strip | tee { save --force --raw "%s" }' 82 + vim.opt.shelltemp
= false 83 + vim.opt.shellxquote
= '' 84 + vim.opt.shellxescape
= '' 85 + vim.opt.shellquote
= '' 67 88 require 'bugabinga.health'.add_dependency
83 104 vim.opt.inccommand
= 'nosplit' 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 108 + vim.opt.grepprg
= 'rg --hidden --vimgrep --no-heading --smart-case -- ' 109 + vim.opt.grepformat
= '%f:%l:%c:%m' 89 112 require 'bugabinga.health'.add_dependency
96 119 vim.opt.confirm
= true 122 + vim.g.clipboard
= {
123 + name =
'WslClipboard',
125 + [
'+'] =
'clip.exe',
126 + [
'*'] =
'clip.exe',
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", ""))',
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' 10 10 vim.g.mapleader
= ' ' 11 11 vim.g.maplocalleader
= ' ' 14 - description =
'Yanks the selected text (in normal mode or visual mode) to the system clipboard.',
15 - category =
'editing',
21 - description =
'Pastes from the system clipboard (in normal mode or visual mode).',
22 - category =
'editing',
28 - description =
'Yanks the entire line (when used in normal mode with motion).',
29 - category =
'editing',
neovim/lua/bugabinga/options/ui.lua
Modified 7 7 description
= 'briefly highlight yanked text',
8 8 events
= 'TextYankPost',
10 - command = function () vim.highlight.on_yank()
end,
10 + command = function ()
11 + vim.highlight.on_yank {
12 + higroup =
'TextYankPost',
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 93 -vim.opt.colorcolumn
= {
'80',
'120',
'140', }
98 +vim.opt.colorcolumn
= {
'80',
'120',
'140' }
96 101 vim.opt.cursorline
= false neovim/lua/bugabinga/plugins/bracketed.lua
Modified3 3 'echasnovski/mini.bracketed',
7 + treesitter = {
suffix =
'' },
8 + window = {
suffix =
'' },
9 + yank = {
suffix =
'' },
10 + indent = {
suffix =
'' },
11 + comment = {
suffix =
'' },
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' )
54 - formatting.format
= lspkind.cmp_format {
57 - Copilot = icon.copilot,
60 - Constant = icon.constant,
61 - Constructor = icon.constructor,
63 - EnumMember = icon.enum_member,
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,
79 - TypeParameter = icon.type_parameter,
82 - Variable = icon.variable,
87 - nvim_lua =
'[nvim]',
53 + local lspkind
= prequire
'lspkind' 54 + local colors
= prequire
'nvim-highlight-colors' 55 + local lspkind_params
= {
58 + Copilot = icon.copilot,
61 + Constant = icon.constant,
62 + Constructor = icon.constructor,
64 + EnumMember = icon.enum_member,
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,
80 + TypeParameter = icon.type_parameter,
83 + Variable = icon.variable,
88 + nvim_lua =
'[nvim]',
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
107 + {
name =
'copilot' },
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' },
101 115 keyword_length =
4,
neovim/lua/bugabinga/plugins/colorizer.lua
Modified 3 - 'litoj/colorizer.nvim',
4 - commit =
'c1602ff3f11566bb7f16f90985b0c59d3d7db0ef',
3 + 'brenoprata10/nvim-highlight-colors',
4 + commit =
'a411550ef85cae467b889ba7d1a96bd78332d90e',
7 + vim.opt.termguicolors
= true 8 - user_default_options = {
18 - mode =
'virtualtext',
21 - sass = {
enable =
false,
parsers = {
'css' } },
25 - always_update =
false,
neovim/lua/bugabinga/plugins/conform.lua
Modified25 25 cmd
= {
'ConformInfo' },
27 27 formatters_by_ft = {
29 - markdown = {
'mdslw' },
31 28 toml = {
'taplo' },
35 31 zig = {
'zigfmt' },
37 33 [
'*'] = {
'injected',
'typos' },
40 36 [
'_']
= {
'trim_whitespace',
'trim_newlines' },
48 38 log_level
= debug.get()
and vim.log.levels.TRACE
or vim.log.levels.INFO,
neovim/lua/bugabinga/plugins/genghis.lua
Modified 1 -local const
= require 'bugabinga.const' 1 +local const
= require 'std.const' 3 3 require 'bugabinga.health'.add_dependency {
4 4 name_of_executable =
'recycle-bin',
neovim/lua/bugabinga/plugins/heirline.lua
Modified 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',
'' )
236 246 local lsp_active
= {
237 247 condition = conditions.lsp_attached,
240 248 update = {
'LspAttach',
'LspDetach',
'BufEnter',
'BufLeave' },
242 250 provider =
function ()
neovim/lua/bugabinga/plugins/in-and-out.lua
Addednew file mode 100644 1 +local map
= require 'std.map' 4 + description =
'Moves in or out of balanced tokens',
5 + category =
'editing',
7 + command =
function ()
require 'in-and-out'.in_and_out()
end,
11 + 'ysmb-wtsg/in-and-out.nvim',
12 + commit =
'ab24cafadc3418dffb0c7e9b0621cff60b9ac551',
neovim/lua/bugabinga/plugins/incubator.lua
Addednew file mode 100644 7 +local FUCK_STABILITY
= true 9 +local ignored
= require 'std.ignored' 10 +local icon
= require 'std.icon' 15 + 'gregorias/toggle.nvim',
19 + enable = FUCK_STABILITY,
23 + 'zbirenbaum/copilot-cmp',
24 + event =
'InsertEnter',
25 + config =
function ()
require 'copilot_cmp'.setup()
end,
27 + 'zbirenbaum/copilot.lua',
29 + config =
function ()
30 + require 'copilot'.setup {
31 + suggestion = {
enabled =
false },
32 + panel = {
enabled =
false },
36 + enable = FUCK_STABILITY,
41 + 'amrbashir/nvim-docs-view',
45 + '<cmd>DocsViewToggle<cr>',
47 + desc =
'Toggle stable documentation panel.',
50 + cmd =
'DocsViewToggle',
55 + enable = FUCK_STABILITY,
60 + 'mawkler/refjump.nvim',
64 + keys = {
']r',
'[r' },
66 + enable = FUCK_STABILITY,
70 + 'CopilotC-Nvim/CopilotChat.nvim',
72 + cmd =
'CopilotChat',
74 + {
'zbirenbaum/copilot.lua' },
75 + {
'nvim-lua/plenary.nvim' },
77 + build =
'make tiktoken',
81 + enable = FUCK_STABILITY,
85 + 'chrisgrieser/nvim-rulebook',
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' } },
92 + enable = FUCK_STABILITY,
96 + 'chrisgrieser/nvim-dr-lsp',
97 + event =
'LspAttach',
99 + enable = FUCK_STABILITY,
103 + 'Wansmer/symbol-usage.nvim',
104 + event =
'LspAttach',
106 + enable = FUCK_STABILITY,
112 + 'soulis-1256/eagle.nvim',
115 + vim.o.mousemoveevent
= true 117 + enable = FUCK_STABILITY,
121 + 'quentingruber/timespent.nvim',
125 + '<cmd>:ShowTimeSpent<cr>',
127 + desc =
'Show time spent',
130 + enable = FUCK_STABILITY,
134 + 'nvim-telescope/telescope-frecency.nvim',
135 + config =
function ()
136 + require 'telescope'.load_extension
'frecency' 141 + '<cmd>Telescope frecency<cr>',
143 + desc =
'telescope: Show recently and frequently used files.',
146 + enable = FUCK_STABILITY,
150 + 'cenk1cenk2/scratch.nvim',
151 + enable = FUCK_STABILITY,
155 + 'AdeAttwood/ivy.nvim',
157 + build =
'cargo build --release',
159 + enable = FUCK_STABILITY,
163 + 'roobert/surround-ui.nvim',
166 + 'kylechui/nvim-surround',
167 + 'folke/which-key.nvim',
172 + enable = FUCK_STABILITY,
176 + 'rachartier/tiny-inline-diagnostic.nvim',
177 + event =
'LspAttach',
178 + config =
function ()
179 + require 'tiny-inline-diagnostic'.setup()
181 + enable = FUCK_STABILITY,
185 + 'winston0410/range-highlight.nvim',
187 + dependencies = {
'winston0410/cmd-parser.nvim' },
188 + opts = {
highlight =
'Visual' },
189 + enable = FUCK_STABILITY,
193 + 'chrisgrieser/nvim-lsp-endhints',
194 + event =
'LspAttach',
197 + type = icon.type
.. ' ',
198 + parameter = icon.paramter,
200 + unknown = icon.hint,
206 + enable = FUCK_STABILITY,
211 + 'zbirenbaum/neodim',
212 + event =
'LspAttach',
214 + enable = FUCK_STABILITY,
218 + 'rafcamlet/nvim-luapad',
219 + cmd = {
'Luapad',
'LuaRun' },
221 + enable = FUCK_STABILITY,
226 + 'ravibrock/spellwarn.nvim',
227 + event =
'VeryLazy',
229 + enable = FUCK_STABILITY,
233 + 'emmanueltouzery/decisive.nvim',
234 + config =
function ()
235 + require 'decisive'.setup {}
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' },
245 + enable = FUCK_STABILITY,
249 + 'tris203/precognition.nvim',
250 + event =
'VeryLazy',
252 + startVisible =
true,
253 + showBlankVirtLine =
true,
254 + highlightColor = {
link =
'LineNr' },
273 + disabled_fts = ignored.filetypes,
275 + enable = FUCK_STABILITY,
279 + 'folke/lazydev.nvim',
280 + dependencies = {
'justinsgithub/wezterm-types' },
288 + {
path =
'luvit-meta/library',
words = {
'vim%.uv' } },
291 + {
path =
'wezterm-types',
mods = {
'wezterm' } },
294 + enable = FUCK_STABILITY,
297 + 'shortcuts/no-neck-pain.nvim',
299 + enable = FUCK_STABILITY,
305 + 'mizlan/iswap.nvim',
306 + event =
'VeryLazy',
307 + enable = FUCK_STABILITY,
311 + 'mfussenegger/nvim-dap',
314 + 'debugloop/layers.nvim',
322 + local dap
= require 'dap' 323 + if dap.session()
~= nil then 324 + DEBUG_MODE:activate()
329 + desc =
'launch debugger',
332 + config =
function ( _, opts )
333 + local dap
= require 'dap' 335 + dap.adapters
= opts.adapters
336 + dap.configurations
= opts.configurations
338 + DEBUG_MODE
= Layers.mode.new()
339 + DEBUG_MODE:auto_show_help()
341 + DEBUG_MODE:add_hook(
function ( _ )
342 + vim.cmd
'redrawstatus' 345 + dap.listeners.after.event_initialized[
'debug_mode']
= function ()
346 + DEBUG_MODE:activate()
348 + dap.listeners.before.event_terminated[
'debug_mode']
= function ()
349 + DEBUG_MODE:deactivate()
351 + dap.listeners.before.event_exited[
'debug_mode']
= function ()
352 + DEBUG_MODE:deactivate()
355 + DEBUG_MODE:keymaps {
362 + {
desc =
'step forward' },
369 + {
desc =
'continue' },
374 + DEBUG_MODE:deactivate()
382 + enable = FUCK_STABILITY,
neovim/lua/bugabinga/plugins/markdown-table-mode.lua
Addednew file mode 100644 2 + 'Kicamon/markdown-table-mode.nvim',
3 + commit =
'f830cd15a97deb3acc53d9f6607bc609f7f32e49',
neovim/lua/bugabinga/plugins/telescope.lua
Modified 64 64 command = function ()
require 'telescope.builtin'.live_grep()
end,
68 + description =
'Open undo hisory...',
70 + keys =
'<c-p><c-u>',
71 + command =
function ()
require 'telescope'.extensions.undo.undo()
end,
68 75 description =
'Open search for current buffer content...',
69 76 category =
'search',
98 105 function ( plugin_spec )
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 {
145 153 [
'<c-s>']
= actions.file_split,
146 154 [
'g?']
= actions.which_key,
148 - n
= {
q = actions.close, },
156 + n
= {
q = actions.close },
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' 4 + description =
'Next todo comment',
5 + category =
'navigation',
7 + command =
function ()
8 + require 'todo-comments'.jump_next()
13 + description =
'Previous todo comment',
14 + category =
'navigation',
16 + command =
function ()
17 + require 'todo-comments'.jump_prev()
22 + description =
'Show TODOs',
23 + category =
'navigation',
25 + command =
'<cmd>TodoQuickFix<cr>',
2 29 'folke/todo-comments.nvim',
4 - dependencies = {
'nvim-lua/plenary.nvim', },
32 + dependencies = {
'nvim-lua/plenary.nvim' },
neovim/lua/bugabinga/save_actions.lua
Modified10 10 vim.iter( all_actions ):each(
11 11 function ( action )
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, } )
17 + vim.api.nvim_cmd( parsed_command, {
output =
true } )
24 25 user_command.SaveActions
'Execute all declared save actions' ( apply_save_actions )
27 +map.normal.insert.visual {
27 28 description =
'Save all buffers and apply save actions',
28 29 category =
'actions',
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' )
11 10 local file_exists = function ( path )
12 11 local stat
= vim.uv.fs_stat( path )
14 13 local encode = function ( data )
15 - vim.validate {
data = { data,
'string', }, }
14 + vim.validate {
data = { data,
'string' } }
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
Addednew file mode 100644 1 +require 'patches.snippet' neovim/lua/patches/snippet.lua
Addednew file mode 100644 9 +function vim.snippet.
add( trigger, body, opts )
10 + vim.keymap.set(
'ia', trigger,
function ()
13 + local c
= vim.fn.nr2char( vim.fn.getchar(
0 ) )
15 + vim.api.nvim_feedkeys( trigger
.. c,
'i',
true )
18 + vim.snippet.expand( body )
neovim/lua/std/const.lua
Addednew file mode 100644 2 + win32 = vim.loop.os_uname().sysname:match
'Win',
3 + wsl2 = vim.loop.os_uname().release:match
'WSL2',
4 + os_background = (
function ()
6 + local background
= 'light' 7 + local uname
= vim.uv.os_uname()
9 + if vim.loop.os_uname().release:match
'WSL2' then 11 + if vim.fn.executable
'reg.exe' ~= 0 then 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 20 + elseif vim.fn.executable
'busctl' ~= 0 then 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',
27 + local color_scheme
= result:match
'u%s+(%d+)' 29 + if color_scheme
== '1' then neovim/lua/std/icon.lua
Modifiedneovim/lua/std/ignored.lua
Modifiedwezterm/bugabinga/code_font.lua
Modified 1 1 local wez
= require 'wezterm' 5 - local selected
= 'JetBrains Mono' 6 - local font_names
= {}
8 - local total_weight
= 1 9 - local code_fonts
= io.
open( wez.config_dir
.. '/bugabinga/code_fonts.csv',
'r' )
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+' )
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?' 13 + weight
= tonumber( weight )
14 + if font_name
== font_family
then 15 + weight
= math.
max(
0, adjust( weight ) )
17 + table.
insert( new_lines, weight
.. ', ' .. font_name )
19 + code_fonts:seek(
'set',
0 )
20 + for _, new_line
in ipairs( new_lines )
do 21 + code_fonts:write( new_line,
'\n' )
25 + wez.log_error
'Unable to read and write code_fonts.csv!' 20 - local random_weight
= math.
random( total_weight )
22 - for idx, weight
in ipairs( weights )
do 23 - cursor
= cursor
+ weight
24 - if cursor
>= random_weight
then 25 - selected
= font_names[idx]
34 +local like_current_font = function ( window )
35 + local font
= window:effective_config().font.font
37 + local family
= font[
1].family
38 + adjust_font_randomness_weight( family,
function ( weight )
39 + local new_weight
= weight
+ 1 41 + window:toast_notification(
'code_fonts',
'Font ' .. family
.. '(' .. new_weight
.. ') liked! ',
nil,
500 )
46 +local dislike_current_font = function ( window )
47 + local font
= window:effective_config().font.font
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 )
57 +local ban_current_font = function ( window )
58 + local font
= window:effective_config().font.font
60 + local family
= font[
1].family
61 + adjust_font_randomness_weight( family,
function ()
62 + window:toast_notification(
'code_fonts',
'Font ' .. family
.. ' BANNED!',
nil,
500 )
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' 74 + local font_names
= {}
76 + local total_weight
= 1 77 + local code_fonts
= io.
open( wez.config_dir
.. '/bugabinga/code_fonts.csv',
'r' )
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?' 86 + weight
= tonumber( weight )
87 + table.
insert( font_names, font_name )
88 + table.
insert( weights, weight )
89 + total_weight
= total_weight
+ weight
93 + local random_weight
= math.
random( total_weight )
95 + for idx, weight
in ipairs( weights )
do 96 + cursor
= cursor
+ weight
97 + if cursor
>= random_weight
then 98 + selected
= font_names[idx]
31 - return wez.font( selected )
104 + return wez.font( selected )
108 + like_current_font = like_current_font,
109 + dislike_current_font = dislike_current_font,
110 + ban_current_font = ban_current_font,
wezterm/bugabinga/code_fonts.csv
Modified 2 - 1,
Anonymous Pro Minus 3 - 1,
Aurulent Sans Mono 6 - 1,
BigBlue TerminalPlus 7 - 1,
Bitstream Vera Sans Mono 9 - 1,
CMU Typewriter Text 16 - 1,
Courier Prime Code 26 - 1,
Fantasque Sans Mono 29 - 1,
Fixedsys Excelsior 3.01 46 - 1,
JetBrains Mono NL 48 - 1,
Latin Modern Mono Light 52 - 1,
Linux Libertine Mono 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 70 - 1,
MonteCarlo Fixed 12 71 - 1,
NanumGothic_Coding 74 - 1,
Office Code Pro D 78 - 0,
PixelCarnageMonoTT 93 - 1,
Share-TechMonoTrue 97 - 1,
Symbols Nerd Font 98 - 1,
Symbols Nerd Font Mono 102 - 1,
Verily Serif Mono 106 - 1,
iA Writer Mono V 2 +1,
Anonymous Pro Minus 6 +1,
BigBlue TerminalPlus 7 +1,
Bitstream Vera Sans Mono 9 +1,
CMU Typewriter Text 16 +1,
Courier Prime Code 26 +1,
Fantasque Sans Mono 29 +1,
Fixedsys Excelsior 3.01 48 +1,
Latin Modern Mono Light 52 +1,
Linux Libertine Mono 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 70 +1,
MonteCarlo Fixed 12 71 +1,
NanumGothic_Coding 78 +0,
PixelCarnageMonoTT 93 +1,
Share-TechMonoTrue 98 +1,
Symbols Nerd Font Mono 102 +0,
Verily Serif Mono wezterm/bugabinga/fonts.lua
Modified1 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' 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)
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)
17 31 local key_tables
= {
18 32 [resize_pane_mode] = {
19 33 {
key =
'h',
action = wez.action.AdjustPaneSize {
'Left',
1, }, },
25 39 {
key =
'Escape',
action =
'PopKeyTable', },
27 - [font_size_mode]
= {
28 - {
key =
'-',
action = wez.action.DecreaseFontSize, },
29 - {
key =
'=',
action = wez.action.IncreaseFontSize, },
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', },
56 - action = wez.action.ActivateKeyTable {
name = font_size_mode,
one_shot =
false, },
74 + action = wez.action.ActivateKeyTable {
name = font_mode,
one_shot =
false, },
97 115 {
Foreground = {
AnsiColor =
'Purple', }, },
98 116 {
Text =
'New workspace:', },
100 119 action
= wez.action_callback(
function ( window, pane, line )
102 121 window:perform_action(
wezterm/bugabinga/status.lua
Modified22 22 local zoomed_state
= zoomed( pane )
24 24 if window:leader_is_active()
then 28 28 local config
= window:effective_config()
39 39 local pane_domain
= pane:get_domain_name()
41 - local status
= {
'', }
41 + local status
= {
' ', }
43 43 table.
insert( status, leader )