repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

notes: beginning of the end.

bc5c50774b896e9abf55ef5596f3c5306d834b6d

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

my own note taking system.
what could possibly go wrong...

Changed files (31)

fedora.symlinks

Modified
46 46 wezterm
47 47 ~/.config/wezterm
49 +wezterm/wezterm.service
50 +~/.config/systemd/user/wezterm.service
49 52 ssh/config
50 53 ~/.ssh/config

neovim/README.md

Modified
24 24 ftplugin
25 25 : file type specific config
27 -----------
27 +---
29 29 # ai poem
39 39 # todo
41 -* navic highlights do not fit winbar
42 41 * indent line bg overwrites visual selection bg
43 -* fix bg gihlight of treesitter-context
42 +* fix bg highlight of treesitter-context
43 +* fix markdown rendering in doc popup
44 44 * make highlights more visible when expanding snippets
45 +* kill mason again and get lsps via packages.nu
46 +* simplify lsp config
47 + - make my config identical to vim.lsp.ClientConfig
48 + - fuck all that single file and workspace stuff
49 + - move start function and config creation from lsp/init.lua to ftplugin/*.lua
45 50 * make assignment to map.x fail, e.g. `map.normal = {}`...
46 51 * figure out desirable cmp key maps
47 52 * try loading lsp async for better startup perf
48 53 * 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
54 +* replace cmp with vim.lsp.completion when 0.11 comes out
55 +* adapt config to respect `vim.g.nerdfont` (std.const?)
55 56 * check out harper-ls
56 57 * check out ast-grep
57 -* flesh out 'const.lua', move to std?
58 58 * nvim spell for camel case words
59 59 * create skeleton-plugin for default file content based on file type
60 60 (BufNewFile?)

neovim/colors/nugu.lua

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

neovim/ftplugin/lua.lua

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

neovim/init.lua

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

neovim/justfile

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

neovim/lazy-lock.json

Modified
5 5 "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" },
6 6 "LuaSnip": { "branch": "master", "commit": "03c8e67eb7293c404845b3982db895d59c0d1538" },
7 7 "better-escape.nvim": { "branch": "master", "commit": "f45b52f8f87792e8659526f23261ffe278a54be5" },
8 8 "cmp-buffer": { "branch": "main", "commit": "3022dbc9166796b644a841a02de8dd1cc1d311fa" },
9 9 "cmp-nvim-lsp": { "branch": "main", "commit": "39e2eda76828d88b773cc27a3f61d2ad782c922d" },
10 + "cmp-nvim-lsp-signature-help": { "branch": "main", "commit": "031e6ba70b0ad5eee49fd2120ff7a2e325b17fa7" },
10 11 "cmp-nvim-lua": { "branch": "main", "commit": "f12408bdb54c39c23e67cab726264c10db33ada8" },
11 12 "cmp-path": { "branch": "main", "commit": "91ff86cd9c29299a64f968ebb45846c485725f23" },
12 13 "cmp_luasnip": { "branch": "master", "commit": "05a9ab28b53f71d1aece421ef32fee2cb857a843" },
13 14 "colorizer.nvim": { "branch": "master", "commit": "c1602ff3f11566bb7f16f90985b0c59d3d7db0ef" },
14 - "conform.nvim": { "branch": "master", "commit": "1a99fdc1d3aa9ccdf3021e67982a679a8c5c740c" },
15 + "conform.nvim": { "branch": "master", "commit": "50649648851cd0e126dfedd0f3c33b900a6f1ef8" },
16 + "decisive.nvim": { "branch": "main", "commit": "a7251adebccbc9c899cff39a524b20d06e2b78b5" },
15 17 "diffview.nvim": { "branch": "main", "commit": "4516612fe98ff56ae0415a259ff6361a89419b0a" },
16 18 "dressing.nvim": { "branch": "master", "commit": "1b7921eecc65af1baf8ac1dc06f0794934cbcfb2" },
17 19 "flash.nvim": { "branch": "main", "commit": "ec0bf2842189f65f60fd40bf3557cac1029cc932" },
18 - "heirline.nvim": { "branch": "master", "commit": "0d797435e54645a5f98bad7ad6046aac1ef95c1e" },
20 + "heirline.nvim": { "branch": "master", "commit": "7a79753c1a42c3f52e89a6c42429e7f871e560cd" },
21 + "in-and-out.nvim": { "branch": "master", "commit": "ab24cafadc3418dffb0c7e9b0621cff60b9ac551" },
19 22 "indent-blankline.nvim": { "branch": "master", "commit": "3fe94b8034dd5241cb882bb73847303b58857ecf" },
23 + "ivy.nvim": { "branch": "0.x", "commit": "cfa7e29ae4d955508d4f7f2ef08cc0c51ee745ed" },
20 24 "lazy.nvim": { "branch": "main", "commit": "460e1cd8f24e364d54543a4b0e83f6f4ec1f65fb" },
21 25 "lspkind.nvim": { "branch": "master", "commit": "59c3f419af48a2ffb2320cea85e44e5a95f71664" },
22 - "mason.nvim": { "branch": "main", "commit": "e2f7f9044ec30067bc11800a9e266664b88cda22" },
26 + "markdown-table-mode.nvim": { "branch": "main", "commit": "f830cd15a97deb3acc53d9f6607bc609f7f32e49" },
27 + "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
23 28 "mini.bracketed": { "branch": "main", "commit": "833d66df6e0588222312a963780c6ec42ed7437d" },
24 29 "mini.bufremove": { "branch": "main", "commit": "1ee294a97e091d3cf967974df622c0d887890dc2" },
25 30 "mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" },
27 32 "nvim-gomove": { "branch": "main", "commit": "2b44ae7ac0804f4e3959228122f7c85bef1964e3" },
28 33 "nvim-lastplace": { "branch": "main", "commit": "0bb6103c506315044872e0f84b1f736c4172bb20" },
29 34 "nvim-lint": { "branch": "master", "commit": "968a35d54b3a4c1ce66609cf80b14d4ae44fe77f" },
35 + "nvim-lsp-endhints": { "branch": "main", "commit": "391ef40521b631a8a2fb7aef78db6967ead6b39d" },
30 36 "nvim-neoclip.lua": { "branch": "main", "commit": "32e05f2d23dc5b6a284a688c0535a83d1bfc633f" },
31 37 "nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
32 - "nvim-treesitter": { "branch": "master", "commit": "679883ad31f1752cac92a4ca182cee8b2751d4f1" },
38 + "nvim-treesitter": { "branch": "master", "commit": "f027762845fa35ff27fe0487c86537a74a480a0c" },
33 39 "nvim-treesitter-endwise": { "branch": "master", "commit": "8b34305ffc28bd75a22f5a0a9928ee726a85c9a6" },
34 - "nvim-treesitter-textobjects": { "branch": "master", "commit": "bf8d2ad35d1d1a687eae6c065c3d524f7ab61b23" },
40 + "nvim-treesitter-textobjects": { "branch": "master", "commit": "4a2d05ec24eaa6b655c7d19092a3b6c0219d46b9" },
35 41 "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
36 42 "nvim-web-devicons": { "branch": "master", "commit": "26220156aafb198b2de6a4cf80c1b120a3768da0" },
37 43 "oil.nvim": { "branch": "master", "commit": "1eb9fb35a4613518f79790117ed82c367a0b4a22" },
38 44 "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
45 +<<<<<<< HEAD
39 46 "specs.nvim": { "branch": "main", "commit": "8a108c8b37dec1b184a1d3d76c6cf867bfbe9636" },
40 47 "substitute.nvim": { "branch": "main", "commit": "17ffaeb5a1dc2dbef39cf0865d8a4b6000836714" },
48 + "telescope-frecency.nvim": { "branch": "master", "commit": "f67baca08423a6fd00167801a54db38e0b878063" },
41 49 "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
42 50 "telescope-symbols.nvim": { "branch": "master", "commit": "a6d0127a53d39b9fc2af75bd169d288166118aec" },
43 51 "telescope-zoxide": { "branch": "main", "commit": "54bfe630bad08dc9891ec78c7cf8db38dd725c97" },
44 52 "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
45 53 "text-case.nvim": { "branch": "main", "commit": "13daf28a829e6d0646904c94214cb289bb0c6f34" },
54 +<<<<<<< HEAD
46 55 "todo-comments.nvim": { "branch": "main", "commit": "ae0a2afb47cf7395dc400e5dc4e05274bf4fb9e0" },
56 + "toggle.nvim": { "branch": "main", "commit": "50769ba8982d3d3a8fbd1d1a2e5cad63c73df662" },
47 57 "tree-sitter-nu": { "branch": "main", "commit": "e3b4c967937cad628dca09bd098cd780d8288750" },
48 58 "treesj": { "branch": "main", "commit": "0d81326b5afd36babe7dd480aabbb0b05f33e688" },
49 59 "vim-vscode-snippets": { "branch": "master", "commit": "c34e9edee6a00cf3d0b8edb515e08e3df450bcfa" },

neovim/lua/bugabinga/const.lua

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

neovim/lua/bugabinga/lsp/init.lua

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

neovim/lua/bugabinga/options/behaviour.lua

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

neovim/lua/bugabinga/options/keymaps.lua

Modified
1 1 local map = require 'std.map'
2 -local const = require 'bugabinga.const'
2 +local const = require 'std.const'
3 3 local togglers = require 'bugabinga.options.togglers'
5 5 -- set <SPACE> as leader key

neovim/lua/bugabinga/options/ui.lua

Modified
13 13 auto 'disable_columns_in_special_buffers' {
14 14 description = 'Hide columns in buffers, that do not show source code.',
15 - events = { 'FileType', },
15 + events = { 'FileType' },
16 16 pattern = ignored.filetypes,
17 17 command = function ()
18 18 dbg.print 'Hiding columns in buffers without source code'
90 90 vim.opt.foldenable = false
92 92 -- show visual indicators for lines too long
93 -vim.opt.colorcolumn = { '80', '120', '140', }
93 +vim.opt.colorcolumn = { '80', '120', '140' }
95 95 -- highlight the current line
96 96 vim.opt.cursorline = false

neovim/lua/bugabinga/plugins/bracketed.lua

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

neovim/lua/bugabinga/plugins/cmp.lua

Modified
11 11 'hrsh7th/cmp-buffer',
12 12 'hrsh7th/cmp-path',
13 13 'hrsh7th/cmp-nvim-lua',
14 + 'hrsh7th/cmp-nvim-lsp-signature-help',
14 15 'saadparwaiz1/cmp_luasnip',
15 16 'onsails/lspkind.nvim',
16 17 'L3MON4D3/LuaSnip',
94 95 local sources = {
95 96 { name = 'nvim_lua' },
97 + { name = 'nvim_lsp_signature_help' },
96 98 { name = 'nvim_lsp' },
97 99 { name = 'path' },
98 100 { name = 'luasnip' },

neovim/lua/bugabinga/plugins/conform.lua

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

neovim/lua/bugabinga/plugins/genghis.lua

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

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

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

neovim/lua/bugabinga/save_actions.lua

Modified
10 10 vim.iter( all_actions ):each(
11 11 function ( action )
12 12 vim.validate {
13 - action = { action, 'string', },
13 + action = { action, 'string' },
15 15 local parsed_command = vim.api.nvim_parse_cmd( action, {} )
16 - vim.api.nvim_cmd( parsed_command, { output = true, } )
16 + vim.api.nvim_cmd( parsed_command, { output = true } )

neovim/lua/bugabinga/sessions.lua

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

neovim/lua/std/icon.lua

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

neovim/spell/nerd.utf-8.add

Modified
95 95 difftastic
96 96 weechat
97 97 tarsnap
98 +mux

neovim/spell/nerd.utf-8.add.spl

Modified

Previous version contains binary or non-UTF-8 data.

Current version contains binary or non-UTF-8 data.

nushell/login.nu

Modified
9 9 use dwnld.nu
10 10 use packages.nu
11 11 use fedora_bootstrip.nu
12 +use notes.nu
13 14 if $env.WIN32 {
14 15 use refreshenv.nu *

nushell/scripts/notes.nu

Added
new file mode 100644
1 +### bugabingas custom note taking and organizing system
2 +###
3 +### notes are grouped into contexts (folders), so that i can distinguish between
4 +### personal and work related notes.
8 +def validate_context [
9 + context: string
10 +] {
11 + if not ($env.NOTES | path exists) {
12 + error make {
13 + msg: "No notes folder found in environment variables.
14 + Make sure a NOTES variable exists in $env."
15 + }
16 + }
17 + if not ($env.NOTES | path join $context | path exists) {
18 +error make {
19 + msg: $"The given context ($context) does not exist in ($env.NOTES).
20 + Create it and try again."
21 + }
22 + }
25 + export def main [
26 + --context: string = "bugabinga" # which context do the notes belong to
27 +] {
28 + # TODO: the context needs to get overridden by env var, so that switch between work and personal is easy
30 + validate_context $context
32 + ls --short-names ($env.NOTES | path join $context)
33 + # TODO: print some high level view of the notes. tree, graph, text ?
36 +def new_note_id [] { random binary 3 | encode new-base64 --nopad --url }
38 +def new_note [
39 + title: string # title of note. will be used for title and initial heading
40 + author: string # author, usually me...
41 + date: string # creation date of note
42 + tags: list<string> # a list of tags, if already known
43 + context: string # note context
44 +] {
45 + $"---
46 +title: ($title)
47 +author: ($author)
48 +date: ($date)
49 +tags:
50 +- ($context)
51 +($tags | each { '- ' + $in } | str join (char nl))
52 +---
57 +export def new [
58 + title?: string # title of new node
59 + --tags: list<string> # some optional tags for the note
60 + --context: string = "bugabinga" # which context do the notes belong to
61 +] {
62 + validate_context $context
64 + let title = if ($title | is-empty) { input "gimme title: " } else { $title }
65 + let author = 'Oliver Jan Krylow'
66 + let now = date now | date to-record
67 + let date = $"($now.day)/($now.month)/($now.year)" # german dates. what can i say...
68 + let tags = if ($tags == null) { [] } else { $tags }
70 + let note_content = new_note $title $author $date $tags $context
71 + let note_file_name = $"(new_note_id)-($title | str kebab-case).md"
72 + let note_file = [ $env.NOTES $context $note_file_name] | path join
74 + if ($note_file | path exists) {
75 + error make {
76 + msg: "the note you are trying to create exists already"
77 + }
78 + }
80 + $note_content | save --raw $note_file
82 + let editor = if ( $env.EDITOR == null ) { 'vi' } else { $env.EDITOR }
83 + let editor = if ( $env.VISUAL == null ) { $editor } else { $env.VISUAL }
84 + run-external $editor $note_file

wezterm/bugabinga/code_fonts

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

wezterm/bugabinga/code_fonts.csv

Modified
57 57 1, M+ 2m
58 58 1, Martian Mono
59 59 1, Mensch
60 - 1, Meslo LG M DZ
60 + 0, Meslo LG M DZ
61 61 1, Metrickal
62 62 1, Monaspace Argon Var
63 63 1, Monaspace Krypton Var
75 75 1, Oxygen Mono
76 76 1, PT Mono
77 77 1, Panic Sans
78 - 1, PixelCarnageMonoTT
78 + 0, PixelCarnageMonoTT
79 79 1, Pointfree
80 80 1, ProFontWindows
81 81 1, ProggyCleanTT

wezterm/bugabinga/key_binds.lua

Modified
1 1 local wez = require 'wezterm'
3 +local custom_action = function ( _ )
4 + local id = 'custom-action-' .. tostring( wez.time.now() )
5 + wez.on( id, _ )
6 + return wez.action.EmitEvent( id )
7 +end
3 9 local leader = { key = 'VoidSymbol', }
4 10 if wez.target_triple:find 'windows' then
5 11 leader = { key = 'raw:255', }
154 160 mods = 'LEADER',
155 161 action = wez.action.QuitApplication,
164 + key = 'm',
165 + mods = 'LEADER',
166 + action = custom_action( function ( window, pane )
167 + local unix_domain = 'unix'
168 + wez.log_info( 'Current pane domain name: ', pane:get_domain_name() )
169 + if pane:get_domain_name() == unix_domain then
170 + wez.log_info( 'Detaching from: ', unix_domain )
171 + window:perform_action( wez.action.DetachDomain { DomainName = unix_domain, }, pane )
172 + else
173 + wez.log_info( 'Switching to: ', unix_domain )
174 + window:perform_action( wez.action.AttachDomain( unix_domain ), pane )
175 + end
176 + end ),
177 + },
158 180 -- Navigate Tabs by LEADER+n
159 181 for i = 1, 8 do
160 182 -- CTRL+ALT + number to activate that tab

wezterm/bugabinga/mouse_binds.lua

Modified
3 3 local wez = require 'wezterm'
5 5 local bindings = {
7 7 event = { Down = { streak = 3, button = 'Left', }, },
8 + -- FIXME: this needs integration in nushel
8 9 action = wez.action.SelectTextAtMouseCursor 'SemanticZone',
9 10 mods = 'NONE',

wezterm/bugabinga/options.lua

Modified
1 1 local wez = require 'wezterm'
3 -return function(cfg)
4 - cfg.default_cwd = wez.home_dir
5 - cfg.inactive_pane_hsb = {
6 - saturation = 0.42,
7 - brightness = 0.69,
8 - }
9 - cfg.default_cursor_style = 'SteadyBlock'
10 - cfg.check_for_updates = false
11 - cfg.audible_bell = 'Disabled'
12 - cfg.visual_bell = {
13 - fade_in_duration_ms = 69,
14 - fade_out_duration_ms = 69,
15 - target = 'CursorColor',
16 - }
17 - cfg.cursor_blink_rate = 0
18 - cfg.front_end = 'WebGpu'
19 - cfg.max_fps = 144
20 - cfg.unzoom_on_switch_pane = true
21 - cfg.scrollback_lines = 16777216
3 +return function ( cfg )
4 + cfg.default_cwd = wez.home_dir
5 + cfg.inactive_pane_hsb = {
6 + saturation = 0.42,
7 + brightness = 0.69,
8 + }
9 + cfg.default_cursor_style = 'SteadyBlock'
10 + cfg.check_for_updates = false
11 + cfg.audible_bell = 'Disabled'
12 + cfg.visual_bell = {
13 + fade_in_duration_ms = 69,
14 + fade_out_duration_ms = 69,
15 + target = 'CursorColor',
16 + }
17 + cfg.cursor_blink_rate = 0
18 + cfg.front_end = 'WebGpu'
19 + cfg.max_fps = 144
20 + cfg.unzoom_on_switch_pane = true
21 + cfg.scrollback_lines = 16777216
22 + cfg.unix_domains = {
23 + {
24 + name = 'unix',
25 + no_serve_automatically = true, -- managed via systemd
26 + -- multiplexing = "WezTerm",
27 + local_echo_threshold_ms = 10,
28 + },
29 + }

wezterm/bugabinga/status.lua

Modified
36 36 { Text = table.concat( fonts, ', ' ), },
37 37 'ResetAttributes',
39 + local pane_domain = pane:get_domain_name()
40 41 local status = { '', }
41 42 if leader then
47 48 if zoomed_state then
48 49 table.insert( status, zoomed_state )
50 - if current_workspace then
51 - table.insert( status, current_workspace )
52 - end
53 - if font then
54 - table.insert( status, font )
55 - end
52 + local context = wez.format {
53 + { Text = current_workspace, },
54 + { Text = '@', },
55 + { Attribute = { Intensity = 'Bold', }, },
56 + { Text = pane_domain, },
57 + 'ResetAttributes',
58 + }
59 + table.insert( status, context )
61 + table.insert( status, font )
57 63 window:set_right_status( table.concat( status, DELIMITER ) )
58 64 --TODO: shirley, something useful can be done here
66 72 cfg.use_fancy_tab_bar = false
67 73 cfg.tab_max_width = 42
68 74 cfg.tab_bar_at_bottom = true
70 -

wezterm/wezterm.service

Modified
1 1 [Unit]
2 2 Description=Wezterm Multiplexing Server
3 -After=gnome-session.target
5 4 [Service]
6 5 ExecStart=/usr/bin/wezterm-mux-server
7 6 Restart=on-failure
9 8 [Install]
10 -WantedBy=gnome-session.target
9 +WantedBy=default.target