repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

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

c5f9ef36544a6025e02e029143a66b78f54f4bdd

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (24)

+311 / −349 text lines

Diff layout

README.md

Modified

+46 / −114 text lines

1# bugabingas personal dotfiles, 33rd attempt
1# bugabinga neovim config
3Shared configuration files between some Linux and some Windows hosts.
3neovim configuration is scripting.
4scripting with lua + neovim api is programming.
5## bootstrapping a new host
6## project structure
71. Install git
81. Install a JDK
91. `git clone git@github.com:bugabinga/dotfiles`
101. `cd dotfiles`
111. `java bootstripper.java`
8init.lua
9: main entry point
10\
11lua/std
12: standard lib. can only depend on itself and neovim apis.
13\
14lua/bugabinga
15: config modules. in aggregation, defines all of the config. can depend on itself, std and plugins.
16\
17lua/bugabinga/plugins
18: third party plugins and their config glue integrating it into the config.
19\
20colors/nugu
21: color theme
22\
23ftplugin
24: file type specific config
13> Pay attention to already existing symlinks!
26----------
15## windows
28# ai poem
17Initial setup on windows is a little more sophisticated, because I am used to a developers environment.
30I am the bone of my code, bugs are my body and exceptions are my blood.
31I have created over a thousand bugs, unknown to testers, nor known to debuggers.
32Have withstood pain to create many programs, yet those hands will never hold a working program.
33So as I pray, Unlimited Bug Works.
191. Enable Developer Mode, so that it is allowed to make symlinks without admin permissions.
201. Install Build Tools with C++ Option (for Rust and cargo tools)
211. Install Git without internal SSH
221. Start ssh-agent service
231. Enable `UTF-8` in regional settings
35~ Shirou Emiya
25## rough goals
37---------
27- minimal amount of dependencies
28 This helps in setting up new host.
29 But it is really hard to achieve when hosts are allowed to be Windows and Linux AND [OpenBSD] ...
30 The current state is a compromise reached after some experimentation.
31- editing and applying configs is "natural"
32 Natural in this context is to mean: as if there was no dotfiles repository used for sharing.
33 This is achieved by sym-linking the files from the dotfiles repository into their normal locations.
34 So when it comes time to edit a config file, you can stay blissfully unaware of the dotfiles repository.
39# todo
36## handling per host differences
38There are two classes of differences in configurations between platforms (specifically Linux and Windows in my case).
40### differing locations of config files
42For example, [NeoVim] stores its configuration at `~/.config/nvim` in Linux and at `~/AppData/Roaming/nvim` in Windows.
43In order to handle theses differences each host gets its own symlink file with the naming pattern `(hostname).symlinks`.
44The format of this file is:
46```txt
47path to configuration file/directory relative to dotfiles root
48absolute path of symlink on host
49```
51Each symlink path pair is to be delimited by a newline.
52Example:
54```txt
55neovim
56~/.config/nvim
58foo/bar.conf
59~/.config/foobar.conf
60```
62This file will be parsed by [bootstripper] in order to create those symlinks.
64### differing values in configuration files
66Most often, these come down to different paths of stuff, that get referred to in config files.
67For example, [topgrade], an abstraction over a bunch of package managers and updaters, might want to know the location of your git repositories, so it can pull them for you.
68Some programs, e.g. [NeoVim], have rich configuration languages that are powerful enough for you to resolve those differences with conditionals.
69However some programs, e.g. [topgrade], offer only declarative configuration languages, which make it impossible to resolve this problem in the config.
70I tried solving this problem with some kind of a templating engine.
71But I quickly gave up on that, because it was too annoying to manage.
72Specifically, editing configuration stopped being "natural", meaning you cannot simply open and edit the file at the location you expect the config to be anymore.
73This natural flow is the reason symlinks are used.
74With templating in the mix, an intermediary step is necessary, between editing and applying config.
75Too much work.
76Instead, I use the `(hostname).symlink` files to resolve such cases.
77That means, that config files are completely independent per host, and as such some duplication of configuration occurs.
78A tradeoff well worth it in my opinion.
80## WIP:secrets
82Secrets are encrypted and saved as file into the `tresor` folder.
83The name of these file is a random UUID, which I map to their original purpose somewhere else.
84Those secret files are decrypted either by [bootstripper] or on demand in my scripts.
86## the trouble with bootstrapping dotfiles
88Most of my previous attempts at managing my configuration files failed because it is tricky to share them between Windows and Unix systems.
89If all my hosts were Unix(y), I would write a POSIX shell script and be done with it.
90But that does not work for Windows.
92Since I find it important to be able to setup my configuration files on any fresh new host, it is important to have as few dependencies as possible.
93However, with Windows in the mix, this is pretty hard, so I settled on a compromise: JDK.
95Things I tried in the past to solve this problem:
97- dotfiles managers (e.g. [chezmoi])
98 > too much work
99- writing a bootstrap/installer with [cosmopolitan]
100 > extremely cool tech. unfortunately I am not a C programmer so I struggled a lot.
101 > also, the resulting binary rewrites itself on first run. How do I keep a file version controlled that is allowed to change on first use, but should not result in a new modification...?
102 > furthermore, managing the [cosmopolitan] toolchain for windows made extra work.
103- use POSIX shell for Unix, use PowerShell for Windows
104 > too much work. maintaining the same program in 2 different languages ... depressing not because you have to write twice, but because you have to test twice.
105- Pretend Windows is Unix by only interfacing with it through [WSL].
106 > Windows is not Unix. [WSL] is cute, even useful for cross-compilation and testing. But when I am on Windows I want to use Windows, when I am on Linux I want to use Linux. Fighting the platform constantly is too tiring.
108Things I have not tried (yet?):
110- Use a language with a pleasant cross-compile story ([golang], [Rust], [ziglang]) and version control a binary for those platforms I care about.
111- Use [PowerShell Core] and maybe a script per platform to install it. This could be nice if [PowerShell Core] would replace [PowerShell Windows] and it was my main shell.
113[NeoVim]: https://neovim.io/
114[topgrade]: https://github.com/r-darwish/topgrade
115[bootstripper]: https://github.com/bugabinga/dotfiles/blob/trunk/bootstripper.java
116[chezmoi]: https://github.com/twpayne/chezmoi
117[golang]: https://golang.org/
118[Rust]: https://www.rust-lang.org/
119[ziglang]: https://ziglang.org/
120[WSL]: https://docs.microsoft.com/en-us/windows/wsl/about
121[PowerShell Core]: https://github.com/PowerShell/PowerShell
122[PowerShell Windows]: https://de.wikipedia.org/wiki/PowerShell
123[OpenBSD]: https://www.openbsd.org/
124[cosmopolitan]: https://github.com/jart/cosmopolitan
41* kill lush
42* write plugin to parse lsp settings locally and apply them
43* is there a use case for a plugin that parses local plugin configuration overrides?
44* kill custom lsp stuff in favor of lspconfig and try neoconf + nvim-java
45* does status bar fail to display if lsp fails to load?
46* pandoc with lua filters for diagrams for generating documents and previewing --> https://github.com/tex/vimpreviewpandoc
47* use gen.ai to generate docs
48* learn marks and refactor mark.lua
49* use ltex-ls for markdown, code comments and commit messages
50* create a floating window that shows plugins, that have commands, as reminder
51* setup DAP
52* add nu-check to nvim-lint
53* create facade over vim.api.nvim_create_user_command
54* create skeleton-plugin for default file content based on file type
55* add support for Java multi line string in autopairs
56* nvim spell for camel case words

neovim/.editorconfig

Modified

+4 / −4 text lines

1717max_line_length = 120
1919# optional crlf/lf/cr/auto, if it is 'auto', in windows it is crlf other platforms are lf
20# in neovim the value 'auto' is not a valid option, please use 'unset'
20# in neovim the value 'auto' is not a valid option, please use 'unset'
2121end_of_line = lf
2323# none/ comma / semicolon / only_kv_colon
2424table_separator_style = comma
2626#optional keep/never/always/smart
27trailing_table_separator = keep
27trailing_table_separator = always
2929# keep/remove/remove_table_only/remove_string_only
3030call_arg_parentheses = remove
105105# [line space]
107107# The following configuration supports four expressions
108# keep
109# fixed(n)
108# keep
109# fixed(n)
110110# min(n)
111111# max(n)
112112# for eg. min(2)

neovim/README.md

Modified

+2 / −0 text lines

3939# todo
41* write plugin to parse lsp settings locally and apply them
42* is there a use case for a plugin that parses local plugin configuration overrides?
4143* kill custom lsp stuff in favor of lspconfig and try neoconf + nvim-java
4244* does status bar fail to display if lsp fails to load?
4345* pandoc with lua filters for diagrams for generating documents and previewing --> https://github.com/tex/vimpreviewpandoc

neovim/lazy-lock.json

Modified

+19 / −19 text lines

11{
2 "Comment.nvim": { "branch": "master", "commit": "0236521ea582747b58869cb72f70ccfa967d2e89" },
3 "actions-preview.nvim": { "branch": "master", "commit": "5c240e6356156b72cfbf7c05feefadae61d7a06f" },
2 "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" },
3 "actions-preview.nvim": { "branch": "master", "commit": "5072b1b1065a6b22bdd46b5c21780a91d6a08071" },
44 "auto-dark-mode.nvim": { "branch": "master", "commit": "e328dc463d238cb7d690fb4daf068eba732a5a14" },
55 "better-escape.nvim": { "branch": "master", "commit": "7e86edafb8c7e73699e0320f225464a298b96d12" },
66 "diffview.nvim": { "branch": "main", "commit": "3dc498c9777fe79156f3d32dddd483b8b3dbd95f" },
7 "dressing.nvim": { "branch": "master", "commit": "6f212262061a2120e42da0d1e87326e8a41c0478" },
7 "dressing.nvim": { "branch": "master", "commit": "18e5beb3845f085b6a33c24112b37988f3f93c06" },
88 "flash.nvim": { "branch": "main", "commit": "48817af25f51c0590653bbc290866e4890fe1cbe" },
9 "gen.nvim": { "branch": "main", "commit": "85a739cea06148a56d52f26b01d63de6671ce4ce" },
10 "gitsigns.nvim": { "branch": "main", "commit": "2c2463dbd82eddd7dbab881c3a62cfbfbe3c67ae" },
9 "gen.nvim": { "branch": "main", "commit": "9682435008677a329f8b1f1cd812903fd2b9d6f4" },
10 "gitsigns.nvim": { "branch": "main", "commit": "6ef8c54fb526bf3a0bc4efb0b2fe8e6d9a7daed2" },
1111 "glow.nvim": { "branch": "main", "commit": "238070a686c1da3bccccf1079700eb4b5e19aea4" },
1212 "heirline.nvim": { "branch": "master", "commit": "03cff30d7e7d3ba6fdc00925f015822f79cef908" },
1313 "hlargs.nvim": { "branch": "main", "commit": "0f2dbf02ff948e8fc8ebe07b215f3174a12bbe3c" },
1616 "lazy.nvim": { "branch": "main", "commit": "83493db50a434a4c5c648faf41e2ead80f96e478" },
1717 "lush.nvim": { "branch": "main", "commit": "2e8d34e748642621d761a65e3c2a198154b914e8" },
1818 "mason-tool-installer.nvim": { "branch": "main", "commit": "1212fb6082b7177dde17ea65e429e027835aeb40" },
19 "mason.nvim": { "branch": "main", "commit": "3b5068f0fc565f337d67a2d315d935f574848ee7" },
19 "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
2020 "mini.align": { "branch": "main", "commit": "f845218c5fea89e49074e48270dc5e1b9511a0f9" },
2121 "mini.bracketed": { "branch": "main", "commit": "65c7dfb51e832de9e279e5d5b0741e7af6755ab5" },
2222 "mini.colors": { "branch": "main", "commit": "f64963332f7fcb45c8dfcc243f682a9a0fb9935d" },
2323 "mini.starter": { "branch": "main", "commit": "ce222a5b6de50a9963c1eb62aa16ec6d5efca7ee" },
2424 "mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" },
25 "neoconf.nvim": { "branch": "main", "commit": "db1d1bd45f4e91da6abc898281711fa47eda0ece" },
2625 "neogen": { "branch": "main", "commit": "b95347a588401a755eadd17482edc1662876bd58" },
2726 "nrpattern.nvim": { "branch": "master", "commit": "f862ce687761078ef3155688151c55f69d28453e" },
28 "nui.nvim": { "branch": "main", "commit": "756c59f46057cd2d43619cd3a6d4e01b2aa60295" },
27 "nui.nvim": { "branch": "main", "commit": "3dc46d725f7b94bee5117c0a699b57b1902b5d65" },
2928 "nvim-autopairs": { "branch": "master", "commit": "c6139ca0d5ad7af129ea6c89cb4c56093f2c034a" },
3029 "nvim-colorizer.lua": { "branch": "master", "commit": "85855b38011114929f4058efc97af1059ab3e41d" },
3130 "nvim-genghis": { "branch": "main", "commit": "8613fc1b43db6cc761733b3630eabff9e86296f7" },
3534 "nvim-neoclip.lua": { "branch": "main", "commit": "798cd0592a81c185465db3a091a0ff8a21af60fd" },
3635 "nvim-spectre": { "branch": "master", "commit": "e7db8ebca7fd0a604027ebf85acee52f6642c91c" },
3736 "nvim-surround": { "branch": "main", "commit": "84a26afce16cffa7e3322cfa80a42cddf60616eb" },
38 "nvim-tree.lua": { "branch": "master", "commit": "efafd73efa9bc8c26282aed563ba0f01c7465b06" },
39 "nvim-treesitter": { "branch": "master", "commit": "9775d5d7c724f81acdd441e7e9edefc4514e990b" },
40 "nvim-treesitter-textobjects": { "branch": "master", "commit": "b7a0bfa3e93697ca5b61b15df633404bf8f45883" },
37 "nvim-tree.lua": { "branch": "master", "commit": "041dbd18f440207ad161503a384e7c82d575db66" },
38 "nvim-treesitter": { "branch": "master", "commit": "f197a15b0d1e8d555263af20add51450e5aaa1f0" },
39 "nvim-treesitter-textobjects": { "branch": "master", "commit": "d2a4ffc22d9d38d44edb73da007b3cf43451e9b4" },
4140 "nvim-ts-autotag": { "branch": "main", "commit": "531f48334c422222aebc888fd36e7d109cb354cd" },
4241 "nvim-ts-context-commentstring": { "branch": "main", "commit": "7ab799a9792f7cf3883cf28c6a00ad431f3d382a" },
43 "nvim-web-devicons": { "branch": "master", "commit": "4adea17610d140a99c313e3f79a9dc01825d59ae" },
42 "nvim-web-devicons": { "branch": "master", "commit": "75df79feb02d5e0ec114e447453775d4d291ea03" },
4443 "nvim-window": { "branch": "main", "commit": "e7f5d60eeec8ff37af7be4c9a99f65edf67fc574" },
45 "oil.nvim": { "branch": "master", "commit": "18dfd2458dc741fea683357a17aaa95870b25a3c" },
46 "persistence.nvim": { "branch": "main", "commit": "4982499c1636eac254b72923ab826ee7827b3084" },
44 "oil.nvim": { "branch": "master", "commit": "32e18df30f937e02135398c270b72a4d24b40120" },
45 "persistence.nvim": { "branch": "main", "commit": "ad538bfd5336f1335cdb6fd4e0b0eebfa6e12f32" },
4746 "playground": { "branch": "master", "commit": "ba48c6a62a280eefb7c85725b0915e021a1a0749" },
4847 "plenary.nvim": { "branch": "master", "commit": "f7adfc4b3f4f91aab6caebf42b3682945fbc35be" },
49 "schemastore.nvim": { "branch": "main", "commit": "6eb5d8d9ec9f81b75aaa6d15d0f6dc12a066fd3f" },
48 "schemastore.nvim": { "branch": "main", "commit": "7a4bac1aa44c50979432b71f34f237bad3a0a232" },
5049 "specs.nvim": { "branch": "main", "commit": "e929006d3f6bb8e43f03e13ac364c67236eb5299" },
5150 "speedtyper.nvim": { "branch": "main", "commit": "2d158eed4c753995b0501a3a7a72464fbb213e3d" },
5251 "ssr.nvim": { "branch": "main", "commit": "bb323ba621ac647b4ac5638b47666e3ef3c279e1" },
5554 "telescope-symbols.nvim": { "branch": "master", "commit": "a6d0127a53d39b9fc2af75bd169d288166118aec" },
5655 "telescope-ui-select.nvim": { "branch": "master", "commit": "6e51d7da30bd139a6950adf2a47fda6df9fa06d2" },
5756 "telescope-zoxide": { "branch": "main", "commit": "68966349aa1b8e9ade403e18479ecf79447389a7" },
58 "telescope.nvim": { "branch": "0.1.x", "commit": "d90956833d7c27e73c621a61f20b29fdb7122709" },
59 "todo-comments.nvim": { "branch": "main", "commit": "833d8dd8b07eeda37a09e99460f72a02616935cb" },
57 "telescope.nvim": { "branch": "master", "commit": "6312868392331c9c0f22725041f1ec2bef57c751" },
58 "todo-comments.nvim": { "branch": "main", "commit": "8febc60a76feefd8203077ef78b6a262ea1a41f9" },
6059 "toggleterm.nvim": { "branch": "main", "commit": "193786e0371e3286d3bc9aa0079da1cd41beaa62" },
61 "tree-sitter-nu": { "branch": "main", "commit": "7dd29f9616822e5fc259f5b4ae6c4ded9a71a132" },
60 "transparent.nvim": { "branch": "main", "commit": "fd35a46f4b7c1b244249266bdcb2da3814f01724" },
61 "tree-sitter-nu": { "branch": "main", "commit": "c5b7816043992b1cdc1462a889bc74dc08576fa6" },
6262 "treesj": { "branch": "main", "commit": "60e27280030f9cd8dfb6ceb335922c6ff76682cc" },
6363 "twilight.nvim": { "branch": "main", "commit": "8b7b50c0cb2dc781b2f4262a5ddd57571556d1e4" },
6464 "virt-column.nvim": { "branch": "master", "commit": "b62b4ef0774d19452d4ed18e473e824c7a756f2f" },
65 "which-key.nvim": { "branch": "main", "commit": "4433e5ec9a507e5097571ed55c02ea9658fb268a" },
65 "which-key.nvim": { "branch": "main", "commit": "ce741eb559c924d72e3a67d2189ad3771a231414" },
6666 "zen-mode.nvim": { "branch": "main", "commit": "78557d972b4bfbb7488e17b5703d25164ae64e6a" }
6767}No final newline

neovim/lua/bugabinga/lsp/clients/init.lua

Modified

+1 / −0 text lines

77 require 'bugabinga.lsp.clients.c',
88 require 'bugabinga.lsp.clients.graphviz',
99 require 'bugabinga.lsp.clients.markdown',
10 require 'bugabinga.lsp.clients.nu',
1011 require 'bugabinga.lsp.clients.rust',
1112 require 'bugabinga.lsp.clients.toml',
1213 require 'bugabinga.lsp.clients.vim',

neovim/lua/bugabinga/lsp/clients/nu.lua

Added
new file mode 100644

+10 / −0 text lines

1local project = require 'std.project'
2
3return {
4 name = 'nulsp',
5 command = { 'nu', '--lsp' },
6 filetypes = { 'nu' },
7 root_dir = project.find_project_root,
8 single_file_support = true,
9 workspaces = false,
10}

neovim/lua/bugabinga/lsp/clients/zig.lua

Modified

+2 / −2 text lines

1local project = require'std.project'
1local project = require 'std.project'
33return {
44 name = 'zls',
5 command = 'zls',
5 command = 'zls',
66 filetypes = { 'zig', 'zir' },
77 root_dir = project.find_zig_project_root,
88 single_file_support = true,

neovim/lua/bugabinga/nugu/init.lua

Modified

+1 / −0 text lines

471471 IblScope { fg = ui_focus, bg = Normal.bg },
473473 Hlargs { fg = content_important_local },
474475 MiniStarterCurrent { fg = ui_accent.readable(), bg = ui_accent }, -- current item.
475476 MiniStarterFooter { Keyword }, -- footer units.
476477 MiniStarterHeader { Comment }, -- header units.

neovim/lua/bugabinga/plugins/comment.lua

Modified

+15 / −14 text lines

1return {{
2 'numToStr/Comment.nvim',
3 keys = {
4 { "gc", mode = { "n", "v" }, desc = "Comment toggle linewise" },
5 { "gb", mode = { "n", "v" }, desc = "Comment toggle blockwise" },
6 },
7 dependencies = {
8 "JoosepAlviste/nvim-ts-context-commentstring",
9 },
10 opts = function()
11 local commentstring_avail, commentstring = pcall(require, "ts_context_commentstring.integrations.comment_nvim")
12 return commentstring_avail and commentstring and { pre_hook = commentstring.create_pre_hook() } or {}
13 end,
14}}
1return { {
2 'numToStr/Comment.nvim',
3 tag = 'v0.8.0',
4 keys = {
5 { 'gc', mode = { 'n', 'v', }, desc = 'Comment toggle linewise', },
6 { 'gb', mode = { 'n', 'v', }, desc = 'Comment toggle blockwise', },
7 },
8 dependencies = {
9 'JoosepAlviste/nvim-ts-context-commentstring',
10 },
11 opts = function ()
12 local commentstring_avail, commentstring = pcall( require, 'ts_context_commentstring.integrations.comment_nvim' )
13 return commentstring_avail and commentstring and { pre_hook = commentstring.create_pre_hook(), } or {}
14 end,
15}, }

neovim/lua/bugabinga/plugins/flash.lua

Modified

+6 / −5 text lines

11return {
22 'folke/flash.nvim',
3 tag = 'v1.18.2',
34 event = 'VeryLazy',
45 opts = {
5 highlight = { backdrop = false },
6 modes = { char = { highlight = { backdrop = false, } },
6 highlight = { backdrop = false, },
7 modes = { char = { highlight = { backdrop = false, }, },
78 },
89 },
910 keys = {
1011 {
1112 '<cr>',
12 mode = { 'n', 'x', 'o' },
13 mode = { 'n', 'x', 'o', },
1314 function () require 'flash'.jump() end,
1415 desc = 'Flash',
1516 },
1617 {
1718 '<s-cr>',
18 mode = { 'n', 'o', 'x' },
19 mode = { 'n', 'o', 'x', },
1920 function () require 'flash'.treesitter() end,
2021 desc =
21 'Flash Treesitter'
22 'Flash Treesitter',
2223 },
2324 },

neovim/lua/bugabinga/plugins/genghis.lua

Modified

+12 / −11 text lines

1616 },
1717 dependencies = {
1818 'stevearc/dressing.nvim',
19 'hrsh7th/nvim-cmp',
20 'hrsh7th/cmp-omni',
2119 },
2220 config = function ()
23 require 'genghis' -- no setup needed
24 local cmp = require 'cmp'
25 cmp.setup.filetype(
26 'DressingInput',
27 ---@diagnostic disable-next-line: missing-fields
28 {
29 sources = cmp.config.sources { { name = 'omni' } }
30 }
31 )
21 local genghis = require 'genghis' -- no setup needed
22 local keymap = vim.keymap.set
23 keymap( 'n', '<leader>yp', genghis.copyFilepath )
24 keymap( 'n', '<leader>yn', genghis.copyFilename )
25 keymap( 'n', '<leader>cx', genghis.chmodx )
26 keymap( 'n', '<leader>rf', genghis.renameFile )
27 keymap( 'n', '<leader>mf', genghis.moveAndRenameFile )
28 keymap( 'n', '<leader>mc', genghis.moveToFolderInCwd )
29 keymap( 'n', '<leader>nf', genghis.createNewFile )
30 keymap( 'n', '<leader>yf', genghis.duplicateFile )
31 keymap( 'n', '<leader>df', genghis.trashFile )
32 keymap( 'x', '<leader>x', genghis.moveSelectionToNewFile )
3233 end,

neovim/lua/bugabinga/plugins/gitsigns.lua

Modified

+12 / −11 text lines

33return {
44 'lewis6991/gitsigns.nvim',
5 tag = 'v0.7',
56 event = 'VeryLazy',
67 opts = {
78 signs = {
8 add = { text = '│' },
9 change = { text = '│' },
10 delete = { text = '_' },
11 topdelete = { text = '‾' },
12 changedelete = { text = '~' },
13 untracked = { text = '┆' },
9 add = { text = '│', },
10 change = { text = '│', },
11 delete = { text = '_', },
12 topdelete = { text = '‾', },
13 changedelete = { text = '~', },
14 untracked = { text = '┆', },
1415 },
1516 preview_config = {
1617 border = vim.g.border_style,
5253 category = 'git',
5354 keys = '<leader>hs',
5455 buffer = bufnr,
55 command = function () gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v' } end,
56 command = function () gitsigns.stage_hunk { vim.fn.line '.', vim.fn.line 'v', } end,
5657 }
5859 map.normal {
6869 category = 'git',
6970 keys = '<leader>hr',
7071 buffer = bufnr,
71 command = function () gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v' } end,
72 command = function () gitsigns.reset_hunk { vim.fn.line '.', vim.fn.line 'v', } end,
7273 }
7475 map.normal {
108109 category = 'git',
109110 keys = '<leader>hb',
110111 buffer = bufnr,
111 command = function () gitsigns.blame_line { full = true } end,
112 command = function () gitsigns.blame_line { full = true, } end,
112113 }
114115 map.normal {
148149 category = 'git',
149150 keys = 'ih',
150151 buffer = bufnr,
151 command = ':<C-U>Gitsigns select_hunk<CR>'
152 command = ':<C-U>Gitsigns select_hunk<CR>',
152153 }
153154 end,
154 }
155 },

neovim/lua/bugabinga/plugins/heirline.lua

Modified

+43 / −42 text lines

88return {
99 {
1010 'rebelot/heirline.nvim',
11 tag = 'v1.0.3',
1112 event = 'BufEnter',
1213 dependencies = {
1314 'nvim-tree/nvim-web-devicons',
8384 r = 'ui_important_global',
8485 ['!'] = 'ui_important_global',
8586 t = 'ui_important_global',
86 }
87 },
8788 },
8990 provider = function ( self )
9495 hl = function ( self )
9596 local mode = self.mode:sub( 1, 1 ) -- get only the first mode character
96 return { fg = self.mode_colors[mode], bold = true }
97 return { fg = self.mode_colors[mode], bold = true, }
9798 end,
99100 update = {
107108 init = function ( self )
108109 local filename = self.filename
109110 local extension = vim.fn.fnamemodify( filename, ':e' )
110 self.icon = require 'nvim-web-devicons'.get_icon_color( filename, extension, { default = true } )
111 self.icon = require 'nvim-web-devicons'.get_icon_color( filename, extension, { default = true, } )
111112 end,
112113 provider = function ( self )
113114 return self.icon and (self.icon .. ' ')
158159 end,
160161 file_icon,
161 { provider = ' ' },
162 { provider = ' ', },
162163 file_name,
163164 file_flags,
164 { provider = '%<' } -- this means that the statusline is cut here when there's not enough space
165 { provider = '%<', }, -- this means that the statusline is cut here when there's not enough space
165166 }
167168 local file_type = {
186187 provider = function ( self )
187188 local fileformat = vim.bo.fileformat
188189 return self[fileformat]
189 end
190 end,
190191 }
192193 local file_size = {
193194 provider = function ()
194195 -- stackoverflow, compute human readable file size
195196 -- i want to see vim opening a 1EiB file 󰱯
196 local suffix = { 'b', 'k', 'M', 'G', 'T', 'P', 'E' }
197 local suffix = { 'b', 'k', 'M', 'G', 'T', 'P', 'E', }
197198 local fsize = vim.fn.getfsize( vim.api.nvim_buf_get_name( 0 ) )
198199 fsize = (fsize < 0 and 0) or fsize
199200 if fsize < 1024 then
217218 local lsp_active = {
218219 condition = conditions.lsp_attached,
219 update = { 'LspAttach', 'LspDetach', 'BufEnter' },
220 update = { 'LspAttach', 'LspDetach', 'BufEnter', },
221222 provider = function ()
222223 local names = {}
223 for _, client in pairs( vim.lsp.get_clients { bufnr = 0 } ) do
224 for _, client in pairs( vim.lsp.get_clients { bufnr = 0, } ) do
224225 table.insert( names, client.name )
225226 end
226227 return icon.lsp .. ' ' .. table.concat( names, ' ' )
247248 },
249250 init = function ( self )
250 self.errors = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.ERROR } )
251 self.warnings = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.WARN } )
252 self.hints = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.HINT } )
253 self.info = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.INFO } )
251 self.errors = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.ERROR, } )
252 self.warnings = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.WARN, } )
253 self.hints = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.HINT, } )
254 self.info = #vim.diagnostic.get( 0, { severity = vim.diagnostic.severity.INFO, } )
254255 end,
256 update = { 'DiagnosticChanged', 'BufEnter' },
257 update = { 'DiagnosticChanged', 'BufEnter', },
258259 {
259260 provider = function ( self )
296297 local svn_get_relative_url = function ()
297298 -- FIXME: replace with vim.system
298299 local job = require 'plenary.job'
299 local relative_url = { '[ERR]' }
300 local relative_url = { '[ERR]', }
301302 job:new {
302303 command = 'svn',
303 args = { 'info', '--show-item', 'relative-url', '--no-newline' },
304 args = { 'info', '--show-item', 'relative-url', '--no-newline', },
304305 on_exit = function ( current_job, exit_code )
305306 if exit_code == 0 then relative_url = current_job:result() end
306307 end,
382383 },
383384 {
384385 provider = '',
385 }
386 },
386387 }
388389 local help_file_name = {
418419 end,
419420 provider = icon.macro .. ' ',
420421 hl = 'PreProc',
421 utils.surround( { '░▒▓ ', ' ▓▒░' }, nil, {
422 utils.surround( { '░▒▓ ', ' ▓▒░', }, nil, {
422423 provider = function ()
423424 return vim.fn.reg_recording()
424425 end,
427428 update = {
428429 'RecordingEnter',
429430 'RecordingLeave',
430 }
431 },
431432 }
433434 local lazy = {
435436 local ok, lazy_status = pcall( require, 'lazy.status' )
436437 return ok and lazy_status.has_updates()
437438 end,
438 update = { 'User', pattern = 'LazyUpdate' },
439 update = { 'User', pattern = 'LazyUpdate', },
439440 provider = function () return ' ' .. icon.lazy .. ' ' .. require 'lazy.status'.updates() .. ' ' end,
440441 on_click = {
441442 callback = function () require 'lazy'.update() end,
443444 },
444445 }
446 local align = { provider = '%=' }
447 local space = { provider = ' ' }
447 local align = { provider = '%=', }
448 local space = { provider = ' ', }
449450 local default_statusline = {
450451 vi_mode, macro_recording, align,
465466 file_type,
466467 space,
467468 help_file_name,
468 align
469 align,
469470 }
471472 local terminal_statusline = {
473474 condition = function ()
474 return conditions.buffer_matches { buftype = { 'terminal' } }
475 return conditions.buffer_matches { buftype = { 'terminal', }, }
475476 end,
477 { condition = conditions.is_active, vi_mode, space },
478 { condition = conditions.is_active, vi_mode, space, },
478479 file_type,
479480 space,
480481 terminal_name,
520521 {
521522 condition = function ()
522 return conditions.buffer_matches { buftype = { 'terminal' } }
523 return conditions.buffer_matches { buftype = { 'terminal', }, }
523524 end,
525526 file_type,
536537 end,
537538 hl = function ( self )
538539 if self.is_active then
539 return { fg = utils.get_highlight 'TabLineSel'.fg }
540 return { fg = utils.get_highlight 'TabLineSel'.fg, }
540541 elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then
541 return { fg = 'ui_normal' }
542 return { fg = 'ui_normal', }
542543 else
543 return { fg = utils.get_highlight 'TabLine'.fg }
544 return { fg = utils.get_highlight 'TabLine'.fg, }
544545 end
545546 end,
546547 }
550551 local name = self.file_name
551552 return name == '' and NEW_FILE or vim.fs.normalize( vim.fn.fnamemodify( name, ':t' ) )
552553 end,
553 hl = function ( self ) return { bold = self.is_active or self.is_visible, italic = true } end,
554 hl = function ( self ) return { bold = self.is_active or self.is_visible, italic = true, } end,
554555 }
556557 local tabline_file_flags = {
557558 {
558 condition = function ( self ) return vim.api.nvim_get_option_value( 'modified', { buf = self.bufnr } ) end,
559 condition = function ( self ) return vim.api.nvim_get_option_value( 'modified', { buf = self.bufnr, } ) end,
559560 provider = icon.modified .. ' ',
560561 },
561562 {
562563 condition = function ( self )
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 return not vim.api.nvim_get_option_value( 'modifiable', { buf = self.bufnr, } ) or
565 vim.api.nvim_get_option_value( 'readonly', { buf = self.bufnr, } )
565566 end,
566567 provider = function ( self )
567 if vim.api.nvim_get_option_value( 'buftype', { buf = self.bufnr } ) == 'terminal' then
568 if vim.api.nvim_get_option_value( 'buftype', { buf = self.bufnr, } ) == 'terminal' then
568569 return icon.terminal
569570 else
570571 return icon.lock
583584 if self.is_active then
584585 return 'TabLineSel'
585586 elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then
586 return { fg = 'ui_normal' }
587 return { fg = 'ui_normal', }
587588 else
588589 return 'TabLine'
589590 end
593594 callback = function ( _, minwid, _, button )
594595 if button == 'm' then --m = middle click
595596 vim.schedule( function ()
596 vim.api.nvim_buf_delete( minwid, { force = false } )
597 vim.api.nvim_buf_delete( minwid, { force = false, } )
597598 vim.cmd.redrawtabline()
598599 end )
599600 else
605606 },
607608 file_icon,
608 { provider = ' ' },
609 { provider = ' ', },
609610 tabline_file_name,
610611 tabline_buffer_number,
611612 tabline_file_flags,
623624 return utils.get_highlight 'TabLine'.bg
624625 end
625626 end,
626 { tabline_file_name_block }
627 { tabline_file_name_block, }
627628 )
629630 local buffer_line = utils.make_buflist(
630631 tabline_buffer_block,
631 { provider = icon.arrow_left .. ' ', hl = 'TabLineFill' },
632 { provider = ' ' .. icon.arrow_right, hl = 'TabLineFill' }
632 { provider = icon.arrow_left .. ' ', hl = 'TabLineFill', },
633 { provider = ' ' .. icon.arrow_right, hl = 'TabLineFill', }
633634 )
635636 local tabpage = {
646647 }
648649 local tab_pages = {
649 { provider = '%=' },
650 { provider = '%=', },
650651 utils.make_tablist( tabpage ),
651652 }
653 local tabline = { buffer_line, tab_pages }
654 local tabline = { buffer_line, tab_pages, }
655656 -- local statuscolumn = {}

neovim/lua/bugabinga/plugins/hlargs.lua

Modified

+19 / −18 text lines

11return {
2 'm-demare/hlargs.nvim',
3 event = 'BufRead',
4 opts = {
5 paint_arg_declarations = true,
6 paint_arg_usages = true,
7 paint_catch_blocks = {
8 declarations = true,
9 usages = true,
10 },
11 extras = { named_parameter = true },
12 excluded_argnames = {
13 declarations = {},
14 usages = { lua = {} },
15 },
16 },
17 dependencies = {
18 'nvim-treesitter/nvim-treesitter'
19 },
2 'm-demare/hlargs.nvim',
3 event = 'BufRead',
4 opts = {
5 -- highlight = { 'Hlargs', },
6 paint_arg_declarations = true,
7 paint_arg_usages = true,
8 paint_catch_blocks = {
9 declarations = true,
10 usages = true,
11 },
12 extras = { named_parameter = true, },
13 excluded_argnames = {
14 declarations = {},
15 usages = { lua = {}, },
16 },
17 },
18 dependencies = {
19 'nvim-treesitter/nvim-treesitter',
20 },

neovim/lua/bugabinga/plugins/indent_blankline.lua

Modified

+3 / −2 text lines

1local icon = require'std.icon'
1local icon = require 'std.icon'
33return {
44 'lukas-reineke/indent-blankline.nvim',
5 tag = 'v3.5.3',
56 main = 'ibl',
6 event = { 'BufReadPost', 'BufNew' },
7 event = { 'BufReadPost', 'BufNew', },
78 config = function ()
89 local ibl = require 'ibl'

neovim/lua/bugabinga/plugins/lush.lua

Modified

+4 / −1 text lines

11return {
22 {
33 'rktjmp/lush.nvim',
4 -- tag = 'v2.0.1',
5 -- we rely on injects.sym for better treesitter support
46 branch = 'main',
57 lazy = false,
68 priority = 1000,
79 config = function ()
8 vim.cmd.colorscheme 'nugu'
10 -- disabled to find theming issues with heirline
11 -- vim.cmd.colorscheme 'nugu'
912 end,
1013 },

neovim/lua/bugabinga/plugins/mason.lua

Modified

+8 / −7 text lines

11return {
2 "williamboman/mason.nvim",
3 cmd = { 'Mason', 'MasonUpdate', 'MasonInstall', 'MasonUninstall', 'MasonUninstallAll', 'MasonLog' },
2 'williamboman/mason.nvim',
3 tag = 'v1.10.0',
4 cmd = { 'Mason', 'MasonUpdate', 'MasonInstall', 'MasonUninstall', 'MasonUninstallAll', 'MasonLog', },
45 opts = {
56 ui = {
67 border = vim.g.border_style,
78 width = 0.69,
89 height = 0.69,
9 }
10 },
1011 },
1112 dependencies = {
1213 {
1314 'WhoIsSethDaniel/mason-tool-installer.nvim',
1415 lazy = false,
15 cmd = { "MasonToolsInstall", "MasonToolsInstallSync", "MasonToolsUpdate", "MasonToolsUpdateSync", "MasonToolsClean" },
16 cmd = { 'MasonToolsInstall', 'MasonToolsInstallSync', 'MasonToolsUpdate', 'MasonToolsUpdateSync', 'MasonToolsClean', },
1617 opts = {
1718 ensure_installed = {
1819 'lua-language-server',
2526 'lemminx',
2627 'marksman',
2728 },
28 }
29 }
30 }
29 },
30 },
31 },

neovim/lua/bugabinga/plugins/persistence.lua

Modified

+9 / −9 text lines

1local map = require'std.map'
1local map = require 'std.map'
33return {
44 'folke/persistence.nvim',
5 event = "BufReadPre",
6 opts = { },
7 config = function(_, opts)
8 local persistence = require'persistence'
9 persistence.setup(opts)
5 tag = 'v2.0.0',
6 event = 'BufReadPre',
7 opts = {},
8 config = function ( _, opts )
9 local persistence = require 'persistence'
10 persistence.setup( opts )
1112 map.normal {
1213 description = 'Restore session for current directory',
1314 category = 'history',
1415 keys = '<F4>',
15 command = function() persistence.load() end,
16 command = function () persistence.load() end,
1617 }
1819 map.normal {
1920 description = 'Restore last session',
2021 category = 'history',
2122 keys = '<F4><F4>',
22 command = function() persistence.load{last= true} end,
23 command = function () persistence.load { last = true, } end,
2324 }
2525 end,

neovim/lua/bugabinga/plugins/telescope.lua

Modified

+12 / −12 text lines

55require 'bugabinga.health'.add_dependency
66{
77 name = 'ripgrep',
8 name_of_executable = 'rg'
8 name_of_executable = 'rg',
99}
1010 {
1111 name = 'find-fd',
12 name_of_executable = 'fd'
12 name_of_executable = 'fd',
1313 }
1515return {
1616 'nvim-telescope/telescope.nvim',
17 branch = '0.1.x',
17 tag = '0.1.6',
1818 cmd = 'Telescope',
1919 event = 'VeryLazy',
2020 dependencies = {
3030 local actions = require 'telescope.actions'
3131 local themes = require 'telescope.themes'
33 local ivy = themes.get_ivy { hidden = true, layout_config = { preview_width = 0.69 } }
34 local dropdown = themes.get_dropdown { layout_config = { width = 0.69 } }
35 local cursor = themes.get_cursor { layout_config = { preview_width = 0.42, width = 0.69 } }
33 local ivy = themes.get_ivy { hidden = true, layout_config = { preview_width = 0.69, }, }
34 local dropdown = themes.get_dropdown { layout_config = { width = 0.69, }, }
35 local cursor = themes.get_cursor { layout_config = { preview_width = 0.42, width = 0.69, }, }
3737 telescope.setup {
3838 defaults = {
39 path_display = { 'truncate' },
39 path_display = { 'truncate', },
4040 sorting_strategy = 'ascending',
4141 layout_config = {
42 horizontal = { prompt_position = 'bottom', preview_width = 0.69 },
43 vertical = { mirror = false },
42 horizontal = { prompt_position = 'bottom', preview_width = 0.69, },
43 vertical = { mirror = false, },
4444 width = 0.69,
4545 height = 0.42,
4646 preview_cutoff = 124,
6969 ['<c-p>'] = actions.move_selection_previous,
7070 ['<c-s>'] = actions.file_split,
7171 },
72 n = { q = actions.close },
72 n = { q = actions.close, },
7373 },
7474 },
7575 pickers = {
8383 buffers = cursor,
8484 },
8585 extensions = {
86 ['ui-select'] = { cursor },
87 zoxide = { prompt_title = 'Navigate deez nuts!' },
86 ['ui-select'] = { cursor, },
87 zoxide = { prompt_title = 'Navigate deez nuts!', },
8888 },
8989 }

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

Modified

+2 / −1 text lines

11return {
22 'folke/todo-comments.nvim',
3 dependencies = { 'nvim-lua/plenary.nvim' },
3 tag = 'v1.1.0',
4 dependencies = { 'nvim-lua/plenary.nvim', },
45 event = 'BufReadPost',
56 opts = {},
67}

neovim/lua/bugabinga/plugins/toggleterm.lua

Modified

+7 / −6 text lines

99 name_of_executable = 'mdcat',
1010 }
1111 {
12 name_of_executable = 'dot'
12 name_of_executable = 'dot',
1313 }
1515return {
1616 'akinsho/toggleterm.nvim',
17 tag = 'v2.10.0',
1718 keys = {
1819 '<F7>',
1920 '<F8>',
4849 toggleterm.setup( opts )
5051 local set_terminal_keymaps = function ()
51 local local_to_buffer = { buffer = 0 }
52 local local_to_buffer = { buffer = 0, }
5253 map.terminal {
5354 description = 'Quit insert mode',
5455 category = 'terminal',
6970 description = 'Open vertical Terminal',
7071 category = 'terminal',
7172 keys = '<F8>',
72 command = '<CMD>exe v:count1 . "ToggleTerm size=60 direction=vertical"<CR>'
73 command = '<CMD>exe v:count1 . "ToggleTerm size=60 direction=vertical"<CR>',
7374 }
7576 map.normal {
7677 description = 'Open horizontal Terminal',
7778 category = 'terminal',
7879 keys = '<F9>',
79 command = '<CMD>exe v:count1 . "ToggleTerm size=20 direction=horizontal"<CR>'
80 command = '<CMD>exe v:count1 . "ToggleTerm size=20 direction=horizontal"<CR>',
8081 }
8283 local Terminal = require 'toggleterm.terminal'.Terminal
99100 command = toggle_gitui,
100101 }
102 vim.api.nvim_create_user_command( 'Gitui', toggle_gitui, { desc = 'Toggle Gitui' } )
103 end
103 vim.api.nvim_create_user_command( 'Gitui', toggle_gitui, { desc = 'Toggle Gitui', } )
104 end,

neovim/lua/bugabinga/plugins/treesitter.lua

Modified

+56 / −55 text lines

33require 'bugabinga.health'.add_dependency
44{
55 name = 'CMake',
6 name_of_executable = 'cmake'
7}
8{
9 name_of_executable = 'make'
10}
11{
12 name_of_executable = 'zig'
13}
14{
15 name = 'TreeSitter CLI',
16 name_of_executable = 'tree-sitter'
17}
18{
19 name_of_executable = 'tar'
6 name_of_executable = 'cmake',
207}
8 {
9 name_of_executable = 'make',
10 }
11 {
12 name_of_executable = 'zig',
13 }
14 {
15 name = 'TreeSitter CLI',
16 name_of_executable = 'tree-sitter',
17 }
18 {
19 name_of_executable = 'tar',
20 }
2222return {
2323 'nvim-treesitter/nvim-treesitter',
24 branch = 'master',
25 event = { 'BufReadPre', 'BufNewFile' },
24 tag = 'v0.9.2',
25 -- branch = 'master',
26 event = { 'BufReadPre', 'BufNewFile', },
2627 build = function ()
27 require 'nvim-treesitter.install'.update { with_sync = true }
28 require 'nvim-treesitter.install'.update { with_sync = true, }
2829 end,
2930 dependencies = {
3031 'windwp/nvim-ts-autotag',
3839 local parsers = require 'nvim-treesitter.parsers'
4041 install.prefer_git = false
41 install.compilers = { 'zig', 'clang', 'gcc', 'cl', 'cc', vim.fn.getenv 'CC' }
42 install.compilers = { 'zig', 'clang', 'gcc', 'cl', 'cc', vim.fn.getenv 'CC', }
4344 ---@diagnostic disable-next-line: missing-fields
4445 configs.setup {
7071 'zig',
7172 },
73 ignore_install = { 'oil' },
74 ignore_install = { 'oil', },
7576 auto_install = true,
77 autotag = { enable = true },
78 autotag = { enable = true, },
7980 highlight = {
8081 enable = true,
9899 },
99100 },
101 indent = { enable = true },
102 indent = { enable = true, },
103104 playground = {
104105 enable = true,
124125 enable = true,
125126 lookahead = true,
126127 keymaps = {
127 ['af'] = { query = '@call.outer', desc = 'outer function call' },
128 ['if'] = { query = '@call.inner', desc = 'inner function call' },
128 ['af'] = { query = '@call.outer', desc = 'outer function call', },
129 ['if'] = { query = '@call.inner', desc = 'inner function call', },
130 ['am'] = { query = '@function.outer', desc = 'outer function definition' },
131 ['im'] = { query = '@function.inner', desc = 'inner function definition' },
131 ['am'] = { query = '@function.outer', desc = 'outer function definition', },
132 ['im'] = { query = '@function.inner', desc = 'inner function definition', },
133 ['aa'] = { query = '@assignment.outer', desc = 'outer assignment' },
134 ['ia'] = { query = '@assignment.inner', desc = 'inner assignment' },
134 ['aa'] = { query = '@assignment.outer', desc = 'outer assignment', },
135 ['ia'] = { query = '@assignment.inner', desc = 'inner assignment', },
136137 -- l overwrites builtin. i have no good idea for better binding. use ia instead.
137138 -- ['la'] = { query = '@assignment.lhs', desc = 'left hand side of assignment'},
138139 -- ['ra'] = { query = '@assignment.rhs', desc = 'right hand side of assignment'},
140 ['ac'] = { query = '@class.outer', desc = 'outer class' },
141 ['ic'] = { query = '@class.inner', desc = 'inner class' },
141 ['ac'] = { query = '@class.outer', desc = 'outer class', },
142 ['ic'] = { query = '@class.inner', desc = 'inner class', },
143 ['ao'] = { query = '@conditional.outer', desc = 'outer conditional' },
144 ['io'] = { query = '@conditional.inner', desc = 'inner conditional' },
144 ['ao'] = { query = '@conditional.outer', desc = 'outer conditional', },
145 ['io'] = { query = '@conditional.inner', desc = 'inner conditional', },
146 ['al'] = { query = '@loop.outer', desc = 'outer loop' },
147 ['il'] = { query = '@loop.inner', desc = 'inner loop' },
147 ['al'] = { query = '@loop.outer', desc = 'outer loop', },
148 ['il'] = { query = '@loop.inner', desc = 'inner loop', },
149150 -- this overwrites the built-in 'paragraph' object
150 ['ap'] = { query = '@parameter.outer', desc = 'outer parameter' },
151 ['ip'] = { query = '@parameter.inner', desc = 'inner parameter' },
151 ['ap'] = { query = '@parameter.outer', desc = 'outer parameter', },
152 ['ip'] = { query = '@parameter.inner', desc = 'inner parameter', },
153 ['at'] = { query = '@comment.outer', desc = 'outer comment' },
154 ['at'] = { query = '@comment.outer', desc = 'outer comment', },
155 ['as'] = { query = '@scope', query_group = 'locals', desc = 'language scope' },
156 ['as'] = { query = '@scope', query_group = 'locals', desc = 'language scope', },
156157 },
157158 selection_modes = {
158159 ['@parameter.outer'] = 'v',
166167 swap = {
167168 enable = true,
168169 swap_next = {
169 ['<leader>spn'] = { query = '@parameter.inner', desc = 'Swap parameter with next' },
170 ['<leader>spn'] = { query = '@parameter.inner', desc = 'Swap parameter with next', },
170171 },
171172 swap_previous = {
172 ['<leader>spp'] = { query = '@parameter.inner', desc = 'Swap parameter with previous' },
173 ['<leader>spp'] = { query = '@parameter.inner', desc = 'Swap parameter with previous', },
173174 },
174175 },
178179 border = vim.g.border_style,
179180 floating_preview_opts = {},
180181 peek_definition_code = {
181 ['<leader>lpf'] = { query = '@function.outer', desc = 'Peek definition of outer function.' },
182 ['<leader>lpc'] = { query = '@class.outer', desc = 'Peek definition of outer class.' },
182 ['<leader>lpf'] = { query = '@function.outer', desc = 'Peek definition of outer function.', },
183 ['<leader>lpc'] = { query = '@class.outer', desc = 'Peek definition of outer class.', },
183184 },
184185 },
187188 enable = true,
188189 set_jumps = true,
189190 goto_next = {
190 [']f'] = { query = '@call.outer', desc = 'Goto next function call' },
191 [']m'] = { query = '@fucntion.outer', desc = 'Goto next function definition' },
192 [']c'] = { query = '@class.outer', desc = 'Goto next class' },
193 [']o'] = { query = '@conditional.outer', desc = 'Goto next conditional' },
194 [']p'] = { query = '@parameter.outer', desc = 'Goto next parameter' },
191 [']f'] = { query = '@call.outer', desc = 'Goto next function call', },
192 [']m'] = { query = '@fucntion.outer', desc = 'Goto next function definition', },
193 [']c'] = { query = '@class.outer', desc = 'Goto next class', },
194 [']o'] = { query = '@conditional.outer', desc = 'Goto next conditional', },
195 [']p'] = { query = '@parameter.outer', desc = 'Goto next parameter', },
195196 },
196197 goto_previous = {
197 ['[f'] = { query = '@call.outer', desc = 'Goto previous function call' },
198 ['[m'] = { query = '@function.outer', desc = 'Goto previous function definition' },
199 ['[c'] = { query = '@class.outer', desc = 'goto previous class' },
200 ['[o'] = { query = '@conditional.outer', desc = 'Goto previous conditional' },
201 ['[p'] = { query = '@parameter.outer', desc = 'Goto previous parameter' },
202 }
198 ['[f'] = { query = '@call.outer', desc = 'Goto previous function call', },
199 ['[m'] = { query = '@function.outer', desc = 'Goto previous function definition', },
200 ['[c'] = { query = '@class.outer', desc = 'goto previous class', },
201 ['[o'] = { query = '@conditional.outer', desc = 'Goto previous conditional', },
202 ['[p'] = { query = '@parameter.outer', desc = 'Goto previous parameter', },
203 },
203204 },
204 }
205 },
205206 }
207208 ---@diagnostic disable-next-line: inject-field
208209 parsers.get_parser_configs().just = {
209210 install_info = {
210211 url = 'https://github.com/IndianBoy42/tree-sitter-just', -- local path or git repo
211 files = { 'src/parser.c', 'src/scanner.cc' },
212 files = { 'src/parser.c', 'src/scanner.cc', },
212213 branch = 'main',
213214 },
214 maintainers = { '@IndianBoy42' },
215 maintainers = { '@IndianBoy42', },
215216 }
216217 end,

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

Modified

+4 / −3 text lines

33return {
44 {
55 'lukas-reineke/virt-column.nvim',
6 event = { 'BufReadPost', 'BufNew' },
6 tag = 'v2.0.2',
7 event = { 'BufReadPost', 'BufNew', },
78 opts = {
89 -- FIXME: I have visual redrawing bugs right now.
910 enabled = false,
10 char = { '░', '▒', '▓' },
11 char = { '░', '▒', '▓', },
1112 exclude = {
1213 filetypes = ignored.filetypes,
1314 buftypes = ignored.buftypes,
14 }
15 },
1516 },
1617 },

neovim/lua/bugabinga/plugins/whichkey.lua

Modified

+14 / −13 text lines

44return {
55 'folke/which-key.nvim',
6 tag = 'v1.6.0',
67 event = 'VeryLazy',
78 init = function ()
89 vim.o.timeout = true
2425 border = vim.g.border_style,
2526 winblend = vim.o.winblend,
2627 },
27 layout = { align = 'center' },
28 layout = { align = 'center', },
2829 disable = {
2930 buftypes = ignored.buftypes,
30 }
31 },
3132 },
3233 config = function ( _, opts )
3334 local wk = require 'which-key'
3940 -- use category as prefix?
4041 wk.register {
4142 ['<leader>'] = {
42 m = { name = 'mark', _ = 'which_key_ignore' },
43 h = { name = 'hunk', _ = 'which_key_ignore' },
44 l = { name = 'lsp', _ = 'which_key_ignore' },
45 r = { name = 'refactor', _ = 'which_key_ignore' },
43 m = { name = 'mark', _ = 'which_key_ignore', },
44 h = { name = 'hunk', _ = 'which_key_ignore', },
45 l = { name = 'lsp', _ = 'which_key_ignore', },
46 r = { name = 'refactor', _ = 'which_key_ignore', },
4647 s = {
4748 name = 'swap',
4849 _ = 'which_key_ignore',
4950 {
50 p = { name = 'parameter', _ = 'which_key_ignore' },
51 p = { name = 'parameter', _ = 'which_key_ignore', },
5152 },
5253 },
5354 t = {
5455 name = 'toggle',
5556 _ = 'which_key_ignore',
5657 {
57 o = { name = 'options', _ = 'which_key_ignore' },
58 }
58 o = { name = 'options', _ = 'which_key_ignore', },
59 },
5960 },
60 z = { name = 'lazy', _ = 'which_key_ignore' },
61 [' '] = { name = 'fun', _ = 'which_key_ignore' },
62 }
61 z = { name = 'lazy', _ = 'which_key_ignore', },
62 [' '] = { name = 'fun', _ = 'which_key_ignore', },
63 },
6364 }
64 end
65 end,