repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

neovim: cleaner theme and tabline

2eb4b7570bf44f73071ff5bf4541aaf337517bd3

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (31)

helix/config.toml

Modified
1 -theme = "nugu-light"
1 +theme = "nugu-dark"
3 3 [editor]
4 4 shell = ["nu", "--commands"]

neovim/.luarc.jsonc

Modified
2 2 "$schema": "https://raw.githubusercontent.com/sumneko/vscode-lua/master/setting/schema.json",
3 - "runtime": { "version": "LuaJIT" },
4 - "diagnostics": { "globals": [ "vim" ] },
5 - "workspace": { "checkThirdParty": false, },
3 + "diagnostics": {
4 + "globals": [
5 + "vim"
6 + ],
7 + "neededFileStatus": {
8 + "codestyle-check": "Any"
9 + }
10 + },
11 + "workspace": {
12 + "checkThirdParty": false
13 + },
6 14 "runtime": {
7 15 "version": "LuaJIT",
8 16 "pathStrict": true,
9 - "special": { "want": "require" }
17 + "special": {
18 + "want": "require"
19 + }

neovim/README.md

Modified
1 -# Yet another neovim configuration
1 +# bugabinga neovim config
3 -because life is just too long...
3 +neovim configuration is scripting.
4 +scripting with lua + neovim api is programming.
5 -```lua
6 -local why_does_my_heart = "feel so bad"
7 --- why does my soul...
8 -```
6 +## project structure
10 -<table>yoyo</table>
8 +init.lua
9 +: main entry point
11 +lua/std
12 +: standard lib. can only depend on itself and neovim apis.
14 +lua/bugabinga
15 +: config modules. in aggregation, defines all of the config. can depend on itself, std and plugins.
17 +lua/bugabinga/plugins
18 +: third party plugins and their config glue integrating it into the config.
20 +colors/nugu
21 +: color theme
23 +ftplugin
24 +: file type specific config
12 -```xml
13 -<div> some value </div>
14 -```
26 +----------
16 -## it must be a sicknses
28 +# todo
18 -_why_ do I do *this* to ~myself~ ...?
30 +* pandoc with lua filters for diagrams for generating documents and previewing --> https://github.com/tex/vimpreviewpandoc
31 +* think about mini.colors
32 +* setup spell checking for code (english + german)
33 +* use gen.ai to generate docs
34 +* learn marks and refac mark.lua
35 +* use ltex-ls for markdown, code comments and commit messages
36 +* setup DAP
37 +* add nu-check to nvim-lint
38 +* autocomplete in cmdline does not work no more
39 +* make telescope highlights more like NormalFloat

neovim/init.lua

Modified
13 13 require 'bugabinga.lazy'
14 14 -- configures the vim diagnostic subsystem
15 15 require 'bugabinga.diagnostic'
16 +-- Defines `TrimTrailingWhitespace` command
16 17 require 'bugabinga.trim'
18 +-- visualize marks in signcolumn
17 19 require 'bugabinga.mark'
20 +-- setup lsp clients
18 21 require 'bugabinga.lsp'
20 - -- TODO:
21 --- [ ] pandoc with lua filters for diagrams for generating documents and previewing --> https://github.com/tex/vimpreviewpandoc
22 --- [ ] think about mini.colors
23 --- [ ] setup spell checking for code (english + german)
24 --- [ ] use gen.ai to generate docs
25 --- [ ] learn marks and refac mark.lua
26 --- [ ] use ltex-ls for markdown, code comments and commit messages
27 --- [ ] DAP
28 --- [ ] add nu-check to nvim-lint

neovim/justfile

Modified
4 4 set shell := ['nu', '--commands']
6 6 # List available recipes.
7 7 default:
8 8 @just --list
10 +# Reproduce some neovim issue
11 +repro:
12 + nvim -u repro.lua
10 14 # update nvim plugins
11 15 update:
12 16 nvim --headless "+Lazy! sync" +qa

neovim/lazy-lock.json

Modified
16 16 "glow.nvim": { "branch": "main", "commit": "5b38fb7b6e806cac62707a4aba8c10c5f14d5bb5" },
17 17 "heirline.nvim": { "branch": "master", "commit": "7f1e805dfc001d5dbb7d894105063f463f6c7dcc" },
18 18 "hlargs.nvim": { "branch": "main", "commit": "6218a401824c5733ac50b264991b62d064e85ab2" },
19 - "indent-blankline.nvim": { "branch": "master", "commit": "1bee85e1789f61e5ee54e5a18f8fa193099dca99" },
20 - "lazy.nvim": { "branch": "main", "commit": "906ff8e569872d9081cfc9246d917011c22b5e61" },
19 + "indent-blankline.nvim": { "branch": "master", "commit": "0fe34b4c1b926e106d105d3ae88ef6cbf6743572" },
20 + "lazy.nvim": { "branch": "main", "commit": "276e572f645430bcfd6fd25faa301ea9077f6ab1" },
21 21 "lspkind.nvim": { "branch": "master", "commit": "57610d5ab560c073c465d6faf0c19f200cb67e6e" },
22 22 "lush.nvim": { "branch": "main", "commit": "966aad1accd47fa11fbe2539234f81f678fef2de" },
23 23 "mason.nvim": { "branch": "main", "commit": "cd7835b15f5a4204fc37e0aa739347472121a54c" },
28 28 "mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" },
29 29 "neodev.nvim": { "branch": "main", "commit": "a4b6e7ca11ff5be2264d5c169fcedd97d8699ec4" },
30 30 "neogen": { "branch": "main", "commit": "70127baaff25611deaf1a29d801fc054ad9d2dc1" },
31 - "noice.nvim": { "branch": "main", "commit": "fcd01710ff6918d4d3ef90c8e36f3addacba13bf" },
31 + "noice.nvim": { "branch": "main", "commit": "b990101f508b29470bfa16cdf3c08f040d85b435" },
32 32 "nrpattern.nvim": { "branch": "master", "commit": "f862ce687761078ef3155688151c55f69d28453e" },
33 33 "nui.nvim": { "branch": "main", "commit": "c0c8e347ceac53030f5c1ece1c5a5b6a17a25b32" },
34 34 "nvim-autopairs": { "branch": "master", "commit": "748e72c05495a3d30e88a6ef04b21697019a9aa9" },
35 35 "nvim-cmp": { "branch": "main", "commit": "5dce1b778b85c717f6614e3f4da45e9f19f54435" },
36 36 "nvim-colorizer.lua": { "branch": "master", "commit": "dde3084106a70b9a79d48f426f6d6fec6fd203f7" },
37 - "nvim-genghis": { "branch": "main", "commit": "68149dd6591632841d6c18ecffbcbb340633fd25" },
37 + "nvim-genghis": { "branch": "main", "commit": "ba59d6fd8440c9b8928acd22b845d18fe9a8b848" },
38 38 "nvim-gomove": { "branch": "main", "commit": "2b44ae7ac0804f4e3959228122f7c85bef1964e3" },
39 39 "nvim-lastplace": { "branch": "main", "commit": "0bb6103c506315044872e0f84b1f736c4172bb20" },
40 40 "nvim-neoclip.lua": { "branch": "main", "commit": "4e406ae0f759262518731538f2585abb9d269bac" },
41 41 "nvim-notify": { "branch": "master", "commit": "e4a2022f4fec2d5ebc79afa612f96d8b11c627b3" },
42 42 "nvim-surround": { "branch": "main", "commit": "1c2ef599abeeb98e40706830bcd27e90e259367a" },
43 - "nvim-treesitter": { "branch": "master", "commit": "e5198778dbefa14823099dd6d8fba3819a5e7b8a" },
43 + "nvim-treesitter": { "branch": "master", "commit": "eefea35865f1fccc090af7700453d8a979c92035" },
44 44 "nvim-treesitter-textobjects": { "branch": "master", "commit": "76c7a89b41de77a4f83fb77fa072c5ad7605fe3b" },
45 45 "nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" },
46 - "nvim-ts-context-commentstring": { "branch": "main", "commit": "7241635869b7a8115893ffa67bab3907756caf4f" },
47 - "nvim-web-devicons": { "branch": "master", "commit": "a1e6268779411048a87f767a27380089362a0ce2" },
46 + "nvim-ts-context-commentstring": { "branch": "main", "commit": "92e688f013c69f90c9bbd596019ec10235bc51de" },
47 + "nvim-web-devicons": { "branch": "master", "commit": "3af745113ea537f58c4b1573b64a429fefad9e07" },
48 48 "oil.nvim": { "branch": "stevearc-trash", "commit": "b62f680059fffcf7ff89fd88126fbca12418df20" },
49 - "persistence.nvim": { "branch": "main", "commit": "4b8051c01f696d8849a5cb8afa9767be8db16e40" },
49 + "persistence.nvim": { "branch": "main", "commit": "9730a073fd8270e91729d666bcef6a5abc007f02" },
50 50 "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
51 51 "plenary.nvim": { "branch": "master", "commit": "50012918b2fc8357b87cff2a7f7f0446e47da174" },
52 - "schemastore.nvim": { "branch": "main", "commit": "854b38820036d81c5e6af1cae8797776ae5df56a" },
52 + "schemastore.nvim": { "branch": "main", "commit": "f3c4985093716c8ddf93731609ebfc1df7c5335d" },
53 53 "specs.nvim": { "branch": "main", "commit": "2743e412bbe21c9d73954c403d01e8de7377890d" },
54 54 "substitute.nvim": { "branch": "main", "commit": "cf35db50188f3d7de624ae391c9bb9f2e9de5610" },
55 55 "symbols-outline.nvim": { "branch": "master", "commit": "512791925d57a61c545bc303356e8a8f7869763c" },
59 59 "telescope.nvim": { "branch": "0.1.x", "commit": "7011eaae0ac1afe036e30c95cf80200b8dc3f21a" },
60 60 "todo-comments.nvim": { "branch": "main", "commit": "3094ead8edfa9040de2421deddec55d3762f64d1" },
61 61 "toggleterm.nvim": { "branch": "main", "commit": "c80844fd52ba76f48fabf83e2b9f9b93273f418d" },
62 - "treesj": { "branch": "main", "commit": "81d0ae51b84143e228d27b6cf79d09012d2021cb" },
62 + "treesj": { "branch": "main", "commit": "070e6761d0b11a55446d988a69908f7a0928dbab" },
63 63 "twilight.nvim": { "branch": "main", "commit": "8b7b50c0cb2dc781b2f4262a5ddd57571556d1e4" },
64 64 "virt-column.nvim": { "branch": "master", "commit": "9c82009c53e5f9d43b6c0f5e8cb69c53663b786a" },
65 - "which-key.nvim": { "branch": "main", "commit": "7ccf476ebe0445a741b64e36c78a682c1c6118b7" },
65 + "which-key.nvim": { "branch": "main", "commit": "6962dae3565369363b59dd51fb206051555fcb4d" },
66 66 "zen-mode.nvim": { "branch": "main", "commit": "cb73b8bd0ef9d765b942db09dc762c603a89ae44" }

neovim/lua/bugabinga/diagnostic.lua

Modified
73 73 map.normal {
74 74 description = 'Toggle diagnostics',
75 75 category = 'diagnostic',
76 - keys = '<F6><F6>',
76 + keys = '<leader>td',
77 77 command = function ()
78 78 if diagnostic.is_disabled( 0 ) then
79 79 diagnostic.enable( 0 )
114 114 map.normal {
115 115 description = 'Show all diagnostics in workspace',
116 116 category = 'diagnostic',
117 - keys = '<leader><F6>',
117 + keys = '<F6><F6>',
118 118 command = show_diagnostics_in_workspace,
121 -map.normal {
122 - description = 'Go to previous diagnostic',
123 - category = 'diagnostic',
124 - keys = '<C-.>',
125 - command = diagnostic.goto_prev,
128 -map.normal {
129 - description = 'Go to next diagnostic',
130 - category = 'diagnostic',
131 - keys = '<C-,>',
132 - command = diagnostic.goto_next,
135 121 -- a little debug helper to show all kinds of diagnostics
137 123 local dia = function ( severity, line )

neovim/lua/bugabinga/mark.lua

Modified
80 80 ---@param bufnr integer
81 81 local function set_keymaps( bufnr )
82 - vim.api.nvim_buf_set_keymap( bufnr, 'n', '<leader>m', '', {
82 + vim.api.nvim_buf_set_keymap( bufnr, 'n', '<leader>ma', '', {
83 83 desc = 'Add mark',
84 84 callback = function ()
85 85 local ok, mark = pcall( function ()
99 - vim.api.nvim_buf_set_keymap( bufnr, 'n', '<leader>dm', '', {
99 + vim.api.nvim_buf_set_keymap( bufnr, 'n', '<leader>md', '', {
100 100 desc = 'Delete mark',
101 101 callback = function ()
102 102 local ok, mark = pcall( function ()
115 - vim.api.nvim_buf_set_keymap( bufnr, 'n', '<leader>dM', '', {
115 + vim.api.nvim_buf_set_keymap( bufnr, 'n', '<leader>mD', '', {
116 116 desc = 'Delete all buffer marks',
117 117 callback = function ()
118 118 -- This will delete the builtin marks too, but I'll restore

neovim/lua/bugabinga/nugu/init.lua

Modified
39 39 local content_accent = hsl( palette.content_accent )
40 40 local content_minor = hsl( palette.content_minor )
41 41 local content_focus = hsl( palette.content_focus )
42 -local content_unfocus = hsl( palette.content_unfocus )
42 +local content_unfocus = flux(hsl( palette.content_unfocus ), 33) -- FIXME: this change needs to go into nugu
43 43 local content_important_global = hsl( palette.content_important_global )
44 44 local content_important_local = hsl( palette.content_important_local )
60 60 Normal { fg = content_normal, bg = content_backdrop },
61 61 NotifyBackground { bg = ui_backdrop },
62 - Comment { fg = content_important_global, gui = 'bold italic' },
63 - LineNr { fg = ui_minor, bg = ui_backdrop },
62 + Comment { fg = content_important_global },
63 + LineNr { fg = ui_minor, bg = content_backdrop },
64 64 CursorLineNr { fg = ui_focus, bg = ui_backdrop },
65 - Search { fg = content_important_global.readable(), bg = content_important_global },
66 - IncSearch { fg = content_important_local.readable(), bg = content_important_local },
65 + Search { fg = content_important_global, bg = content_important_global.readable() },
66 + IncSearch { fg = content_important_local, bg = content_important_local.readable() },
67 67 NormalFloat { fg = ui_normal, bg = ui_backdrop },
68 - FloatBorder { fg = ui_accent, bg = NormalFloat.bg },
69 - ColorColumn { fg = ui_important_global, bg = content_backdrop },
70 - Conceal { fg = content_normal, bg = ui_unfocus, gui = 'italic' },
71 - Cursor { bg = ui_accent },
72 - lCursor { bg = ui_accent },
73 - CursorIM { bg = ui_accent },
68 + FloatBorder { fg = ui_accent, bg = Normal.bg },
69 + ColorColumn { fg = ui_important_global, bg = Normal.bg },
70 + Conceal { fg = content_focus, bg = Normal.bg },
71 + -- Cursor { bg = ui_accent },
72 + -- lCursor { Cursor },
73 + -- CursorIM { Cursor },
74 74 Directory { fg = Normal.fg },
75 75 DiffAdd { fg = content_focus },
76 76 DiffDelete { fg = content_focus, gui = 'strikethrough' },
77 77 DiffChange { fg = content_important_global },
78 78 DiffText { fg = content_important_local.readable(), bg = content_important_local },
79 - EndOfBuffer { NormalFloat },
80 - TermCursor { lCursor },
81 - TermCursorNC { Cursor },
79 + EndOfBuffer { Normal },
80 + -- TermCursor { Cursor },
81 + -- TermCursorNC { Cursor },
82 82 ErrorMsg { fg = error.readable(), bg = error },
83 - VertSplit { fg = ui_important_global, bg = ui_backdrop },
83 + VertSplit { fg = ui_important_global, bg = LineNr.bg },
84 84 Folded { Conceal },
85 85 FoldColumn { LineNr },
86 86 SignColumn { LineNr },
87 87 ModeMsg { gui = 'bold' },
88 88 MsgArea { Normal },
89 - MsgSeparator { fg = ui_accent },
89 + MsgSeparator { Debug },
90 90 MoreMsg { Normal },
91 91 NonText { fg = content_unfocus },
92 92 Whitespace { NonText },
93 - NormalNC {},
93 + NormalNC { Normal },
94 94 Pmenu { NormalFloat },
95 - PmenuSel { fg = ui_focus, sp = ui_focus.readable(), bg = ui_unfocus, gui = 'underline' },
95 + PmenuSel { fg = ui_important_local, sp = ui_important_local, bg = Pemnu.bg, gui = 'bold underline' },
96 96 PmenuSbar { bg = ui_unfocus },
97 97 PmenuThumb { bg = ui_minor },
98 - Question { fg = ui_important_global, gui = 'bold' },
98 + Question { fg = ui_important_local, gui = 'bold' },
99 99 QuickFixLine { PmenuSel },
100 100 SpecialKey { fg = error, bg = content_unfocus, gui = 'bold' },
101 101 SpellBad { fg = error, gui = 'undercurl' },
104 104 SpellRare { SpellBad },
105 105 StatusLine { fg = ui_normal, bg = ui_backdrop },
106 106 StatusLineNC { fg = ui_minor, bg = ui_backdrop },
107 - Winbar { StatusLine },
108 - WinbarNC { StatusLineNC },
107 + Winbar { fg = ui_normal, bg = LineNr.bg },
108 + WinbarNC { fg = ui_minor, bg = LineNr.bg },
109 109 Title { fg = content_important_global, sp = content_important_global, gui = 'bold underline' },
110 110 TabLine { StatusLine },
111 111 TabLineFill { bg = TabLine.bg },
112 - TabLineSel { fg = ui_accent.readable(), bg = ui_accent, gui = 'underline bold' },
112 + TabLineSel { fg = ui_important_global.readable(), bg = ui_important_global, gui = 'underline bold' },
113 113 Visual { fg = content_focus.readable(), bg = content_focus },
114 114 VisualNOS { fg = Visual.fg, bg = flux( Visual.bg, -42 ) },
115 115 WarningMsg { fg = warning, gui = 'bold' },
116 - WhiteSpace { fg = ui_unfocus },
117 - WildMenu { fg = ui_accent, gui = 'bold' },
116 + WildMenu { Debug },
119 118 String { fg = content_important_local, gui = 'italic' },
120 119 Constant { String },
188 187 LspReferenceText { sp = content_unfocus, gui = 'underline' },
189 188 LspReferenceRead { LspReferenceText },
190 189 LspReferenceWrite { LspReferenceText },
191 - LspInlayHint { fg = content_minor, bg = content_backdrop },
190 + LspInlayHint { fg = content_minor, bg = Normal.bg },
193 192 -- Tree-Sitter syntax groups.
286 285 LazyProgressDone { fg = Search.bg, bg = Cursor.bg, gui = 'bold' },
287 286 LazyProgressTodo { fg = LazyProgressDone.bg, bg = LazyProgressDone.fg, gui = LazyProgressDone.gui },
288 287 LazyProp { LazyComment },
289 - LazyReasonCmd { N.fgormalFloat },
290 - LazyReasonEvent { N.fgormalFloat },
291 - LazyReasonFt { N.fgormalFloat },
292 - LazyReasonImport { N.fgormalFloat },
293 - LazyReasonKeys { N.fgormalFloat },
294 - LazyReasonPlugin { N.fgormalFloat },
295 - LazyReasonRuntime { N.fgormalFloat },
296 - LazyReasonSource { N.fgormalFloat },
297 - LazyReasonStart { N.fgormalFloat },
288 + LazyReasonCmd { NormalFloat },
289 + LazyReasonEvent { NormalFloat },
290 + LazyReasonFt { NormalFloat },
291 + LazyReasonImport { NormalFloat },
292 + LazyReasonKeys { NormalFloat },
293 + LazyReasonPlugin { NormalFloat },
294 + LazyReasonRuntime { NormalFloat },
295 + LazyReasonSource { NormalFloat },
296 + LazyReasonStart { NormalFloat },
298 297 LazySpecial { fg = ColorColumn.fg },
299 298 LazyTaskError { ErrorMsg },
300 299 LazyTaskOutput { Debug },
301 300 LazyUrl { sp = NormalFloat.fg, gui = 'italic underline' },
302 301 LazyValue { gui = 'italic' },
304 - NoiceCmdline { fg = ui_focus, bg = ui_backdrop },
305 - NoiceCmdlineIcon { fg = ui_accent, bg = NoiceCmdline.bg, gui = 'bold' },
303 + NoiceCmdline { NormalFloat },
304 + NoiceCmdlineIcon { fg = ui_accent },
306 305 NoiceCmdlineIconCalculator { NoiceCmdlineIcon },
307 - NoiceCmdlineIconCmdline { fg = ui_accent, bg = NoiceCmdlineIcon.bg, gui = NoiceCmdlineIcon.gui },
306 + NoiceCmdlineIconCmdline { NoiceCmdlineIcon },
308 307 NoiceCmdlineIconFilter { NoiceCmdlineIcon },
309 308 NoiceCmdlineIconHelp { NoiceCmdlineIcon },
310 309 NoiceCmdlineIconIncRename { NoiceCmdlineIcon },
350 349 NoiceCompletionItemWord { NoiceCompletionItemKindDefault },
352 351 NoiceConfirm { NormalFloat },
353 - NoiceConfirmBorder { fg = ui_accent, bg = NormalFloat.bg },
352 + NoiceConfirmBorder { FloatBorder },
354 353 NoiceFormatConfirm { LazyButton },
355 354 NoiceFormatConfirmDefault { LazyButtonActive },
357 - NoiceCursor { Cursor },
356 + -- NoiceCursor { Cursor },
359 358 NoiceFormatDate { NonText },
360 359 NoiceFormatEvent { NonText },
376 375 NoiceMini { DiagnosticInfo },
378 377 NoicePopup { NormalFloat },
379 - NoicePopupBorder { fg = ui_accent, bg = NormalFloat.bg },
378 + NoicePopupBorder { FloatBorder },
381 380 NoicePopupmenu { Pmenu },
382 - NoicePopupmenuBorder { fg = ui_accent, bg = NormalFloat.bg },
381 + NoicePopupmenuBorder { FloatBorder },
383 382 NoicePopupmenuMatch { Bold },
384 383 NoicePopupmenuSelected { PmenuSel },
386 385 NoiceScrollbar { PmenuSbar },
387 386 NoiceScrollbarThumb { PmenuThumb },
389 - NoiceSplit { NormalFloat },
390 - NoiceSplitBorder { NoiceConfirmBorder, bg = NormalFloat.bg },
391 - NoiceVirtualText { fg = ui_important_local, bg = ui_backdrop, gui = 'bold' },
392 - NotifyERRORBorder { DiagnosticError, bg = NormalFloat.bg },
393 - NotifyWARNBorder { DiagnosticWarn, bg = NormalFloat.bg },
394 - NotifyINFOBorder { DiagnosticInfo, bg = NormalFloat.bg },
395 - NotifyDEBUGBorder { fg = Debug.bg, bg = NormalFloat.bg },
396 - NotifyTRACEBorder { DiagnosticHint, bg = NormalFloat.bg },
388 + NoiceSplit { Normal },
389 + NoiceSplitBorder { FloatBorder },
390 + NoiceVirtualText { fg = ui_important_global, bg = ui_unfocus },
391 + NotifyERRORBorder { fg = DiagnosticError.fg, bg = FloatBorder.bg },
392 + NotifyWARNBorder { fg = DiagnosticWarn.fg, bg = FloatBorder.bg },
393 + NotifyINFOBorder { fg = DiagnosticInfo.fg, bg = FloatBorder.bg },
394 + NotifyDEBUGBorder { fg = Debug.bg, bg = FloatBorder.bg },
395 + NotifyTRACEBorder { fg = DiagnosticHint.fg, bg = FloatBorder.bg },
398 - NotifyERRORIcon { NotifyERRORBorder },
399 - NotifyWARNIcon { NotifyWARNBorder },
400 - NotifyINFOIcon { NotifyINFOBorder },
401 - NotifyDEBUGIcon { NotifyDEBUGBorder },
402 - NotifyTRACEIcon { NotifyTRACEBorder },
397 + NotifyERRORIcon { fg = DiagnosticError.fg },
398 + NotifyWARNIcon { fg = DiagnosticWarn.fg },
399 + NotifyINFOIcon { fg = DiagnosticInfo.fg },
400 + NotifyDEBUGIcon { fg = Debug.bg },
401 + NotifyTRACEIcon { fg = DiagnosticHint.fg },
404 - NotifyERRORTitle { NotifyERRORBorder },
405 - NotifyWARNTitle { NotifyWARNBorder },
406 - NotifyINFOTitle { NotifyINFOBorder },
407 - NotifyDEBUGTitle { NotifyDEBUGBorder },
408 - NotifyTRACETitle { NotifyTRACEBorder },
403 + NotifyERRORTitle { fg = DiagnosticError.fg },
404 + NotifyWARNTitle { fg = DiagnosticWarn.fg },
405 + NotifyINFOTitle { fg = DiagnosticInfo.fg },
406 + NotifyDEBUGTitle { fg = Debug.bg },
407 + NotifyTRACETitle { fg = DiagnosticHint.fg },
410 409 NotifyERRORBody { NormalFloat },
411 410 NotifyWARNBody { NormalFloat },
416 415 TelescopeSelectionCaret { PmenuSel },
417 416 TelescopeSelection { PmenuSel },
418 - TelescopeMultiSelection { fg = PmenuSel.fg, bg = ui_important_local },
417 + TelescopeMultiSelection { fg = ui_important_local.readable(), bg = ui_important_local },
420 419 FlashBackdrop {},
421 - FlashMatch { bg = content_unfocus },
422 - FlashCurrent { fg = content_accent, bg = content_unfocus },
423 - FlashLabel { fg = Search.bg, bg = Search.fg },
420 + FlashMatch { fg = Search.bg },
421 + FlashCurrent { fg = IncSearch.bg },
422 + FlashLabel { Search },
425 - GitSignsAdd { fg = DiffAdd.fg, bg = ui_backdrop },
426 - GitSignsChange { fg = DiffChange.fg, bg = ui_backdrop },
427 - GitSignsDelete { fg = DiffDelete.fg, bg = ui_backdrop },
424 + GitSignsAdd { fg = DiffAdd.fg, bg = LineNr.bg },
425 + GitSignsChange { fg = DiffChange.fg, bg = LineNr.bg },
426 + GitSignsDelete { fg = DiffDelete.fg, bg = LineNr.bg },
429 428 GitSignsChangedelete { GitSignsChange },
430 429 GitSignsTopdelete { GitSignsDelete },
470 469 IblIndent { Whitespace },
471 470 IblWhitespace { Whitespace },
472 - IblScope { fg = ui_focus, bg = content_backdrop },
471 + IblScope { fg = ui_focus, bg = Normal.bg },
474 - Hlargs { fg = ui_important_local },
476 - MiniStarterCurrent { fg = ui_accent.readable(), bg = ui_accent }, -- current item.
477 - MiniStarterFooter { Keyword }, -- footer units.
478 - MiniStarterHeader { Comment }, -- header units.
479 - MiniStarterInactive { fg = content_unfocus }, -- inactive item.
480 - MiniStarterItem { Normal }, -- item name.
481 - MiniStarterItemBullet { Whitespace }, -- units from |MiniStarter.gen_hook.adding_bullet|.
482 - MiniStarterItemPrefix { fg = content_focus, gui = '' }, -- unique query for item.
473 + Hlargs { fg = content_important_local },
474 + MiniStarterCurrent { fg = ui_accent.readable(), bg = ui_accent }, -- current item.
475 + MiniStarterFooter { Keyword }, -- footer units.
476 + MiniStarterHeader { Comment }, -- header units.
477 + MiniStarterInactive { fg = content_unfocus }, -- inactive item.
478 + MiniStarterItem { Normal }, -- item name.
479 + MiniStarterItemBullet { Whitespace }, -- units from |MiniStarter.gen_hook.adding_bullet|.
480 + MiniStarterItemPrefix { fg = content_focus, gui = '' }, -- unique query for item.
483 481 MiniStarterSection { fg = content_important_global, gui = 'underline' }, -- section units.
484 - MiniStarterQuery { fg = content_accent.readable(), bg = content_accent }, -- current query in active items.
482 + MiniStarterQuery { fg = content_accent.readable(), bg = content_accent }, -- current query in active items.

neovim/lua/bugabinga/options/behaviour.lua

Modified
27 27 vim.opt.wrap = false
29 --- keep distance to borders while scrolling
30 -vim.opt.scrolloff = 10
29 +-- do not keep distance to borders while scrolling
30 +vim.opt.scrolloff = 0
31 31 vim.opt.sidescrolloff = 0
33 33 -- try to guess indentation based on context

neovim/lua/bugabinga/options/keymaps.lua

Modified
1 1 local map = require 'std.map'
2 +local togglers = require 'bugabinga.options.togglers'
3 4 -- set <SPACE> as leader key
4 5 map {
95 96 map.normal.visual {
96 97 description = 'yank line into system clipboard',
97 98 category = 'editing',
98 - keys = '<leader>yy',
99 + keys = '<leader>Y',
99 100 command = '"+Y',
204 205 keys = '<c-s>',
205 206 command = function ()
206 207 -- trim
207 - vim.cmd [[TrimTrailingWhitespace]]
208 + vim.cmd 'TrimTrailingWhitespace'
208 210 -- format
209 - vim.lsp.buf.format { async = true }
210 - -- save
211 - vim.cmd [[wa]]
211 + vim.lsp.buf.format { async = false }
212 213 -- TODO: run makeprg
213 214 vim.cmd [[silent make]]
216 + -- save
217 + vim.cmd [[wa]]
219 + -- workaround for neovim bug:https://github.com/neovim/neovim/issues/25370
220 + vim.api.nvim_feedkeys( 'zz', 'n', true )
224 +for _, toggler in ipairs( togglers ) do
225 + local option_name = toggler.options[1].name
226 + local first_char = string.sub( option_name, 1, 1 )
228 + map.normal {
229 + description = 'Toggle ' .. option_name .. ' option',
230 + category = 'options',
231 + keys = '<leader>to' .. first_char,
232 + command = function () toggler:toggle() end,
234 +end

neovim/lua/bugabinga/options/togglers.lua

Modified
1 -local icon = require'std.icon'
1 +local icon = require 'std.icon'
3 -local _ = {}
3 +local togglers = {}
5 5 local toggle_on_icon = icon.toggle_on
6 6 local toggle_off_icon = icon.toggle_off
8 +local get_option = function ( name ) return vim.api.nvim_get_option_value( name, {} ) end
9 +local set_option = function ( name, value ) vim.api.nvim_set_option_value( name, value, {} ) end
9 -local get_option = function(name) return vim.api.nvim_get_option_value(name, {}) end
10 -local set_option = function(name, value) vim.api.nvim_set_option_value(name, value, {}) end
12 -local toggle = function(self)
13 - vim.iter(self.options)
14 - :each(function(option)
15 - local current_value = get_option(option.name)
16 - if current_value == option.default then
17 - set_option(option.name, option.alternative)
18 - vim.notify( self.display_name .. ' ' .. toggle_on_icon )
19 - else
20 - set_option(option.name, option.default)
21 - vim.notify( self.display_name .. ' ' .. toggle_off_icon )
22 - end
23 - end)
11 +local toggle = function ( self )
12 + vim.iter( self.options )
13 + :each( function ( option )
14 + local current_value = get_option( option.name )
15 + if current_value == option.default then
16 + set_option( option.name, option.alternative )
17 + vim.notify( self.display_name .. ' ' .. toggle_on_icon )
18 + else
19 + set_option( option.name, option.default )
20 + vim.notify( self.display_name .. ' ' .. toggle_off_icon )
21 + end
22 + end )
26 -local toggler_tostring = function(self)
27 - local all_default = vim.iter(self.options)
28 - :all(function(option) return get_option(option.name) == option.default end)
29 - return self.display_name .. ' ' .. ( all_default and toggle_off_icon or toggle_on_icon )
25 +local toggler_tostring = function ( self )
26 + local all_default = vim.iter( self.options )
27 + :all( function ( option ) return get_option( option.name ) == option.default end )
28 + return self.display_name .. ' ' .. (all_default and toggle_off_icon or toggle_on_icon)
32 -local make_toggler = function( display_name, options)
33 - return {
34 - display_name = display_name,
35 - options = options,
36 - toggle = toggle,
37 - tostring = toggler_tostring,
38 - }
31 +local make_toggler = function ( display_name, options )
32 + return {
33 + display_name = display_name,
34 + options = options,
35 + toggle = toggle,
36 + tostring = toggler_tostring,
37 + }
41 -local make_option = function (name, alternative)
42 - local option_value = get_option(name)
43 - alternative = alternative or not option_value
44 - return {
45 - name = name,
46 - default = option_value,
47 - alternative = alternative,
48 - }
40 +local make_option = function ( name, alternative )
41 + local option_value = get_option( name )
42 + alternative = alternative or not option_value
43 + return {
44 + name = name,
45 + default = option_value,
46 + alternative = alternative,
47 + }
51 -local add_toggler = function( display_name, togglers )
52 - table.insert(_, make_toggler(display_name, togglers ))
50 +local add_toggler = function ( display_name, options )
51 + table.insert( togglers, make_toggler( display_name, options ) )
55 -add_toggler(icon.spelling, { make_option'spell' } )
56 -add_toggler(icon.linenumber, { make_option'number', make_option'relativenumber'})
57 -add_toggler(icon.linehighlight, { make_option'cursorline'} )
58 -add_toggler(icon.virtual, { make_option'virtualedit'} )
54 +add_toggler( icon.spelling, { make_option 'spell' } )
55 +add_toggler( icon.linenumber, { make_option 'number', make_option 'relativenumber' } )
56 +add_toggler( icon.linehighlight, { make_option 'cursorline' } )
57 +add_toggler( icon.virtual, { make_option ('virtualedit', 'all') } )
60 -local tostring = function(self)
61 - return vim.iter(self)
62 - :map(toggler_tostring)
63 - :fold('', function(buffer, text)
64 - return buffer .. (buffer == '' and '' or ' ' ) .. text
65 - end)
59 +local tostring = function ( self )
60 + return vim.iter( self )
61 + :map( toggler_tostring )
62 + :fold( '', function ( buffer, text )
63 + return buffer .. (buffer == '' and '' or ' ') .. text
64 + end )
68 -return setmetatable(_,{
69 - __tostring = tostring,
70 -})
67 +return setmetatable( togglers, {
68 + __tostring = tostring,
69 +} )

neovim/lua/bugabinga/options/ui.lua

Modified
1 -local icon = require'std.icon'
1 +local icon = require 'std.icon'
2 2 local auto = require 'std.auto'
3 3 local ignored = require 'std.ignored'
6 6 description = 'briefly highlight yanked text',
7 7 events = 'TextYankPost',
8 8 pattern = '*',
9 - command = function() vim.highlight.on_yank() end,
9 + command = function () vim.highlight.on_yank() end,
12 12 auto 'disable_columns_in_special_buffers' {
24 +-- TODO: this should probably live in nugu?
26 +-- local hl_to_mode = {
27 +-- n = { bg = 'black' },
28 +-- i = { bg = 'blue' },
29 +-- v = { bg = 'green' },
30 +-- }
31 +--
32 +-- auto 'change_cursor_highlight_based_on_mode' {
33 +-- description = 'Changes the highlight of the cursor based on the current mode.',
34 +-- events = 'ModeChanged',
35 +-- command = function ()
36 +-- local current_mode = vim.fn.mode()
37 +-- local hl = hl_to_mode[current_mode]
38 +-- vim.notify( 'changing Cursor highlight for mode ' .. current_mode .. ' to ' .. vim.inspect( hl ) )
39 +-- if hl then
40 +-- vim.api.nvim_set_hl( 0, 'Cursor', hl )
41 +-- end
42 +-- end,
43 +-- }
24 45 -- show trailing whitespace
25 46 vim.opt.list = true
26 47 vim.opt.listchars = {
91 112 -- pop up menu height
92 113 vim.opt.pumheight = 10
94 --- transparent popups and floating windows
95 -vim.opt.pumblend = 8
96 -vim.opt.winblend = 8
115 +-- no transparent popups and floating windows
116 +vim.opt.pumblend = 0
117 +vim.opt.winblend = 0
98 119 vim.g.border_style = 'shadow'

neovim/lua/bugabinga/plugins/cmp.lua

Modified
23 23 cmp.setup {
24 24 performance = {
25 - debounce = 250,
26 - throttle = 400,
27 - fetching_timeout = 1000,
25 + debounce = 150,
26 + throttle = 300,
27 + fetching_timeout = 400,
29 29 completion = {
30 30 autocomplete = false,

neovim/lua/bugabinga/plugins/gen.lua

Modified
1 1 return {
2 2 'David-Kunz/gen.nvim',
3 3 cmd = 'Gen',
4 - keys = { { 'n', 'v' }, '<leader>g', '<cmd>Gen<cr>' },
5 4 config = function ()
6 5 local gen = require 'gen'
7 6 gen.model = 'kathy'

neovim/lua/bugabinga/plugins/gitsigns.lua

Modified
2 2 local map = require 'std.map'
4 4 return {
5 5 'lewis6991/gitsigns.nvim',
6 - -- branch='main',
7 6 event = 'VeryLazy',
8 7 opts = {
9 8 signs = {
22 21 ignore_whitespace = true,
24 23 current_line_blame_formatter = '<author>(<author_time:%d.%m.%Y>): <summary>',
24 + -- FIXME: on_attach seemingly never gets called
25 25 on_attach = function ( bufnr )
26 26 local gitsigns = require 'gitsigns'

neovim/lua/bugabinga/plugins/heirline.lua

Modified
1 +---@diagnostic disable: param-type-mismatch
1 2 local icon = require 'std.icon'
2 3 local auto = require 'std.auto'
3 4 local ignored = require 'std.ignored'
20 21 local nugu = require 'bugabinga.nugu.palette'
21 22 heirline.load_colors( nugu )
23 - auto 'ReloadHeirlineColors' {
24 + auto 'reload_heirline_colors' {
24 25 description = 'Reload dark/light nugu colors for Heirline',
25 26 events = 'ColorScheme',
26 27 command = function () utils.on_colorscheme( nugu ) end,
220 221 provider = function ()
221 222 local names = {}
222 - for _, client in pairs( vim.lsp.get_active_clients { bufnr = 0 } ) do
223 + for _, client in pairs( vim.lsp.get_clients { bufnr = 0 } ) do
223 224 table.insert( names, client.name )
225 226 return icon.lsp .. ' ' .. table.concat( names, ' ' )
295 296 local svn_get_relative_url = function ()
297 + -- FIXME: replace with vim.system
296 298 local job = require 'plenary.job'
297 - local relative_url = '[ERR]'
299 + local relative_url = { '[ERR]' }
299 301 job:new {
300 302 command = 'svn',
397 399 local terminal_name = {
398 400 provider = function ()
399 - local tname, _ = vim.api.nvim_buf_get_name( 0 ):gsub( '.*:', '' )
400 - tname = vim.fs.basename( tname )
401 - return icon.terminal .. ' ' .. tname
401 + local name, _ = vim.api.nvim_buf_get_name( 0 ):gsub( '.*:', '' )
402 + local basename = vim.fs.basename( name )
403 + return icon.terminal .. ' ' .. (basename or 'noname')
403 405 hl = 'Bold',
439 441 callback = function () require 'lazy'.update() end,
440 442 name = 'update_plugins',
442 - hl = 'LazyProgressTodo',
445 446 local align = { provider = '%=' }
536 537 hl = function ( self )
537 538 if self.is_active then
538 - return { fg = 'content_accent' }
539 - else
539 + return { fg = utils.get_highlight 'TablineSel'.fg }
540 + elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then
540 541 return { fg = 'ui_minor' }
542 + else
543 + return { fg = utils.get_highlight 'Tabline'.fg }
545 548 local tabline_file_name = {
546 549 provider = function ( self )
547 - local file_name = self.file_name
548 - file_name = file_name == '' and NEW_FILE or vim.fs.normalize( vim.fn.fnamemodify( file_name, ':t' ) )
549 - return file_name
550 + local name = self.file_name
551 + return name == '' and NEW_FILE or vim.fs.normalize( vim.fn.fnamemodify( name, ':t' ) )
551 553 hl = function ( self ) return { bold = self.is_active or self.is_visible, italic = true } end,
554 556 local tabline_file_flags = {
556 - condition = function ( self ) return vim.api.nvim_buf_get_option( self.bufnr, 'modified' ) end,
558 + condition = function ( self ) return vim.api.nvim_get_option_value( 'modified', { buf = self.bufnr } ) end,
557 559 provider = icon.modified .. ' ',
560 562 condition = function ( self )
561 - return not vim.api.nvim_buf_get_option( self.bufnr, 'modifiable' ) or
562 - vim.api.nvim_buf_get_option( self.bufnr, 'readonly' )
563 + return not vim.api.nvim_get_option_value( 'modifiable', { buf = self.bufnr } ) or
564 + vim.api.nvim_get_option_value( 'readonly', { buf = self.bufnr } )
564 566 provider = function ( self )
565 - if vim.api.nvim_buf_get_option( self.bufnr, 'buftype' ) == 'terminal' then
567 + if vim.api.nvim_get_option_value( 'buftype', { buf = self.bufnr } ) == 'terminal' then
566 568 return icon.terminal
568 570 return icon.lock
581 583 if self.is_active then
582 584 return 'TabLineSel'
583 585 elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then
584 - return { fg = 'ui_unfocus' }
586 + return { fg = 'ui_minor' }
586 588 return 'TabLine'

neovim/lua/bugabinga/plugins/lush.lua

Modified
4 4 return {
6 6 'rktjmp/lush.nvim',
7 7 branch = 'main',
8 8 lazy = false,
9 9 priority = 1000,
10 - config = function()
11 - vim.cmd.colorscheme 'nugu'
12 - end,
10 + config = function ()
11 + vim.cmd.colorscheme 'nugu'
12 + end,

neovim/lua/bugabinga/plugins/neoclip.lua

Modified
1 -local map = require'std.map'
1 +local map = require 'std.map'
3 3 return {
4 - 'AckslD/nvim-neoclip.lua',
5 - event = 'TextYankPost',
6 - keys = {'y', '<C-v><C-v>' },
7 - dependencies = {
8 - 'nvim-telescope/telescope.nvim',
9 - },
10 - config = function()
11 - local neoclip = require'neoclip'
12 - local telescope = require'telescope'
13 - local themes = require 'telescope.themes'
14 - local cursor = themes.get_cursor { layout_config = { preview_width = 0.42, width = 0.69 } }
4 + 'AckslD/nvim-neoclip.lua',
5 + event = 'TextYankPost',
6 + keys = { 'y', '<C-v><C-v>' },
7 + dependencies = {
8 + 'nvim-telescope/telescope.nvim',
9 + },
10 + config = function ()
11 + local neoclip = require 'neoclip'
12 + local telescope = require 'telescope'
13 + local themes = require 'telescope.themes'
14 + local cursor = themes.get_cursor { layout_config = { preview_width = 0.69, width = 0.42 } }
16 - neoclip.setup{}
17 - telescope.load_extension'neoclip'
16 + neoclip.setup {}
17 + telescope.load_extension 'neoclip'
19 - map.normal {
20 - description = 'Open clipboard history...',
21 - category = 'history',
22 - keys = '<C-v><C-v>',
23 - command = function() telescope.extensions.neoclip.default(cursor) end,
24 - }
19 + map.normal {
20 + description = 'Open clipboard history...',
21 + category = 'history',
22 + keys = '<C-v><C-v>',
23 + command = function () telescope.extensions.neoclip.default( cursor ) end,
24 + }
25 + end,
26 - end,
27 -}

neovim/lua/bugabinga/plugins/noice.lua

Modified
1 1 local map = require 'std.map'
2 -local ignored = require 'std.ignored'
4 3 return {
12 11 opts = {
13 12 cmdline = {
14 - view = 'cmdline', -- cmdline on bottom
13 + view = 'cmdline', -- cmdline on cursor
16 15 lsp = {
16 + signature = {
17 + auto_open = { trigger = false },
18 + },
17 19 -- override markdown rendering so that **cmp** and other plugins use **Treesitter**
18 20 override = {
19 21 ['vim.lsp.util.convert_input_to_markdown_lines'] = true,
21 23 ['cmp.entry.get_documentation'] = true,
24 - smart_move = { excluded_filetypes = ignored.filetypes },
25 26 presets = {
26 27 inc_rename = true, -- enables an input dialog for inc-rename.nvim
27 28 long_message_to_split = true, -- long messages will be sent to a split
43 44 -- does not seem to play well with other popups? -- treesitter in particular
44 45 cmdline = {
45 46 relative = 'cursor',
46 - position = { row = 0, col = 0 },
47 - size = { min_width = 69, width = 'auto', height = 'auto' },
47 + position = { row = 0, col = -2 }, -- -2 makes the cursor stay in the same place
48 + size = { width = 'auto', height = 'auto' },
48 49 border = { style = vim.g.border_style },
50 51 cmdline_popupmenu = {
51 52 relative = 'cursor',
52 53 position = { row = 1, col = 0 },
53 - size = { min_width = 69, width = 'auto', height = 'auto' },
54 + size = { width = 'auto', height = 'auto' },
54 55 border = { style = vim.g.border_style },
55 - win_options = { winhighlight = { Normal = 'NormalFloat', FloatBorder = 'NoiceCmdlinePopupBorder' } },
56 + win_options = { winhighlight = { Normal = 'NormalFloat', FloatBorder = 'FloatBorder' } },
58 59 routes = {
60 61 filter = { cmdline = '^:%s*!' },
61 62 view = 'vsplit'
64 + {
65 + filter = { event = 'msg_show', kind = 'echomsg' },
66 + view = 'mini'
67 + },
68 + {
69 + filter = { event = 'msg_show', kind = '', find = 'written' },
70 + view = 'mini'
71 + },
64 73 filter = { any = { { cmdline = '^:%s*lua%s+' }, { cmdline = '^:%s*lua%s*=%s*' }, { cmdline = '^:%s*=%s*' }, } },
65 74 view = 'cmdline_output',
81 90 description = 'Redirect Cmdline',
82 91 category = 'ui',
83 92 keys = '<S-cr>',
93 + ---@diagnostic disable-next-line: param-type-mismatch
84 94 command = function () noice.redirect( vim.fn.getcmdline() ) end,

neovim/lua/bugabinga/plugins/nui.lua

Added
new file mode 100644
1 +return {
2 + 'MunifTanjim/nui.nvim',
3 +}

neovim/lua/bugabinga/plugins/starter.lua

Modified
1 +local auto = require 'std.auto'
2 +local icon = require 'std.icon'
1 4 return {
2 5 'echasnovski/mini.starter',
3 6 lazy = false,
28 31 -- ~ = relative to home
29 32 local name = vim.fn.fnamemodify( session_path, ':t:r:gs_%_/_:~' )
30 33 local session_restore = 'silent! source ' .. vim.fn.fnameescape( session_path )
31 - local action = function()
32 - vim.cmd (session_restore)
33 - vim.notify('Restored session: ' .. name)
34 + local action = function ()
35 + vim.cmd( session_restore )
36 + vim.notify( 'Restored session: ' .. name )
35 38 local section = 'Sessions'
42 45 starter.setup {
46 + footer = (function ()
47 + local startuptime
49 + auto 'display_startup_time' {
50 + description = 'Display startup time on starter screen',
51 + events = 'User',
52 + pattern = 'LazyVimStarted',
53 + once = true,
54 + command = vim.schedule_wrap( function ()
55 + startuptime = require 'lazy'.stats().startuptime
56 + starter.refresh()
57 + end ),
58 + }
60 + return function ()
61 + return icon.start .. ' ' .. (startuptime or ' ') .. 'ms'
62 + end
63 + end)(),
43 64 header = [[
44 65 ███ ▄ ▄▀ ██ ███ ▄█ ▄ ▄▀ ██
45 66 █ █ █ ▄▀ █ █ █ █ ██ █ ▄▀ █ █
53 74 custom_actions,
54 75 sessions,
55 76 starter.sections.recent_files( is_home and 24 or 8, not is_home, is_home ),
56 - --TODO
57 - -- change cwd when selecting recent file
59 78 content_hooks = {
60 79 starter.gen_hook.adding_bullet(),
61 80 starter.gen_hook.aligning( 'center', 'center' ),
62 - starter.gen_hook.indexing( 'all', { 'Recent files', 'Builtin actions' } ),
81 + starter.gen_hook.indexing( 'all', { 'Recent files', 'Recent files (current directory)', 'Builtin actions' } ),
65 84 end,

neovim/lua/bugabinga/plugins/telescope.lua

Modified
68 68 extensions = {
69 + find_files = {
70 + ivy
71 + },
69 72 ['ui-select'] = { cursor },
70 73 zoxide = {
147 150 command = function() builtin.buffers(cursor) end,

neovim/lua/bugabinga/plugins/toggleterm.lua

Modified
90 90 direction = 'tab',
93 - _G.Gitui = function () gitui:toggle() end
93 + local toggle_gitui = function () gitui:toggle() end
95 95 map.normal.terminal.insert {
96 96 description = 'Toggle gitui terminal in tab',
97 97 category = 'terminal',
98 98 keys = '<F10>',
99 - command = Gitui,
99 + command = toggle_gitui,
102 - vim.cmd [[ command! Gitui lua Gitui() ]]
104 - --[ MDCAT ]
106 - local mdcat = Terminal:new {
107 - hidden = true,
108 - direction = 'vertical',
109 - cmd = '',
110 - }
112 - _G.Mdcat = function ()
113 - local window = vim.api.nvim_get_current_win()
114 - local current_file = vim.api.nvim_buf_get_name( 0 )
115 - mdcat.cmd = 'watch ' .. current_file .. ' { clear; mdcat ' .. current_file .. ' }'
116 - mdcat:toggle()
117 - vim.api.nvim_set_current_win( window )
118 - end
120 - vim.cmd [[ command! Mdcat lua Mdcat() ]]
122 - -- [ GRAPHVIZ ]
124 - local graphviz = Terminal:new {
125 - hidden = true,
126 - direction = 'vertical',
127 - cmd = '',
128 - }
130 - _G.Graphviz = function ()
131 - local window = vim.api.nvim_get_current_win()
132 - local current_file = vim.api.nvim_buf_get_name( 0 )
133 - graphviz.cmd = 'watch ' ..
134 - current_file .. ' { clear; dot -O -Tpng ' .. current_file .. ' ; viu --blocks ' .. current_file .. '.png }'
135 - graphviz:toggle()
136 - vim.api.nvim_set_current_win( window )
137 - end
139 - vim.cmd [[ command! Graphviz lua Graphviz() ]]
102 + vim.api.nvim_create_user_command( 'Gitui', toggle_gitui, { desc = 'Toggle Gitui' } )

neovim/lua/bugabinga/plugins/virt-column.lua

Modified
5 5 'lukas-reineke/virt-column.nvim',
6 6 event = { 'BufReadPost', 'BufNew' },
7 7 opts = {
8 + -- FIXME: I have visual redrawing bugs right now.
9 + enabled = false,
8 10 char = { '░', '▒', '▓' },
9 11 exclude = {
10 12 filetypes = ignored.filetypes,

neovim/lua/bugabinga/plugins/whichkey.lua

Modified
1 1 local ignored = require 'std.ignored'
2 -local icon = require'std.icon'
2 +local icon = require 'std.icon'
4 4 return {
5 5 'folke/which-key.nvim',
9 9 vim.o.timeoutlen = 250
10 10 end,
11 11 opts = {
12 + key_labels = {
13 + ['<space>'] = icon.space_key,
14 + ['<cr>'] = icon.return_key,
15 + ['<tab>'] = icon.tab_key,
16 + ['<esc>'] = icon.esc_key,
17 + ['<bs>'] = icon.backspace_key,
18 + ['<leader>'] = icon.leader_key,
19 + },
12 20 icons = {
13 21 group = icon.group,
16 24 border = vim.g.border_style,
17 25 winblend = vim.o.winblend,
27 + layout = { align = 'center' },
19 28 disable = {
20 29 buftypes = ignored.buftypes,
22 - }
31 + },
32 + config = function ( _, opts )
33 + local wk = require 'which-key'
34 + wk.setup( opts )
36 + -- TODO: how can my own map api be used to generate the following wk prefixes?
37 + -- map should not depend on wk.
38 + -- can map cache mappings to read here?
39 + -- use category as prefix?
40 + wk.register {
41 + ['<leader>'] = {
42 + m = { name = 'mark' }, -- FIXME: this prefix does not show up. why?
43 + l = { name = 'lsp' },
44 + s = {
45 + name = 'swap',
46 + {
47 + p = { name = 'parameter' },
48 + },
49 + },
50 + g = { name = 'generate' },
51 + t = {
52 + name = 'toggle',
53 + {
54 + o = { name = 'options' },
55 + }
56 + },
57 + z = { name = 'lazy' },
58 + [' '] = { name = 'fun' },
59 + }
60 + }
61 + end

neovim/lua/std/auto.lua

Modified
1 +-- TODO: metatable for api like map.modes
1 2 -- Wrapper over `vim.api.nvim_create_autocmd` for automatic grouping and idempotency.
2 3 return function(group_name)
3 4 local group = vim.api.nvim_create_augroup(group_name, { clear = true })
20 21 group = group,
21 22 buffer = autocommand.buffer,
22 23 pattern = autocommand.pattern,
24 + once = autocommand.once,
23 25 command = command,
24 26 callback = callback,

neovim/lua/std/icon.lua

Modified
1 1 return {
2 - ['function'] = '󰡱',
3 - ['local'] = '󱥕',
4 - ['table'] = '',
5 - arrow_left = '',
6 - arrow_right = '',
7 - branch = '',
2 + ['function'] = '󰡱',
3 + ['local'] = '󱥕',
4 + ['table'] = '',
5 + arrow_left = '',
6 + arrow_right = '',
7 + branch = '',
8 8 carriage_return = '␍',
9 - checkbox_mark = '',
9 + checkbox_mark = '',
10 10 checkbox_unmark = '',
11 - command = '󰘳',
12 - close = '',
13 - block = '█',
14 - data = '',
15 - diagnostic = '⊙',
16 - diff_add = '',
17 - diff_change = '',
18 - diff_remove = '',
19 - eol = '↴',
20 - error = '󰇷',
21 - exclaim = '',
22 - extends = '❯',
23 - file = '',
24 - folder = '',
25 - git = '',
26 - global = '󱥔',
27 - group = '',
28 - hash = '',
29 - hint = '󰊪',
30 - info = '󰩖',
31 - insert = '',
32 - lazy = '󰄻',
33 - linehighlight = '󰘤',
34 - linenumber = '󰉻',
35 - lock = '',
36 - lsp = '',
37 - macro = '',
38 - modified = '',
39 - nbsp = '␣',
40 - newline = '␤',
41 - normal = 'Ν',
42 - pending = '',
43 - precedes = '❮',
44 - quot_left = '󰝗',
45 - quot_right = '󰉾',
46 - replace = '',
47 - select = '󰒉',
48 - space = '⋅',
49 - spelling = '󰓆',
50 - subversion = '󰳗',
51 - tab = '󰌒',
52 - terminal = '',
53 - thread = '󱇫',
54 - toggle_off = '',
55 - toggle_on = '',
56 - trail = '•',
57 - user = ' ',
58 - vertical_bar = '│',
59 - vim = '',
60 - virtual = '󰢔',
61 - visual = '󰒉',
62 - warn = '󰱯',
11 + command = '󰘳',
12 + close = '',
13 + block = '█',
14 + data = '',
15 + diagnostic = '⊙',
16 + diff_add = '',
17 + diff_change = '',
18 + diff_remove = '',
19 + eol = '↴',
20 + error = '󰇷',
21 + exclaim = '',
22 + extends = '❯',
23 + file = '',
24 + folder = '',
25 + git = '',
26 + global = '󱥔',
27 + group = '',
28 + hash = '',
29 + hint = '󰊪',
30 + info = '󰩖',
31 + insert = '',
32 + lazy = '󰄻',
33 + linehighlight = '󰘤',
34 + linenumber = '󰉻',
35 + lock = '',
36 + lsp = '',
37 + macro = '',
38 + modified = '',
39 + nbsp = '␣',
40 + newline = '␤',
41 + normal = 'Ν',
42 + pending = '',
43 + precedes = '❮',
44 + quot_left = '󰝗',
45 + quot_right = '󰉾',
46 + replace = '',
47 + select = '󰒉',
48 + space = '⋅',
49 + spelling = '󰓆',
50 + subversion = '󰳗',
51 + tab = '󰌒',
52 + terminal = '',
53 + thread = '󱇫',
54 + toggle_off = '',
55 + toggle_on = '',
56 + trail = '•',
57 + user = ' ',
58 + vertical_bar = '│',
59 + vim = '',
60 + virtual = '󰢔',
61 + visual = '󰒉',
62 + warn = '󰱯',
63 + space_key = '󱁐',
64 + return_key = '',
65 + tab_key = '',
66 + esc_key = '󱊷',
67 + backspace_key = '',
68 + leader_key = '󱁐',
69 + start = '',

neovim/lua/std/map.lua

Modified
1 ---- Maps keys to commands or functions.
3 1 local available_modes = {
4 2 normal_visual_select_operator_pending = '',
85 83 return self
88 -return setmetatable(
86 +--- @overload fun(map:table): function
87 +local map = setmetatable(
90 89 mode = {},
93 92 __index = add_mode,
94 93 __call = bind,
96 +return map

nushell/modules/starship.nu

Added
new file mode 100644
1 +# this file is both a valid
2 +# - overlay which can be loaded with `overlay use starship.nu`
3 +# - module which can be used with `use starship.nu`
4 +# - script which can be used with `source starship.nu`
5 +export-env { load-env {
6 + STARSHIP_SHELL: "nu"
7 + STARSHIP_SESSION_KEY: (random chars -l 16)
8 + PROMPT_MULTILINE_INDICATOR: (
9 + ^/home/oli/.cargo/bin/starship prompt --continuation
10 + )
12 + # Does not play well with default character module.
13 + # TODO: Also Use starship vi mode indicators?
14 + PROMPT_INDICATOR: ""
16 + PROMPT_COMMAND: {||
17 + # jobs are not supported
18 + (
19 + ^/home/oli/.cargo/bin/starship prompt
20 + --cmd-duration $env.CMD_DURATION_MS
21 + $"--status=($env.LAST_EXIT_CODE)"
22 + --terminal-width (term size).columns
23 + )
24 + }
26 + config: ($env.config? | default {} | merge {
27 + render_right_prompt_on_last_line: true
28 + })
30 + PROMPT_COMMAND_RIGHT: {||
31 + (
32 + ^/home/oli/.cargo/bin/starship prompt
33 + --right
34 + --cmd-duration $env.CMD_DURATION_MS
35 + $"--status=($env.LAST_EXIT_CODE)"
36 + --terminal-width (term size).columns
37 + )
38 + }
39 +}}

wezterm/wezterm.lua

Modified
57 57 default_prog = { 'nu' },
58 58 default_cursor_style = 'SteadyBlock',
59 59 cursor_blink_rate = 0,
60 - cursor_thickness = '1cell',
60 + -- cursor_thickness = '1cell',
61 61 window_decorations = window_decorations,
62 62 enable_tab_bar = true,
63 63 -- if this is hidden, we cannot see the right status area