repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

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

cc3383828f76143fd3c51cff143a1ed46218b9e8

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (25)

+603 / −575 text lines

Diff layout

git/gitconfig

Modified

+6 / −0 text lines

6464# On each host a different file might be symlinked into '.gitconfig.include'.
6565[include]
6666 path = .gitconfig.include
67[credential "https://github.com"]
68 helper =
69 helper = !/usr/bin/gh auth git-credential
70[credential "https://gist.github.com"]
71 helper =
72 helper = !/usr/bin/gh auth git-credential

neovim/lazy-lock.json

Modified

+6 / −8 text lines

33 "better-escape.nvim": { "branch": "master", "commit": "7031dc734add47bb71c010e0551829fa5799375f" },
44 "cmp-omni": { "branch": "main", "commit": "9436e6cdd7c5dfa24a99a60d9280b24dbdea3649" },
55 "dressing.nvim": { "branch": "master", "commit": "e6eff7a5a950a853c3903d906dbcea03f778db5f" },
6 "gitsigns.nvim": { "branch": "main", "commit": "1e01b2958aebb79f1c33e7427a1bac131a678e0d" },
6 "gitsigns.nvim": { "branch": "main", "commit": "bb808fc7376ed7bac0fbe8f47b83d4bf01738167" },
77 "glow.nvim": { "branch": "main", "commit": "cf2177a514859fa3c55837b46de91d93b24cf488" },
88 "heirline.nvim": { "branch": "master", "commit": "76136ccd93ed608e8109762f032cf1118981ebbd" },
99 "hlargs.nvim": { "branch": "main", "commit": "cfc9beab4e176a13311efe03e38e6b6fed5df4f6" },
10 "indent-blankline.nvim": { "branch": "master", "commit": "73640233cca0da8e01aced8c1f9e63fd892128b7" },
10 "indent-blankline.nvim": { "branch": "master", "commit": "b7aa0aed55887edfaece23f7b46ab22232fc8741" },
1111 "indent-o-matic": { "branch": "master", "commit": "4d11e98f523d3c4500b1dc33f0d1a248a4f69719" },
1212 "lazy.nvim": { "branch": "main", "commit": "14d76aac4bd3ff07c1fca074c210f28f766a931e" },
1313 "lush.nvim": { "branch": "main", "commit": "b10ef2bfff0647e701b691019ade3edd5e44eb50" },
1414 "neodev.nvim": { "branch": "main", "commit": "da1562e1e3df0e994ddc52cb4ba22376a5d7f2fc" },
1515 "neogen": { "branch": "main", "commit": "cb1f384df804c1bf729332c4f728253fe17962d4" },
16 "noice.nvim": { "branch": "main", "commit": "bfd2368b3f1fdd5766885b0115238d1f47113c6d" },
16 "noice.nvim": { "branch": "main", "commit": "40d670ef8935af3bf5df44ca27d83dcf1d75f0fd" },
1717 "nrpattern.nvim": { "branch": "master", "commit": "f862ce687761078ef3155688151c55f69d28453e" },
1818 "nui.nvim": { "branch": "main", "commit": "7a524120a7a70761b5a65b602fd235a65cb005aa" },
1919 "nvim-autopairs": { "branch": "master", "commit": "ae5b41ce880a6d850055e262d6dfebd362bb276e" },
2525 "nvim-neoclip.lua": { "branch": "main", "commit": "4e406ae0f759262518731538f2585abb9d269bac" },
2626 "nvim-notify": { "branch": "master", "commit": "ea9c8ce7a37f2238f934e087c255758659948e0f" },
2727 "nvim-surround": { "branch": "main", "commit": "211eaad7c6d01ef4ac02cba9052b3082ec232101" },
28 "nvim-treesitter": { "branch": "master", "commit": "180399295db82069bf07d3c2314530e7814c03d7" },
28 "nvim-treesitter": { "branch": "master", "commit": "9fa6806b88905d52b5ca36094909630919b432cc" },
29 "nvim-treesitter-textobjects": { "branch": "master", "commit": "52f1f3280d9092bfaee5c45be5962fabee3d9654" },
2930 "nvim-ts-autotag": { "branch": "main", "commit": "6be1192965df35f94b8ea6d323354f7dc7a557e4" },
3031 "nvim-ts-context-commentstring": { "branch": "main", "commit": "7f625207f225eea97ef7a6abe7611e556c396d2f" },
3132 "nvim-web-devicons": { "branch": "master", "commit": "efbfed0567ef4bfac3ce630524a0f6c8451c5534" },
3536 "refactoring.nvim": { "branch": "master", "commit": "7894b10078a1a70c9b26028f4373bf209968e9bc" },
3637 "specs.nvim": { "branch": "main", "commit": "2743e412bbe21c9d73954c403d01e8de7377890d" },
3738 "substitute.nvim": { "branch": "main", "commit": "42d09f1e6324d98aa2e5b765b64528e0aefe72b0" },
38 "telescope-file-browser.nvim": { "branch": "master", "commit": "e03ff55962417b69c85ef41424079bb0580546ba" },
39 "telescope-fzf-native.nvim": { "branch": "main", "commit": "9bc8237565ded606e6c366a71c64c0af25cd7a50" },
4039 "telescope-symbols.nvim": { "branch": "master", "commit": "f2060117d965df4a626f068a4ebbd8ee051aa076" },
4140 "telescope.nvim": { "branch": "0.1.x", "commit": "776b509f80dd49d8205b9b0d94485568236d1192" },
4241 "toggleterm.nvim": { "branch": "main", "commit": "b90a1381e9b5b8596f49070ee86c71db267ac868" },
43 "tokyonight.nvim": { "branch": "main", "commit": "a0a7bfbc4c54348b56880a162afac9d103c618c1" },
4442 "treesj": { "branch": "main", "commit": "3203aa553217921fd4dcb79245f9df07278910b2" },
4543 "virt-column.nvim": { "branch": "master", "commit": "93b40ea038f676f5a72d7d1f2336fe7b051fc0ce" }
46}No final newline
44}

neovim/lua/bugabinga/lazy.lua

Modified

+1 / −2 text lines

2424 },
2525 install = {
2626 missing = true,
27 colorthemes = { 'lunaperche' },
2827 },
2928 checker = {
30 enabled = true,
29 enabled = not vim.loop.os_uname().sysname:match'Win',
3130 },
3231 ui = {
3332 size = { width = 0.69 , heigth = 0.69 },

neovim/lua/bugabinga/lsp.lua

Deleted
deleted file mode 100644

+0 / −265 text lines

1local icon = require 'std.icon'
2local map = require 'std.keymap'
3local auto = require 'std.auto'
4local project = require 'std.project'
5local want = require 'std.want'
6
7-- TODO: setup codelens -> use lsp-signature plugin?
8-- TODO: setup custom cmp keybinds
9want {
10 'lsp-zero',
11 'null-ls',
12 'nvim-lsp-installer',
13 'neodev',
14 'rust-tools',
15 'nvim-navic',
16 'lsp-status',
17}(function(zero, null_ls, installer, neodev, rust, navic, lsp_status)
18 installer.settings {
19 ui = {
20 --TODO: use some global float window settings
21 border = 'rounded',
22 },
23 }
25 zero.preset 'recommended'
26 zero.set_preferences {
27 configure_diagnostics = false,
28 set_lsp_keymaps = false,
29 sign_icons = {
30 error = icon 'Error',
31 warn = icon 'Warning',
32 hint = icon 'Hint',
33 info = icon 'Information',
34 },
35 }
37 -- setup lsp for my neovim config
38 zero.nvim_workspace {
39 -- add paths of all plugins and neovim
40 library = vim.api.nvim_get_runtime_file('', true),
41 }
42 -- Initialize rust_analyzer with rust-tools
43 rust.setup {
44 server = zero.build_options('rust_analyzer', {}),
45 }
47 -- this will prevent zero from loading this server.
48 -- Java will be managed by nvim-jdtls, which wants to do things differently.
49 -- see ftplugin/java.lua
50 zero.build_options('jdtls', {})
52 -- lua neovim lsp
53 neodev.setup {
54 lspconfig = zero.defaults.nvim_workspace(),
55 }
57 -- disable disco mode while typing
58 zero.setup_nvim_cmp {
59 completion = {
60 autocomplete = false,
61 },
62 }
64 local null_opts = zero.build_options 'null-ls'
66 local formatting = null_ls.builtins.formatting
67 local diagnostics = null_ls.builtins.diagnostics
68 local code_actions = null_ls.builtins.code_actions
69 local hover = null_ls.builtins.hover
70 local completion = null_ls.builtins.completion
72 -- run diagnostics on save
73 local diagnostics_on_save = { method = null_ls.methods.DIAGNOSTICS_ON_SAVE }
74 null_ls.setup {
75 on_attach = null_opts.on_attach,
76 sources = {
77 formatting.stylua,
78 formatting.clang_format,
79 formatting.jq,
80 formatting.protolint,
81 formatting.shellharden,
82 formatting.shfmt,
83 formatting.taplo,
85 hover.dictionary,
87 diagnostics.actionlint.with(diagnostics_on_save),
88 diagnostics.checkmake.with(diagnostics_on_save),
89 diagnostics.gitlint.with(diagnostics_on_save),
90 diagnostics.protoc_gen_lint.with(diagnostics_on_save),
91 diagnostics.protolint.with(diagnostics_on_save),
92 diagnostics.selene.with(diagnostics_on_save).with {
93 -- null-ls determines the root in a too simplistic manner.
94 -- since my neovim configuration live inside my dotfiles, the dotfiles root
95 -- was taken. but i want the neovim config folder as root.
96 cwd = function(parameters)
97 local root = project.determine_project_root({ name = 'selene.toml', weight = 10 }, parameters.root)
98 return root or parameters.root
99 end,
100 },
101 diagnostics.shellcheck.with(diagnostics_on_save),
102 diagnostics.tidy.with(diagnostics_on_save),
104 code_actions.refactoring,
105 code_actions.shellcheck,
107 completion.luasnip,
108 },
109 }
111 local function setup_keybinds_and_actions(client, buffer_number)
112 -- TODO: use buffer number in keymaps
113 -- TODO: make format changed lines command
114 local capabilities = client.server_capabilities
115 if capabilities.document_formatting then
116 map.normal {
117 name = 'Format buffer using LSP',
118 category = "editing",
119 keys = '<leader>' .. 'l' .. 'f',
120 command = function()
121 vim.lsp.buf.format { bufnr = buffer_number }
122 vim.notify('Formatted ' .. vim.api.nvim_buf_get_name(buffer_number))
123 end,
124 }
125 end
126 if capabilities.document_range_formatting then
127 map.visual {
128 name = 'Format range using LSP',
129 category = 'editing',
130 keys = '<leader>' .. 'l' .. 'f',
131 command = function()
132 vim.lsp.buf.range_formatting { bufnr = buffer_number }
133 vim.notify('Formatted range in ' .. vim.api.nvim_buf_get_name(buffer_number))
134 end,
135 }
136 end
137 --TODO: change some of these commands to telescoped versions
138 if capabilities.hover then
139 map.normal {
140 name = 'Show Hover',
141 category = 'view',
142 keys = '<leader>' .. 'l' .. 'k',
143 command = vim.lsp.buf.hover,
144 }
145 end
146 if capabilities.goto_definition then
147 map.normal {
148 name = 'Go to Definition',
149 category = 'navigation',
150 keys = '<leader>' .. 'l' .. 'd',
151 command = vim.lsp.buf.definition,
152 }
153 end
154 if capabilities.declaration then
155 map.normal {
156 name = 'Go to Declaration',
157 category = 'navigation',
158 keys = '<leader>' .. 'l' .. 'd' .. 'd',
159 command = vim.lsp.buf.declaration,
160 }
161 end
162 if capabilities.implementation then
163 map.normal {
164 name = 'Go to Implementation',
165 category = 'navigation',
166 keys = '<leader>' .. 'l' .. 'i',
167 command = vim.lsp.buf.implementation,
168 }
169 end
170 if capabilities.type_definition then
171 map.normal {
172 name = 'Go to Type Definition',
173 category = 'navigation',
174 keys = '<leader>' .. 'l' .. 't',
175 command = vim.lsp.buf.type_definition,
176 }
177 end
178 if capabilities.find_references then
179 map.normal {
180 name = 'Go to References',
181 category = 'navigation',
182 keys = '<leader>' .. 'l' .. 'r',
183 command = vim.lsp.buf.references
184 }
185 end
186 if capabilities.call_hierarchy then
187 map.normal {
188 name = 'Go to Incoming Call',
189 category = 'navigation',
190 keys = '<leader>' .. 'l' .. 'c',
191 command = vim.lsp.buf.incoming_calls,
192 }
193 map.normal {
194 name = 'Go to Outgoing Call',
195 category = 'navigation',
196 keys = '<leader>' .. 'l' .. 'c' .. 'c',
197 command = vim.lsp.buf.outgoing_calls,
198 }
199 end
200 if capabilities.rename then
201 map.normal {
202 name = 'Rename symbol',
203 category = 'editing',
204 keys = 'f'2,
205 command = vim.lsp.buf.rename,
206 }
207 end
208 if capabilities.code_action then
209 map.normal {
210 name = 'Show code actions',
211 category = 'view',
212 keys = 'f'4,
213 command = vim.lsp.buf.code_action,
214 }
215 map.visual {
216 name = 'Show code actions in range',
217 category = 'view',
218 keys = 'f'4,
219 command = vim.lsp.buf.range_code_action,
220 }
221 end
222 if capabilities.document_highlight then
223 -- this variable should technically be scoped to the current buffer.
224 -- how to do that?
225 local highlight_timer = nil
226 auto 'highlight_reference_under_cursor' {
227 {
228 description = 'Automatically highlight a symbol under cursor',
229 events = 'CursorHold',
230 pattern = '<buffer>',
231 command = function()
232 if not highlight_timer then
233 highlight_timer = vim.defer_fn(function()
234 vim.lsp.buf.document_highlight()
235 highlight_timer = nil
236 end, 866)
237 end
238 end,
239 },
240 {
241 description = 'Clear highlighted symbol under cursor',
242 events = { 'CursorMoved', 'CursorMovedI', 'InsertEnter' },
243 pattern = '<buffer>',
244 command = function()
245 if highlight_timer then
246 highlight_timer:close()
247 highlight_timer = nil
248 end
249 vim.lsp.buf.clear_references()
250 end,
251 },
252 }
253 end
254 end
256 zero.on_attach(function(client, buffer_number)
257 if client.name ~= 'null-ls' and not vim.b.lsp_attached then
258 navic.attach(client, buffer_number)
259 lsp_status.on_attach(client, buffer_number)
260 setup_keybinds_and_actions(client, buffer_number)
261 end
262 end)
264 zero.setup()
265end)

neovim/lua/bugabinga/lsp.old

Added
new file mode 100644

+265 / −0 text lines

1local icon = require 'std.icon'
2local map = require 'std.keymap'
3local auto = require 'std.auto'
4local project = require 'std.project'
5local want = require 'std.want'
6
7-- TODO: setup codelens -> use lsp-signature plugin?
8-- TODO: setup custom cmp keybinds
9want {
10 'lsp-zero',
11 'null-ls',
12 'nvim-lsp-installer',
13 'neodev',
14 'rust-tools',
15 'nvim-navic',
16 'lsp-status',
17}(function(zero, null_ls, installer, neodev, rust, navic, lsp_status)
18 installer.settings {
19 ui = {
20 --TODO: use some global float window settings
21 border = 'rounded',
22 },
23 }
25 zero.preset 'recommended'
26 zero.set_preferences {
27 configure_diagnostics = false,
28 set_lsp_keymaps = false,
29 sign_icons = {
30 error = icon 'Error',
31 warn = icon 'Warning',
32 hint = icon 'Hint',
33 info = icon 'Information',
34 },
35 }
37 -- setup lsp for my neovim config
38 zero.nvim_workspace {
39 -- add paths of all plugins and neovim
40 library = vim.api.nvim_get_runtime_file('', true),
41 }
42 -- Initialize rust_analyzer with rust-tools
43 rust.setup {
44 server = zero.build_options('rust_analyzer', {}),
45 }
47 -- this will prevent zero from loading this server.
48 -- Java will be managed by nvim-jdtls, which wants to do things differently.
49 -- see ftplugin/java.lua
50 zero.build_options('jdtls', {})
52 -- lua neovim lsp
53 neodev.setup {
54 lspconfig = zero.defaults.nvim_workspace(),
55 }
57 -- disable disco mode while typing
58 zero.setup_nvim_cmp {
59 completion = {
60 autocomplete = false,
61 },
62 }
64 local null_opts = zero.build_options 'null-ls'
66 local formatting = null_ls.builtins.formatting
67 local diagnostics = null_ls.builtins.diagnostics
68 local code_actions = null_ls.builtins.code_actions
69 local hover = null_ls.builtins.hover
70 local completion = null_ls.builtins.completion
72 -- run diagnostics on save
73 local diagnostics_on_save = { method = null_ls.methods.DIAGNOSTICS_ON_SAVE }
74 null_ls.setup {
75 on_attach = null_opts.on_attach,
76 sources = {
77 formatting.stylua,
78 formatting.clang_format,
79 formatting.jq,
80 formatting.protolint,
81 formatting.shellharden,
82 formatting.shfmt,
83 formatting.taplo,
85 hover.dictionary,
87 diagnostics.actionlint.with(diagnostics_on_save),
88 diagnostics.checkmake.with(diagnostics_on_save),
89 diagnostics.gitlint.with(diagnostics_on_save),
90 diagnostics.protoc_gen_lint.with(diagnostics_on_save),
91 diagnostics.protolint.with(diagnostics_on_save),
92 diagnostics.selene.with(diagnostics_on_save).with {
93 -- null-ls determines the root in a too simplistic manner.
94 -- since my neovim configuration live inside my dotfiles, the dotfiles root
95 -- was taken. but i want the neovim config folder as root.
96 cwd = function(parameters)
97 local root = project.determine_project_root({ name = 'selene.toml', weight = 10 }, parameters.root)
98 return root or parameters.root
99 end,
100 },
101 diagnostics.shellcheck.with(diagnostics_on_save),
102 diagnostics.tidy.with(diagnostics_on_save),
104 code_actions.refactoring,
105 code_actions.shellcheck,
107 completion.luasnip,
108 },
109 }
111 local function setup_keybinds_and_actions(client, buffer_number)
112 -- TODO: use buffer number in keymaps
113 -- TODO: make format changed lines command
114 local capabilities = client.server_capabilities
115 if capabilities.document_formatting then
116 map.normal {
117 name = 'Format buffer using LSP',
118 category = "editing",
119 keys = '<leader>' .. 'l' .. 'f',
120 command = function()
121 vim.lsp.buf.format { bufnr = buffer_number }
122 vim.notify('Formatted ' .. vim.api.nvim_buf_get_name(buffer_number))
123 end,
124 }
125 end
126 if capabilities.document_range_formatting then
127 map.visual {
128 name = 'Format range using LSP',
129 category = 'editing',
130 keys = '<leader>' .. 'l' .. 'f',
131 command = function()
132 vim.lsp.buf.range_formatting { bufnr = buffer_number }
133 vim.notify('Formatted range in ' .. vim.api.nvim_buf_get_name(buffer_number))
134 end,
135 }
136 end
137 --TODO: change some of these commands to telescoped versions
138 if capabilities.hover then
139 map.normal {
140 name = 'Show Hover',
141 category = 'view',
142 keys = '<leader>' .. 'l' .. 'k',
143 command = vim.lsp.buf.hover,
144 }
145 end
146 if capabilities.goto_definition then
147 map.normal {
148 name = 'Go to Definition',
149 category = 'navigation',
150 keys = '<leader>' .. 'l' .. 'd',
151 command = vim.lsp.buf.definition,
152 }
153 end
154 if capabilities.declaration then
155 map.normal {
156 name = 'Go to Declaration',
157 category = 'navigation',
158 keys = '<leader>' .. 'l' .. 'd' .. 'd',
159 command = vim.lsp.buf.declaration,
160 }
161 end
162 if capabilities.implementation then
163 map.normal {
164 name = 'Go to Implementation',
165 category = 'navigation',
166 keys = '<leader>' .. 'l' .. 'i',
167 command = vim.lsp.buf.implementation,
168 }
169 end
170 if capabilities.type_definition then
171 map.normal {
172 name = 'Go to Type Definition',
173 category = 'navigation',
174 keys = '<leader>' .. 'l' .. 't',
175 command = vim.lsp.buf.type_definition,
176 }
177 end
178 if capabilities.find_references then
179 map.normal {
180 name = 'Go to References',
181 category = 'navigation',
182 keys = '<leader>' .. 'l' .. 'r',
183 command = vim.lsp.buf.references
184 }
185 end
186 if capabilities.call_hierarchy then
187 map.normal {
188 name = 'Go to Incoming Call',
189 category = 'navigation',
190 keys = '<leader>' .. 'l' .. 'c',
191 command = vim.lsp.buf.incoming_calls,
192 }
193 map.normal {
194 name = 'Go to Outgoing Call',
195 category = 'navigation',
196 keys = '<leader>' .. 'l' .. 'c' .. 'c',
197 command = vim.lsp.buf.outgoing_calls,
198 }
199 end
200 if capabilities.rename then
201 map.normal {
202 name = 'Rename symbol',
203 category = 'editing',
204 keys = 'f'2,
205 command = vim.lsp.buf.rename,
206 }
207 end
208 if capabilities.code_action then
209 map.normal {
210 name = 'Show code actions',
211 category = 'view',
212 keys = 'f'4,
213 command = vim.lsp.buf.code_action,
214 }
215 map.visual {
216 name = 'Show code actions in range',
217 category = 'view',
218 keys = 'f'4,
219 command = vim.lsp.buf.range_code_action,
220 }
221 end
222 if capabilities.document_highlight then
223 -- this variable should technically be scoped to the current buffer.
224 -- how to do that?
225 local highlight_timer = nil
226 auto 'highlight_reference_under_cursor' {
227 {
228 description = 'Automatically highlight a symbol under cursor',
229 events = 'CursorHold',
230 pattern = '<buffer>',
231 command = function()
232 if not highlight_timer then
233 highlight_timer = vim.defer_fn(function()
234 vim.lsp.buf.document_highlight()
235 highlight_timer = nil
236 end, 866)
237 end
238 end,
239 },
240 {
241 description = 'Clear highlighted symbol under cursor',
242 events = { 'CursorMoved', 'CursorMovedI', 'InsertEnter' },
243 pattern = '<buffer>',
244 command = function()
245 if highlight_timer then
246 highlight_timer:close()
247 highlight_timer = nil
248 end
249 vim.lsp.buf.clear_references()
250 end,
251 },
252 }
253 end
254 end
256 zero.on_attach(function(client, buffer_number)
257 if client.name ~= 'null-ls' and not vim.b.lsp_attached then
258 navic.attach(client, buffer_number)
259 lsp_status.on_attach(client, buffer_number)
260 setup_keybinds_and_actions(client, buffer_number)
261 end
262 end)
264 zero.setup()
265end)

neovim/lua/bugabinga/nugu/init.lua

Modified

+2 / −2 text lines

5858 DiffDelete { fg = content_focus, gui = "strikethrough" }, -- diff mode: Deleted line |diff.txt|
5959 DiffChange { fg = content_important_global }, -- diff mode: Changed line |diff.txt|
6060 DiffText { fg = content_important_local.readable(), bg = content_important_local }, -- diff mode: Changed text within a changed line |diff.txt|
61 EndOfBuffer { LineNr }, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|.
61 EndOfBuffer { Normal }, -- filler lines (~) after the end of the buffer. By default, this is highlighted like |hl-NonText|.
6262 TermCursor { lCursor }, -- cursor in a focused terminal
6363 TermCursorNC { Cursor }, -- cursor in an unfocused terminal
6464 ErrorMsg { fg = error.readable(), bg = error }, -- error messages on the command line
7373 NonText { fg = ui_unfocus }, -- '@' at the end of the window, characters from 'showbreak' and other characters that do not really exist in the text (e.g., ">" displayed when a double-wide character doesn't fit at the end of the line). See also |hl-EndOfBuffer|.
7474 NormalNC {}, -- normal text in non-current windows
7575 Pmenu { NormalFloat }, -- Popup menu: normal item.
76 PmenuSel { fg = ui_focus.readable(), sp = ui_focus.readable(), bg = ui_focus, gui = 'underline' }, -- Popup menu: selected item.
76 PmenuSel { fg = ui_focus.readable(), sp = ui_focus.readable(), bg = ui_unfocus, gui = 'underline' }, -- Popup menu: selected item.
7777 PmenuSbar { bg = ui_unfocus }, -- Popup menu: scrollbar.
7878 PmenuThumb { bg = ui_minor }, -- Popup menu: Thumb of the scrollbar.
7979 Question { fg = ui_important_global, gui = 'bold' }, -- |hit-enter| prompt and yes/no questions

neovim/lua/bugabinga/options/keymaps.lua

Modified

+23 / −10 text lines

44-- set <SPACE> as leader key
55map {
66 keys = '<space>',
7 command = '<Nop>',
7 command = '<nop>',
88}
1010vim.g.mapleader = ' '
1313-- disable default ENTER binding
1414map {
1515 keys = '<enter>',
16 command = '<NOP>',
16 command = '<nop>',
1919-- insert newline under or above in normal mode
4646-- disable command history keymap, because i fatfinger it too often
4747map {
4848 keys = 'q:',
49 command = '<NOP>',
49 command = '<nop>',
5252map {
5353 keys = 'Q:',
54 command = '<NOP>',
54 command = '<nop>',
5757map {
5858 keys = 'q/',
59 command = '<NOP>',
59 command = '<nop>',
6262map {
6363 keys = 'Q',
64 command = '<NOP>',
64 command = '<nop>',
6767-- disable them evil arrows
6868map {
6969 keys = '<up>',
70 command = '<NOP>',
70 command = '<nop>',
7373map {
7474 keys = '<down>',
75 command = '<NOP>',
75 command = '<nop>',
7878map {
7979 keys = '<left>',
80 command = '<NOP>',
80 command = '<nop>',
8383map {
8484 keys = '<right>',
85 command = '<NOP>',
85 command = '<nop>',
8888-- system clipboard copy and paste
200200 command = vim.cmd.redo,
203map.normal {
204 name = 'Move next in quickfix list',
205 category = 'navigation',
206 keys = '<A-bs>',
207 command = '<cmd>cnext<cr>',
208}
210map.normal {
211 name = 'Move back in quickfix list',
212 category = 'navigation',
213 keys = '<bs>',
214 command = '<cmd>cprevious<cr>',
215}

neovim/lua/bugabinga/options/togglers.lua

Modified

+9 / −8 text lines

1local icon = require'std.icon'
2
13local _ = {}
3local toggle_on_icon = '蘒'
4local toggle_off_icon = '﨡'
5local toggle_on_icon = icon.toggle_on
6local toggle_off_icon = icon.toggle_off
79local get_option = function(name) return vim.api.nvim_get_option_value(name, {}) end
2426local toggler_tostring = function(self)
2527 local all_default = vim.iter(self.options)
2628 :all(function(option) return get_option(option.name) == option.default end)
27 return self.display_name .. ':' .. ( all_default and toggle_off_icon or toggle_on_icon )
29 return self.display_name .. ' ' .. ( all_default and toggle_off_icon or toggle_on_icon )
2830end
3032local make_toggler = function( display_name, options)
5052 table.insert(_, make_toggler(display_name, togglers ))
5153end
53add_toggler('暈', { make_option'spell' } )
54add_toggler('', { make_option'number', make_option'relativenumber'})
55add_toggler('―', { make_option'cursorline'} )
55add_toggler(icon.spelling, { make_option'spell' } )
56add_toggler(icon.linenumber, { make_option'number', make_option'relativenumber'})
57add_toggler(icon.linehighlight, { make_option'cursorline'} )
5759local tostring = function(self)
5860 return vim.iter(self)
5961 :map(toggler_tostring)
6062 :fold('', function(buffer, text)
61 local delimiter = '|'
62 return buffer .. (buffer == '' and delimiter or ' ') .. text
63 return buffer .. (buffer == '' and '' or ' ') .. text
6364 end)
6465end

neovim/lua/bugabinga/plugins/colorizer.lua

Modified

+1 / −1 text lines

11return {
22 {
33 'NvChad/nvim-colorizer.lua',
4 event = 'VeryLazy',
4 event = { 'BufReadPost', 'BufNew' },
55 opts = {
66 filetypes = { '*' },
77 user_default_options = {

neovim/lua/bugabinga/plugins/gitsigns.lua

Modified

+1 / −1 text lines

11return {
22 'lewis6991/gitsigns.nvim',
3 branch='main',
3 -- branch='main',
44 event = 'VeryLazy',
55 opts = {},
66}

neovim/lua/bugabinga/plugins/heirline.lua

Modified

+25 / −24 text lines

1local icon = require'std.icon'
12local auto = require'std.auto'
34return {
45 {
56 'rebelot/heirline.nvim',
67 event = 'BufEnter',
8 dependencies = {
9 'nvim-tree/nvim-web-devicons',
10 -- 'lewis6991/gitsigns.nvim',
11 },
712 config = function()
813 local heirline = require'heirline'
914 local conditions = require("heirline.conditions")
7883 },
8085 provider = function(self)
81 return " %3(" .. self.mode_names[self.mode] .. "%) "
86 return " ".. icon.vim .." %3(" .. self.mode_names[self.mode] .. "%) "
8287 end,
8489 hl = function(self)
108113 local file_name = {
109114 init = function(self)
110115 self.lfilename = vim.fn.fnamemodify(self.filename, ":.")
111 if self.lfilename == "" then self.lfilename = "scratch" end
116 if self.lfilename == "" then self.lfilename = "~scratch~" end
112117 end,
114119 flexible = 2,
130135 condition = function()
131136 return vim.bo.modified
132137 end,
133 provider = "  ",
138 provider = string.format(" %s ", icon.modified),
134139 hl = 'Comment',
135140 },
136141 {
137142 condition = function()
138143 return not vim.bo.modifiable or vim.bo.readonly
139144 end,
140 provider = "",
145 provider = string.format(" %s ", icon.lock),
141146 hl = 'ErrorMsg',
142147 },
143148 }
157162 local file_type = {
158163 provider = function()
159 return ' ' .. string.upper(vim.bo.filetype)
164 return icon.file .. ' ' .. string.upper(vim.bo.filetype)
160165 end,
161166 }
170175 local file_format = {
171176 static = {
172 dos = '␤␍',
173 unix = '␤',
174 mac = '␍',
177 dos = icon.newline .. icon.carriage_return,
178 unix = icon.newline,
179 mac = icon.carriage_return,
175180 },
176181 provider = function(self)
177182 local fileformat = vim.bo.fileformat
213218 for i, server in pairs(vim.lsp.get_active_clients{ bufnr = 0 }) do
214219 table.insert(names, server.name)
215220 end
216 return " [" .. table.concat(names, " ") .. "]"
221 return icon.lsp .. " [" .. table.concat(names, " ") .. "]"
217222 end,
218223 }
220225 local diagnostic_enabled = {
221226 init = function(self)
222 self.icon = vim.diagnostic.is_disabled() and '﨡' or '蘒'
227 self.icon = vim.diagnostic.is_disabled() and icon.toggle_off or icon.toggle_on
223228 end,
224229 provider = function(self)
225 return ' ' .. self.icon
230 return icon.diagnostic .. ' ' .. self.icon
226231 end,
227232 }
308313 {
309314 provider = function(self)
310 return '🐢 ' .. self.relative_url
315 return icon.subversion .. ' ' .. icon.branch.. ' ' .. self.relative_url
311316 end,
312317 },
323328 {
324329 provider = function(self)
325 return " " .. self.status_dict.head .. ' '
330 return icon.git .. " " .. icon.branch .. " " .. self.status_dict.head .. ' '
326331 end,
327332 },
328333 {
329334 provider = function(self)
330335 local count = self.status_dict.added or 0
331 return count > 0 and (" " .. count .. ' ')
336 return count > 0 and (icon.diff_add .. " " .. count .. ' ')
332337 end,
333338 hl = 'DiffAdd',
334339 },
335340 {
336341 provider = function(self)
337342 local count = self.status_dict.removed or 0
338 return count > 0 and (" " .. count .. ' ')
343 return count > 0 and (icon.diff_remove .. " " .. count .. ' ')
339344 end,
340345 hl = 'DiffDelete',
341346 },
342347 {
343348 provider = function(self)
344349 local count = self.status_dict.changed or 0
345 return count > 0 and (" " .. count .. ' ')
350 return count > 0 and (icon.diff_change .. " " .. count .. ' ')
346351 end,
347352 hl = 'DiffChange',
348353 },
351356 local work_dir = {
352357 init = function(self)
353 self.icon = (vim.fn.haslocaldir(0) == 1 and "local" or "") .. " " .. " "
358 self.icon = (vim.fn.haslocaldir(0) == 1 and "local" or "") .. " " .. icon.folder .. " "
354359 local cwd = vim.fn.getcwd(0)
355360 self.cwd = vim.fn.fnamemodify(cwd, ":~")
356361 end,
395400 provider = function()
396401 local tname, _ = vim.api.nvim_buf_get_name(0):gsub(".*:", "")
397402 tname = vim.fs.basename(tname)
398 return " " .. tname
403 return icon.terminal .. " " .. tname
399404 end,
400405 hl = 'Bold',
401406 }
411416 condition = function()
412417 return vim.fn.reg_recording() ~= "" and vim.o.cmdheight == 0
413418 end,
414 provider = " ",
419 provider = icon.macro .. " ",
415420 hl = 'PreProc',
416421 utils.surround({ "░▒▓ ", " ▓▒░" }, nil, {
417422 provider = function()
431436 return ok and lazy_status.has_updates()
432437 end,
433438 update = { "User", pattern = "LazyUpdate" },
434 provider = function() return ' ' .. require'lazy.status'.updates() .. ' ' end,
439 provider = function() return ' ' .. icon.lazy .. ' ' .. require'lazy.status'.updates() .. ' ' end,
435440 on_click = {
436441 callback = function() require'lazy'.update() end,
437442 name = "update_plugins",
554559 },
555560 }
556561 end,
557 dependencies = {
558 'nvim-tree/nvim-web-devicons',
559 'lewis6991/gitsigns.nvim',
560 },
561562 },

neovim/lua/bugabinga/plugins/hlargs.lua

Modified

+4 / −4 text lines

1return {{
1return {
22 'm-demare/hlargs.nvim',
3 event = 'VeryLazy',
3 event = 'BufRead',
44 opts = {
55 paint_arg_declarations = true,
66 paint_arg_usages = true,
1515 },
1616 },
1717 dependencies = {
18 -- 'nvim-treesitter/nvim-treesitter'
18 'nvim-treesitter/nvim-treesitter'
1919 },
20}}
20}

neovim/lua/bugabinga/plugins/indent-o-matic.lua

Deleted
deleted file mode 100644

+0 / −5 text lines

1return {
2 'Darazaki/indent-o-matic',
3 event = 'BufReadPost',
4 opts = {},
5}

neovim/lua/bugabinga/plugins/indent_blankline.lua

Modified

+3 / −3 text lines

1return {{
1return {
22 "lukas-reineke/indent-blankline.nvim" ,
3 lazy = false,
3 event = { 'BufReadPost', 'BufNew' },
44 config = function()
55 local indent_blankline = require'indent_blankline'
1111 show_trailing_blankline_indent = false,
1212 }
1313 end,
14}}
14}

neovim/lua/bugabinga/plugins/neoclip.lua

Added
new file mode 100644

+26 / −0 text lines

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

neovim/lua/bugabinga/plugins/noice.lua

Modified

+29 / −11 text lines

1local map = require'std.keymap'
2
13return {
24 {
35 'folke/noice.nvim',
46 event = 'VeryLazy',
5 branch = 'main',
7 dependencies = {
8 'MunifTanjim/nui.nvim',
9 'rcarriga/nvim-notify',
10 -- 'nvim-telescope/telescope.nvim',
11 },
612 opts = {
713 cmdline = {
814 view = 'cmdline', -- cmdline on bottom
3137 -- cmdline = { relative = "cursor", position = { row = 0, col = 0 }, border = { style = "shadow" } },
3238 },
3339 },
34 dependencies = {
35 'MunifTanjim/nui.nvim',
36 'rcarriga/nvim-notify',
37 },
40 config = function(_, opts)
41 local noice = require'noice'
42 noice.setup(opts)
44 map.normal {
45 name = 'Open search for notifications...',
46 category = 'search',
47 keys = '<C-n><C-n>',
48 command = function()
49 local telescope = require'telescope'
50 -- telescope.load_extension'noice'
51 telescope.extensions.noice.noice()
52 end,
53 }
55 end,
3856 },
3957 {
4058 'rcarriga/nvim-notify',
4563 local shadow_fade = function(...)
4664 local opts = fade[1](...)
47 if opts then
48 opts.border = 'shadow'
49 opts.row = opts.row - 1
50 end
51 return opts
65 if opts then
66 opts.border = 'shadow'
67 opts.row = opts.row - 1
68 end
69 return opts
5270 end
5472 notify.setup {
5876 fps = 140,
5977 top_down = false,
6078 }
61 end,
79 end,
6280 },

neovim/lua/bugabinga/plugins/oil.lua

Modified

+15 / −2 text lines

33return {
44 'stevearc/oil.nvim',
55 lazy = false,
6 lazy = false,
6 -- event = 'VeryLazy',
77 dependencies = { "nvim-tree/nvim-web-devicons" },
88 config = function()
99 local oil = require'oil'
1010 oil.setup{
11 skip_confirm_for_simple_edits = true,
12 -- delete_to_trash = true,
13 -- trash_command = 'rm', --nu command
1115 colums = {
1216 "icon",
1317 "permissions",
1418 "size",
19 "mtime",
1520 },
1621 keymaps = {
1722 ["q"] = "actions.close",
23 ["<esc>"] = "actions.close",
24 ["<C-/>"] = "actions.show_help",
25 ["<C-_>"] = "actions.show_help",
26 ["<C-?>"] = "actions.show_help",
27 ["<C-v>"] = "actions.select_vsplit",
28 ["<C-x>"] = "actions.select_split",
29 ["<C-h>"] = "actions.toggle_hidden",
1830 },
1931 float = {
2032 border = 'shadow',
2739 name = 'Open parent directory in buffer.',
2840 category = 'files',
2941 keys = '-',
30 command = oil.open_float,
42 command = oil.open,
43 -- command = oil.open_float,
3144 }
3245 end,

neovim/lua/bugabinga/plugins/surround.lua

Modified

+4 / −5 text lines

11return {
22 {
33 'kylechui/nvim-surround',
4 event = 'VeryLazy',
4 keys = { '<C-g>s', '<C-g>S', 'ms', 'mss', 'mS', 'mSS', 'S', 'gS', 'md', 'mr', 'mR'},
55 opts = {
66 keymaps = {
77 insert = '<C-g>s',
1717 change_line = 'mR',
1818 },
1919 },
20 -- dependencies = {
21 -- 'nvim-treesitter/nvim-treesitter',
22 -- 'nvim-treesitter/nvim-treesitter-textobjects',
23 -- },
20 dependencies = {
21 'nvim-treesitter/nvim-treesitter',
22 },
2423 }

neovim/lua/bugabinga/plugins/telescope.lua

Modified

+88 / −163 text lines

1313return {
14 {
15 'nvim-telescope/telescope.nvim',
16 branch = '0.1.x',
17 cmd = 'Telescope',
18 event = 'VeryLazy',
19 config = function()
20 local telescope = require 'telescope'
21 local builtin = require 'telescope.builtin'
22 local actions = require 'telescope.actions'
23 local themes = require 'telescope.themes'
24 local ivy = themes.get_ivy { layout_config = { preview_width = 0.69 } }
25 local dropdown = themes.get_dropdown { layout_config = { width = 0.69 } }
26 local cursor = themes.get_cursor { layout_config = { preview_width = 0.42, width = 0.69 } }
14 'nvim-telescope/telescope.nvim',
15 branch = '0.1.x',
16 cmd = 'Telescope',
17 keys = { '<C-p><C-n>', '<C-e>', '<C-p><C-b>', '<C-p><C-g>', '<C-p><C-s>', '<C-p><C-k>', '<C-p><C-p>', '<C-p>', '<F1>' },
18 dependencies = {
19 'nvim-lua/plenary.nvim',
20 'nvim-tree/nvim-web-devicons',
21 'nvim-telescope/telescope-symbols.nvim',
22 },
23 config = function()
24 local telescope = require 'telescope'
25 local builtin = require 'telescope.builtin'
26 local actions = require 'telescope.actions'
27 local themes = require 'telescope.themes'
28 local ivy = themes.get_ivy { layout_config = { preview_width = 0.69 } }
29 local dropdown = themes.get_dropdown { layout_config = { width = 0.69 } }
30 local cursor = themes.get_cursor { layout_config = { preview_width = 0.42, width = 0.69 } }
32 telescope.setup {
33 defaults = {
34 path_display = { 'truncate' },
35 sorting_strategy = 'ascending',
36 layout_config = {
37 horizontal = { prompt_position = 'bottom', preview_width = 0.69 },
38 vertical = { mirror = false },
39 width = 0.69,
40 height = 0.42,
41 preview_cutoff = 124,
42 },
43 mappings = {
44 i = {
45 ['<C-j>'] = actions.cycle_history_next,
46 ['<C-k>'] = actions.cycle_history_prev,
47 ['<C-n>'] = actions.move_selection_next,
48 ['<C-p>'] = actions.move_selection_previous,
49 },
50 n = { q = actions.close },
51 },
52 },
53 }
29 telescope.setup {
30 defaults = {
31 path_display = { 'truncate' },
32 sorting_strategy = 'ascending',
33 layout_config = {
34 horizontal = { prompt_position = 'top', preview_width = 0.69 },
35 vertical = { mirror = false },
36 width = 0.88,
37 height = 0.69,
38 preview_cutoff = 124,
39 },
40 mappings = {
41 i = {
42 ['<C-j>'] = actions.cycle_history_next,
43 ['<C-k>'] = actions.cycle_history_prev,
44 ['<C-n>'] = actions.move_selection_next,
45 ['<C-p>'] = actions.move_selection_previous,
46 },
47 n = { q = actions.close },
48 },
49 extensions = {
50 file_browser = {
51 theme = 'ivy',
52 -- cwd_to_path = true,
53 -- select_buffer = true,
54 -- collapse_dirs = true,
55 git_status = false,
56 -- auto_depth = true,
57 -- grouped = true,
58 },
59 },
60 },
61 }
55 map.normal.visual.terminal {
56 name = 'Search help files',
57 category = 'help',
58 keys = '<F1>',
59 command = function() builtin.help_tags(dropdown) end,
60 }
63 require'neoclip'.setup{}
62 map.normal {
63 name = 'Open global search...',
64 category = 'plugins',
65 keys = '<C-p>',
66 command = function() builtin.builtin() end,
67 }
65 local extensions = {
66 'fzf',
67 'noice',
68 'file_browser',
69 'neoclip',
70 }
69 map.normal {
70 name = 'Open search for all files...',
71 category = 'search',
72 keys = '<C-p><C-p>',
73 command = function() builtin.find_files(ivy) end,
74 }
72 for _, extension in pairs(extensions) do
73 if not pcall(telescope.load_extension, extension) then
74 vim.notify('Telescope extension ' .. extension .. ' could not be loaded!', 'error')
75 end
76 end
76 map.normal {
77 name = 'Open search for keymaps...',
78 category = 'search',
79 keys = '<C-p><C-k>',
80 command = function() builtin.keymaps(dropdown) end,
81 }
78 map.normal {
79 name = 'Open file explorer...',
80 category = 'telescope',
81 keys = '<C-b>',
82 command = function()
83 telescope.extensions.file_browser.file_browser()
84 end,
85 }
83 map.normal {
84 name = 'Open search for symbols...',
85 category = 'search',
86 keys = '<C-p><C-s>',
87 command = function() builtin.symbols(cursor) end,
88 }
87 map.normal.visual.terminal {
88 name = 'Search help files',
89 category = 'help',
90 keys = '<F1>',
91 command = function() builtin.help_tags(dropdown) end,
92 }
90 map.normal {
91 name = 'Open search for all file contents...',
92 category = 'search',
93 keys = '<C-p><C-g>',
94 command = function() builtin.live_grep(ivy) end,
95 }
94 map.normal {
95 name = 'Open file explorer with current file...',
96 category = 'telescope',
97 keys = '<C-b><C-b>',
98 command = function()
99 local path = vim.api.nvim_buf_get_name(0)
100 telescope.extensions.file_browser.file_browser{ path = vim.fs.dirname(path), select_buffer = true }
101 end,
102 }
97 map.normal {
98 name = 'Open search for current buffer content...',
99 category = 'search',
100 keys = '<C-p><C-b>',
101 command = function() builtin.current_buffer_fuzzy_find(ivy) end,
102 }
104 map.normal {
105 name = 'Open clipboard history...',
106 category = 'history',
107 keys = '<C-p><C-v>',
108 command = function() telescope.extensions.neoclip.default(cursor) end,
109 }
104 map.normal {
105 name = 'Open search for buffers...',
106 category = 'search',
107 keys = '<C-e>',
108 command = function() builtin.buffers(cursor) end,
109 }
111 map.normal {
112 name = 'Open macro history...',
113 category = 'history',
114 keys = '<C-p><C-m>',
115 command = function() telescope.extensions.macroscope.default(dropdown) end,
116 }
118 map.normal {
119 name = 'Open global search...',
120 category = 'plugins',
121 keys = '<C-p>',
122 command = function() builtin.builtin() end,
123 }
125 map.normal {
126 name = 'Open search for all files...',
127 category = 'search',
128 keys = '<C-p><C-p>',
129 command = function() builtin.find_files(ivy) end,
130 }
132 map.normal {
133 name = 'Open search for keymaps...',
134 category = 'search',
135 keys = '<C-p><C-k>',
136 command = function() builtin.keymaps(dropdown) end,
137 }
139 map.normal {
140 name = 'Open search for symbols...',
141 category = 'search',
142 keys = '<C-p><C-s>',
143 command = function() builtin.symbols(cursor) end,
144 }
146 map.normal {
147 name = 'Open search for all file contents...',
148 category = 'search',
149 keys = '<C-p><C-g>',
150 command = function() builtin.live_grep(ivy) end,
151 }
153 map.normal {
154 name = 'Open search for current buffer content...',
155 category = 'search',
156 keys = '<C-p><C-b>',
157 command = function() builtin.current_buffer_fuzzy_find(ivy) end,
158 }
160 map.normal {
161 name = 'Open search for buffers...',
162 category = 'search',
163 keys = '<C-e>',
164 command = function() builtin.buffers(cursor) end,
165 }
167 map.normal {
168 name = 'Open search for notifications...',
169 category = 'search',
170 keys = '<C-p><C-n>',
171 command = function() telescope.extensions.noice.noice() end,
172 }
174 end,
175 dependencies = {
176 'nvim-telescope/telescope-file-browser.nvim',
177 'nvim-lua/plenary.nvim',
178 'nvim-telescope/telescope-symbols.nvim',
179 'AckslD/nvim-neoclip.lua',
180 'nvim-tree/nvim-web-devicons',
181 {
182 'nvim-telescope/telescope-fzf-native.nvim',
183 build = 'cmake -S. -Bbuild -DCMAKE_BUILD_TYPE=Release && cmake --build build --config Release && cmake --install build --prefix build',
184 },
185 },
186 },
111 end,

neovim/lua/bugabinga/plugins/tokyonight.lua

Deleted
deleted file mode 100644

+0 / −8 text lines

1return {
2 {
3 'folke/tokyonight.nvim',
4 lazy = false,
5 priority = 1000,
6 opts = {},
7 },
8}

neovim/lua/bugabinga/plugins/treesitter.lua

Modified

+3 / −9 text lines

2424return {
2525 'nvim-treesitter/nvim-treesitter',
2626 branch = "master",
27 event = {"BufReadPost", "BufNewFile"},
27 event = "BufRead",
2828 cmd = {
2929 "TSBufDisable",
3030 "TSBufEnable",
157157 events = 'InsertEnter',
158158 pattern = '*',
159159 command = function()
160 local highlight = require'nvim-treesitter.highlight'
161 pcall(highlight.detach)
162 pcall(highlight.set_custom_captures, { error = 'None' })
163 pcall(highlight.attach)
164161 end,
165162 },
166163 {
168165 events = 'InsertLeave',
169166 pattern = '*',
170167 command = function()
171 local highlight = require'nvim-treesitter.highlight'
172 pcall(highlight.detach)
173 pcall(highlight.set_custom_captures, { error = 'TSError' })
174 pcall(highlight.attach)
175169 end,
176170 },
177171 }

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

Modified

+1 / −1 text lines

11return {
22 {
33 'lukas-reineke/virt-column.nvim',
4 lazy = false,
4 event = { 'BufReadPost', 'BufNew' },
55 opts = {
66 char = '│',
77 },

neovim/lua/std/icon.lua

Added
new file mode 100644

+26 / −0 text lines

1return {
2 toggle_on = '',
3 toggle_off = '',
4 diagnostic = '⊙',
5 spelling = '󰓆',
6 linenumber = '󰉻',
7 linehighlight = '―',
8 modified = '',
9 lock = '',
10 file = '',
11 newline = '␤',
12 carriage_return = '␍',
13 lsp = '',
14 subversion = '🐢',
15 vim = '',
16 branch = '',
17 git = '',
18 diff_add = '',
19 diff_remove = '',
20 diff_change = '',
21 folder = '',
22 terminal = '',
23 macro = '',
24 lazy = '󰄻',
25}

wezterm/bugabinga/workspaces.lua

Modified

+19 / −9 text lines

11local wez = require 'wezterm'
22local mux = wez.mux
3
3local win32 = wez.target_triple:find'windows'
55local get_my_code_workspace = function()
6 if wez.target_triple:find('windows') then
6 if win32 then
77 return 'W:'
88 else
99 return os.getenv 'HOME' .. '/Workspace'
1313local WORKSPACE = get_my_code_workspace()
15wez.on('gui-attached', function()
16 -- maximize all displayed windows on startup
15-- maximize all displayed windows
16local maximize_window = function()
1717 local workspace = mux.get_active_workspace()
1818 for _, window in ipairs(mux.all_windows()) do
1919 if window:get_workspace() == workspace then
2020 window:gui_window():maximize()
2121 end
2222 end
23end)
23end
25-- NOTE(oli): errors in here do not show up as configuration errors
26-- check the log file in the wezterm mux server runtime directory
27-- e.g. /run/user/1000/wezterm/log
28wez.on('mux-startup', function()
25local setup_workspaces = function()
2926 local dork_ws = 'dorkfiles editing'
3027 local dork_cwd = WORKSPACE .. '/dotfiles'
3128 local dork_tab, dork_pane, dork_window = mux.spawn_window { cwd = dork_cwd, workspace = dork_ws }
5148 default_top_pane:activate()
5350 mux.set_active_workspace(default_ws)
51end
53wez.on('gui-attached', function()
54 maximize_window()
55 -- mux server seems very slow on windows...
56 if win32 then setup_workspaces() end
57end)
59-- NOTE(oli): errors in here do not show up as configuration errors
60-- check the log file in the wezterm mux server runtime directory
61-- e.g. /run/user/1000/wezterm/log
62wez.on('mux-startup', function()
63 setup_workspaces()
5464end)

wezterm/wezterm.lua

Modified

+46 / −34 text lines

44local key_binds = require 'bugabinga.key_binds'
55local dark_mode = require 'bugabinga.dark_mode'
6local workspaces = require 'bugabinga.workspaces'
6-- TODO mux server seems slow.
7-- local workspaces = require 'bugabinga.workspaces'
78local status = require 'bugabinga.status'
910local hostname = wez.hostname()
1011local enable_wayland = false
1112local window_decorations = 'RESIZE'
1213local font_size = 11.0
13local font = wez.font 'IBM Plex Mono'
14local font = wez.font'IBM Plex Mono'
15local font_rules = {
16 {
17 intensity = 'Bold',
18 italic = true,
19 font = wez.font {
20 family = 'VictorMono',
21 weight = 'Bold',
22 style = 'Italic',
23 },
24 },
25 {
26 italic = true,
27 intensity = 'Half',
28 font = wez.font {
29 family = 'VictorMono',
30 weight = 'DemiBold',
31 style = 'Italic',
32 },
33 },
34 {
35 italic = true,
36 intensity = 'Normal',
37 font = wez.font {
38 family = 'VictorMono',
39 style = 'Italic',
40 },
41 },
42}
1544if hostname == 'x230' then
45 font_size = 11
1646 enable_wayland = true
17 window_decorations = 'RESIZE'
1847elseif hostname == 'pop-os' then
1948 font_size = 16
2049elseif hostname == 'PC-00625' then
21 font_size = 16
22 font = wez.font 'Cascadia Code'
23 window_decorations = 'TITLE|RESIZE'
50 font = wez.font'BlexMono Nerd Font'
51 font_size = 12
2452end
2754return {
2855 -- logs key presses
2956 --debug_key_events = true,
3158 font = font,
59 font_rules = font_rules,
3260 font_size = font_size,
3361 underline_position = "-2pt",
3462 warn_about_missing_glyphs = false,
3563 color_scheme = dark_mode,
3664 color_schemes = nugu,
37 window_background_opacity = 1.0,
38 -- nightly
39 -- win32_system_backdrop = 'Acrylic',
40 --default_cwd = wez.home_dir,
65 default_cwd = wez.home_dir,
4166 default_prog = { 'nu' },
4267 default_cursor_style = 'SteadyBlock',
4368 cursor_blink_rate = 0,
44 cursor_thickness = '0.6cell',
69 cursor_thickness = '1cell',
4570 window_decorations = window_decorations,
4671 enable_tab_bar = true,
4772 -- if this is hidden, we cannot see the right status area
5176 show_update_window = false,
5277 audible_bell = 'Disabled',
5378 visual_bell = {
54 fade_in_duration_ms = 75,
55 fade_out_duration_ms = 75,
79 fade_in_duration_ms = 69,
80 fade_out_duration_ms = 69,
5681 target = 'CursorColor',
5782 },
5883 inactive_pane_hsb = {
59 saturation = 0.33,
60 brightness = 0.66,
84 saturation = 0.42,
85 brightness = 0.69,
6186 },
62 tab_max_width = 24,
87 tab_max_width = 42,
6388 enable_wayland = enable_wayland,
6489 window_padding = {
65 left = 12,
66 right = 8,
67 top = 12,
68 bottom = 8,
90 left = 2,
91 right = 2,
92 top = 2,
93 bottom = 0,
6994 },
7095 disable_default_key_bindings = true,
7196 leader = key_binds.leader,
7297 keys = key_binds.keys,
7398 key_tables = key_binds.key_tables,
74 unix_domains = {
75 {
76 name = 'unix',
77 } },
78 default_domain = 'unix',
79 default_gui_startup_args = { 'connect', 'unix' },
80 -- TODO(oli): create different launchers per OS
81 launch_menu = {
82 {
83 label = 'Bash',
84 args = {'bash', '-l'},
85 }
86 }