repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

neovim: removeing and cleaning even more plugs

ee2c113e03cffafaacc3d88477bd7d0ab5371de3

Oliver Krylow <o.krylow@isp-insoft.de> ·

unsigned

Browse filesCompare with HEAD

RIP puk

Changed files (27)

neovim/.editorconfig

Modified
1 -root = true
3 -[*]
4 -spell = false
6 -[*.lua]
7 -number = true
8 -relativenumber = true
9 -diagnostic = true
11 -# see https://github.com/CppCXY/EmmyLuaCodeStyle
12 -# optional space/tab
13 -indent_style = space
14 -# if indent_style is space, this is valid
15 -indent_size = 2
16 -# if indent_style is tab, this is valid
17 -tab_width = 2
18 -# none/single/double
19 -quote_style = single
21 -continuation_indent = 2
23 -# this mean utf8 length , if this is 'unset' then the line width is no longer checked
24 -# this option decides when to chopdown the code
25 -max_line_length = 120
27 -# optional crlf/lf/cr/auto, if it is 'auto', in windows it is crlf other platforms are lf
28 -# in neovim the value 'auto' is not a valid option, please use 'unset'
29 -end_of_line = lf
31 -# none/ comma / semicolon / only_kv_colon
32 -table_separator_style = comma
34 -#optional keep/never/always/smart
35 -trailing_table_separator = smart
37 -# keep/remove/remove_table_only/remove_string_only
38 -call_arg_parentheses = remove
40 -detect_end_of_line = false
42 -# this will check text end with new line
43 -insert_final_newline = true
45 -# [space]
46 -space_around_table_field_list = true
48 -space_before_attribute = true
50 -space_before_function_open_parenthesis = false
52 -space_before_function_call_open_parenthesis = false
54 -space_before_closure_open_parenthesis = true
56 -# optional always/only_string/only_table/none
57 -# or true/false
58 -space_before_function_call_single_arg = always
60 -space_before_open_square_bracket = false
62 -space_inside_function_call_parentheses = true
64 -space_inside_function_param_list_parentheses = true
66 -space_inside_square_brackets = false
68 -# like t[#t+1] = 1
69 -space_around_table_append_operator = false
71 -ignore_spaces_inside_function_call = false
73 -space_before_inline_comment = 1
75 -# [operator space]
76 -space_around_math_operator = true
78 -space_after_comma = true
80 -space_after_comma_in_for_statement = true
82 -space_around_concat_operator = true
84 -# [align]
86 -align_call_args = true
88 -align_function_params = true
90 -align_continuous_assign_statement = true
92 -align_continuous_rect_table_field = true
94 -align_continuous_line_space = 2
96 -align_if_branch = true
98 -# option none / always / contain_curly/
99 -align_array_table = true
101 -align_continuous_similar_call_args = true
103 -align_continuous_inline_comment = true
104 -# option none / always / only_call_stmt
105 -align_chain_expr = none
107 -# [indent]
109 -never_indent_before_if_condition = false
111 -never_indent_comment_on_if_branch = false
113 -# [line space]
115 -# The following configuration supports four expressions
116 -# keep
117 -# fixed(n)
118 -# min(n)
119 -# max(n)
120 -# for eg. min(2)
122 -line_space_after_if_statement = keep
124 -line_space_after_do_statement = keep
126 -line_space_after_while_statement = keep
128 -line_space_after_repeat_statement = keep
130 -line_space_after_for_statement = keep
132 -line_space_after_local_or_assign_statement = keep
134 -line_space_after_function_statement = fixed(2)
136 -line_space_after_expression_statement = keep
138 -line_space_after_comment = keep
140 -# [line break]
141 -break_all_list_when_line_exceed = false
143 -auto_collapse_lines = false
145 -break_before_braces = false
146 -# [preference]
147 -ignore_space_after_colon = false
149 -remove_call_expression_list_finish_comma = false
1 +root = true
3 +[*]
4 +spell = false
6 +[*.lua]
7 +number = false
8 +relativenumber = false
9 +diagnostic = false
11 +# see https://github.com/CppCXY/EmmyLuaCodeStyle
12 +# optional space/tab
13 +indent_style = space
14 +# if indent_style is space, this is valid
15 +indent_size = 2
16 +# if indent_style is tab, this is valid
17 +tab_width = 2
18 +# none/single/double
19 +quote_style = single
21 +continuation_indent = 2
23 +# this mean utf8 length , if this is 'unset' then the line width is no longer checked
24 +# this option decides when to chopdown the code
25 +max_line_length = 120
27 +# optional crlf/lf/cr/auto, if it is 'auto', in windows it is crlf other platforms are lf
28 +# in neovim the value 'auto' is not a valid option, please use 'unset'
29 +end_of_line = lf
31 +# none/ comma / semicolon / only_kv_colon
32 +table_separator_style = comma
34 +#optional keep/never/always/smart
35 +trailing_table_separator = smart
37 +# keep/remove/remove_table_only/remove_string_only
38 +call_arg_parentheses = remove
40 +detect_end_of_line = false
42 +# this will check text end with new line
43 +insert_final_newline = true
45 +# [space]
46 +space_around_table_field_list = true
48 +space_before_attribute = true
50 +space_before_function_open_parenthesis = false
52 +space_before_function_call_open_parenthesis = false
54 +space_before_closure_open_parenthesis = true
56 +# optional always/only_string/only_table/none
57 +# or true/false
58 +space_before_function_call_single_arg = always
60 +space_before_open_square_bracket = false
62 +space_inside_function_call_parentheses = true
64 +space_inside_function_param_list_parentheses = true
66 +space_inside_square_brackets = false
68 +# like t[#t+1] = 1
69 +space_around_table_append_operator = false
71 +ignore_spaces_inside_function_call = false
73 +space_before_inline_comment = 1
75 +# [operator space]
76 +space_around_math_operator = true
78 +space_after_comma = true
80 +space_after_comma_in_for_statement = true
82 +space_around_concat_operator = true
84 +# [align]
86 +align_call_args = true
88 +align_function_params = true
90 +align_continuous_assign_statement = true
92 +align_continuous_rect_table_field = true
94 +align_continuous_line_space = 2
96 +align_if_branch = true
98 +# option none / always / contain_curly/
99 +align_array_table = true
101 +align_continuous_similar_call_args = true
103 +align_continuous_inline_comment = true
104 +# option none / always / only_call_stmt
105 +align_chain_expr = none
107 +# [indent]
109 +never_indent_before_if_condition = false
111 +never_indent_comment_on_if_branch = false
113 +# [line space]
115 +# The following configuration supports four expressions
116 +# keep
117 +# fixed(n)
118 +# min(n)
119 +# max(n)
120 +# for eg. min(2)
122 +line_space_after_if_statement = keep
124 +line_space_after_do_statement = keep
126 +line_space_after_while_statement = keep
128 +line_space_after_repeat_statement = keep
130 +line_space_after_for_statement = keep
132 +line_space_after_local_or_assign_statement = keep
134 +line_space_after_function_statement = fixed(2)
136 +line_space_after_expression_statement = keep
138 +line_space_after_comment = keep
140 +# [line break]
141 +break_all_list_when_line_exceed = false
143 +auto_collapse_lines = false
145 +break_before_braces = false
146 +# [preference]
147 +ignore_space_after_colon = false
149 +remove_call_expression_list_finish_comma = false

neovim/.lsp.settings.lua

Modified
1 +local runtime_path = vim.split( package.path, ';' )
2 +-- table.insert( runtime_path, vim.fs.joinpath( 'lua', '?.lua' ) )
3 +-- table.insert( runtime_path, vim.fs.joinpath( 'lua', '?', 'init.lua' ) )
1 5 return {
2 6 LuaLS = {
3 7 Lua = {
4 8 runtime = {
5 9 version = 'LuaJIT',
6 - path = vim.split( package.path, ';' ),
10 + path = runtime_path,
8 12 diagnostics = {
9 13 globals = { 'vim', 'prequire' },

neovim/lazy-lock.json

Modified
2 - "Comment.nvim": { "branch": "master", "commit": "e51f2b142d88bb666dcaa77d93a07f4b419aca70" },
3 - "blink.cmp": { "branch": "main", "commit": "81069e3955a8b4d5063287a2a6a47a844e9ca2cb" },
2 + "blink.cmp": { "branch": "main", "commit": "12d9ecd98055423fa76dfcf05b856967129b8847" },
4 3 "conform.nvim": { "branch": "master", "commit": "6239d9986f51ca93ded99ecdb1af0e287eabb651" },
5 4 "decisive.nvim": { "branch": "main", "commit": "a7251adebccbc9c899cff39a524b20d06e2b78b5" },
5 + "fidget.nvim": { "branch": "main", "commit": "ef99df04a1c53a453602421bc0f756997edc8289" },
6 6 "glance.nvim": { "branch": "master", "commit": "17ee84e29ac33e7e5d91609f675cee8477586bda" },
7 7 "heirline.nvim": { "branch": "master", "commit": "cc359b628266cb9a84b2d71c883f2b99e16473a0" },
8 8 "in-and-out.nvim": { "branch": "master", "commit": "ab24cafadc3418dffb0c7e9b0621cff60b9ac551" },
11 11 "lazydev.nvim": { "branch": "main", "commit": "f59bd14a852ca43db38e3662395354cb2a9b13e0" },
12 12 "mason.nvim": { "branch": "main", "commit": "c43eeb5614a09dc17c03a7fb49de2e05de203924" },
13 13 "mini.bracketed": { "branch": "main", "commit": "833d66df6e0588222312a963780c6ec42ed7437d" },
14 - "mini.bufremove": { "branch": "main", "commit": "1ee294a97e091d3cf967974df622c0d887890dc2" },
14 + "mini.cursorword": { "branch": "main", "commit": "7d1b38a17834acbbc4feff8e42aedc4ed0c6ff06" },
15 + "mini.diff": { "branch": "main", "commit": "24d46798be8a358d38d3adc92c7ebcbb2d6f67e0" },
16 + "mini.jump2d": { "branch": "main", "commit": "b0963aa2ec80b4b1ed1c7f93d9c969bb3f4b65b6" },
17 + "mini.misc": { "branch": "main", "commit": "428da688126b320194a944233f9f8dfc46669307" },
18 + "mini.operators": { "branch": "main", "commit": "35b12f54bd5acb860f4297fd6d12fd07b1b065e2" },
15 19 "mkdir.nvim": { "branch": "main", "commit": "c55d1dee4f099528a1853b28bb28caa802eba217" },
16 - "nui.nvim": { "branch": "main", "commit": "b58e2bfda5cea347c9d58b7f11cf3012c7b3953f" },
17 20 "nvim-autopairs": { "branch": "master", "commit": "f158dcb865c36f72c92358f87787dab2c272eaf3" },
18 21 "nvim-docs-view": { "branch": "master", "commit": "365593534e0acd762bfddce6e8313315ffa4fa36" },
19 22 "nvim-gomove": { "branch": "main", "commit": "2b44ae7ac0804f4e3959228122f7c85bef1964e3" },
20 23 "nvim-highlight-colors": { "branch": "main", "commit": "a411550ef85cae467b889ba7d1a96bd78332d90e" },
21 - "nvim-lastplace": { "branch": "main", "commit": "0bb6103c506315044872e0f84b1f736c4172bb20" },
22 24 "nvim-lint": { "branch": "master", "commit": "968a35d54b3a4c1ce66609cf80b14d4ae44fe77f" },
23 - "nvim-neoclip.lua": { "branch": "main", "commit": "32e05f2d23dc5b6a284a688c0535a83d1bfc633f" },
24 - "nvim-rulebook": { "branch": "main", "commit": "1ef4ea61ebbb4d4b77417870c1247005b12af09d" },
25 + "nvim-rulebook": { "branch": "main", "commit": "528857a6e522396c2ded41cb24e694fb3f177429" },
25 26 "nvim-surround": { "branch": "main", "commit": "ec2dc7671067e0086cdf29c2f5df2dd909d5f71f" },
26 - "nvim-treesitter": { "branch": "master", "commit": "8d4fdc5e47e2a4e00179e43f56221250ce365973" },
27 + "nvim-treesitter": { "branch": "master", "commit": "02f8777252fe089c9ea19aa8e19745b505512655" },
27 28 "nvim-treesitter-endwise": { "branch": "master", "commit": "8b34305ffc28bd75a22f5a0a9928ee726a85c9a6" },
28 29 "nvim-treesitter-textobjects": { "branch": "master", "commit": "ad8f0a472148c3e0ae9851e26a722ee4e29b1595" },
29 30 "nvim-ts-autotag": { "branch": "main", "commit": "e239a560f338be31337e7abc3ee42515daf23f5e" },
30 31 "nvim-web-devicons": { "branch": "master", "commit": "edbe0a65cfacbbfff6a4a1e98ddd60c28c560509" },
31 32 "oil.nvim": { "branch": "master", "commit": "50c4bd4ee216f08907f64d0295c0663a69e58ffb" },
32 - "plenary.nvim": { "branch": "master", "commit": "2d9b06177a975543726ce5c73fca176cedbffe9d" },
33 33 "refjump.nvim": { "branch": "main", "commit": "92ec869724b949c40efbea54a560a835680d3de2" },
34 34 "specs.nvim": { "branch": "main", "commit": "8a108c8b37dec1b184a1d3d76c6cf867bfbe9636" },
35 35 "symbol-usage.nvim": { "branch": "main", "commit": "0f9b3da014b7e41559b643e7461fcabb2a7dc83a" },
36 - "telescope-fzf-native.nvim": { "branch": "main", "commit": "cf48d4dfce44e0b9a2e19a008d6ec6ea6f01a83b" },
37 - "telescope-symbols.nvim": { "branch": "master", "commit": "a6d0127a53d39b9fc2af75bd169d288166118aec" },
38 - "telescope-undo.nvim": { "branch": "main", "commit": "2971cc9f193ec09e0c5de3563f99cbea16b63f10" },
39 - "telescope-zoxide": { "branch": "main", "commit": "54bfe630bad08dc9891ec78c7cf8db38dd725c97" },
40 - "telescope.nvim": { "branch": "master", "commit": "a0bbec21143c7bc5f8bb02e0005fa0b982edc026" },
41 36 "tree-sitter-nu": { "branch": "main", "commit": "74e6037383ce3a77ed6fdb8281bbd69316c723a4" },
42 37 "treesj": { "branch": "main", "commit": "03415ac60791d48e120a80d37e080744faf3ac15" },
43 38 "virt-column.nvim": { "branch": "master", "commit": "b87e3e0864211a32724a2ebf3be37e24e9e2fa99" },
44 - "wezterm-types": { "branch": "main", "commit": "1518752906ba3fac0060d9efab6e4d3ec15d4b5a" },
45 - "which-key.nvim": { "branch": "main", "commit": "fb070344402cfc662299d9914f5546d840a22126" },
46 - "zen-mode.nvim": { "branch": "main", "commit": "04b52674b8c800f8b7d4609e8bd8d0212e3ffa79" }
39 + "wezterm-types": { "branch": "main", "commit": "1518752906ba3fac0060d9efab6e4d3ec15d4b5a" }

neovim/lua/bugabinga/diagnostic.lua

Modified
2 2 local map = require 'std.map'
3 3 local auto = require 'std.auto'
4 4 local icon = require 'std.icon'
6 -local diagnostic_icons = { icon.error, icon.warn, icon.info, icon.hint, }
6 +local diagnostic_icons = { icon.error, icon.warn, icon.info, icon.hint }
7 7 diagnostic_icons.error = diagnostic_icons[1]
8 8 diagnostic_icons.warn = diagnostic_icons[2]
9 9 diagnostic_icons.info = diagnostic_icons[3]
10 10 diagnostic_icons.hint = diagnostic_icons[4]
12 12 local display_name = {
13 - 'Error',
14 - 'Warning',
15 - 'Information',
16 - 'Hint',
13 + 'Error',
14 + 'Warning',
15 + 'Information',
16 + 'Hint',
19 19 local diagnostic = vim.diagnostic
20 -diagnostic.enable(false)
20 +diagnostic.enable( false )
22 22 auto 'disable_diagnostic_initially' {
23 - description = 'Disable Diagnostics initially, when attaching an LSP client to a buffer',
24 - events = 'LspAttach',
25 - command = function () diagnostic.enable(false, { bufnr = 0 } ) end,
23 + description = 'Disable Diagnostics initially, when attaching an LSP client to a buffer',
24 + events = 'LspAttach',
25 + command = function () diagnostic.enable( false, { bufnr = 0 } ) end,
28 28 local diagnostic_format = function ( context )
29 - return string.format( '%s: %s', display_name[context.severity], context.message )
29 + return string.format( '%s: %s', display_name[context.severity], context.message )
32 32 local prefix_format = function ( context, index, total )
33 - return string.format( '%s/%s %s %s ', index, total, context.source, diagnostic_icons[context.severity] ),
34 - 'DiagnosticVirtualText' .. display_name[context.severity]
33 + return string.format( '%s/%s %s %s ', index, total, context.source, diagnostic_icons[context.severity] ),
34 + 'DiagnosticVirtualText' .. display_name[context.severity]
37 37 diagnostic.config {
57 57 local sign = function ( options )
58 - vim.fn.sign_define( options.name, {
59 - text = options.text,
60 - texthl = options.name,
61 - numhl = nil,
62 - culhl = nil,
63 - linehl = nil,
64 - } )
58 + vim.fn.sign_define( options.name, {
59 + text = options.text,
60 + texthl = options.name,
61 + numhl = nil,
62 + culhl = nil,
63 + linehl = nil,
64 + } )
67 -sign { name = 'DiagnosticSignError', text = diagnostic_icons.error, }
68 -sign { name = 'DiagnosticSignWarn', text = diagnostic_icons.warn, }
69 -sign { name = 'DiagnosticSignHint', text = diagnostic_icons.hint, }
70 -sign { name = 'DiagnosticSignInfo', text = diagnostic_icons.info, }
67 +sign { name = 'DiagnosticSignError', text = diagnostic_icons.error }
68 +sign { name = 'DiagnosticSignWarn', text = diagnostic_icons.warn }
69 +sign { name = 'DiagnosticSignHint', text = diagnostic_icons.hint }
70 +sign { name = 'DiagnosticSignInfo', text = diagnostic_icons.info }
72 72 -- TODO: move to togglers
73 73 map.normal {
74 - description = 'Toggle diagnostics',
75 - category = 'diagnostic',
76 - keys = '<leader>td',
77 - command = function ()
78 - if not diagnostic.is_enabled() then
79 - diagnostic.enable()
80 - vim.notify 'Enabling Diagnostics'
81 - else
82 - diagnostic.enable(false)
83 - vim.notify 'Disabling Diagnostics'
84 - end
85 - end,
74 + description = 'Toggle diagnostics',
75 + category = 'diagnostic',
76 + keys = '<leader>td',
77 + command = function ()
78 + if not diagnostic.is_enabled() then
79 + diagnostic.enable()
80 + vim.notify 'Enabling Diagnostics'
81 + else
82 + diagnostic.enable( false )
83 + vim.notify 'Disabling Diagnostics'
84 + end
85 + end,
88 88 map.normal {
89 - description = 'Show diagnostics under cursor',
90 - category = 'diagnostic',
91 - keys = 'H',
92 - command = diagnostic.open_float,
89 + description = 'Show diagnostics under cursor',
90 + category = 'diagnostic',
91 + keys = 'H',
92 + command = diagnostic.open_float,
95 95 map.normal {
96 - description = 'Open diagnostics in quickfix list.',
97 - category = 'diagnostic',
98 - keys = 'HH',
99 - command = diagnostic.setqflist,
96 + description = 'Open diagnostics in quickfix list.',
97 + category = 'diagnostic',
98 + keys = 'HH',
99 + command = diagnostic.setqflist,
102 102 local show_diagnostics_in_buffer = function ()
103 - local builtin = require 'telescope.builtin'
104 - builtin.diagnostics { bufnr = 0, }
103 + local builtin = require 'telescope.builtin'
104 + builtin.diagnostics { bufnr = 0 }
107 107 map.normal {
108 - description = 'Show all diagnostics in buffer',
109 - category = 'diagnostic',
110 - keys = '<F6>',
111 - command = show_diagnostics_in_buffer,
108 + description = 'Show all diagnostics in buffer',
109 + category = 'diagnostic',
110 + keys = '<F6>',
111 + command = show_diagnostics_in_buffer,
114 114 local show_diagnostics_in_workspace = function ()
115 - local builtin = require 'telescope.builtin'
116 - builtin.diagnostics()
115 + local builtin = require 'telescope.builtin'
116 + builtin.diagnostics()
119 119 map.normal {
120 - description = 'Show all diagnostics in workspace',
121 - category = 'diagnostic',
122 - keys = '<F6><F6>',
123 - command = show_diagnostics_in_workspace,
120 + description = 'Show all diagnostics in workspace',
121 + category = 'diagnostic',
122 + keys = '<F6><F6>',
123 + command = show_diagnostics_in_workspace,
126 126 -- a little debug helper to show all kinds of diagnostics
128 128 local dia = function ( severity, line )
129 - local ns = vim.api.nvim_create_namespace( 'test' .. tostring( severity ) )
130 - local bufnr = vim.api.nvim_get_current_buf()
131 - local options = {
132 - bufnr = bufnr,
133 - lnum = line,
134 - end_lnum = line,
135 - col = 0,
136 - severity = severity,
137 - message = 'This is a test ' .. tostring( severity ) .. ' diagnostic',
138 - }
129 + local ns = vim.api.nvim_create_namespace( 'test' .. tostring( severity ) )
130 + local bufnr = vim.api.nvim_get_current_buf()
131 + local options = {
132 + bufnr = bufnr,
133 + lnum = line,
134 + end_lnum = line,
135 + col = 0,
136 + severity = severity,
137 + message = 'This is a test ' .. tostring( severity ) .. ' diagnostic',
140 - vim.diagnostic.set( ns, bufnr, { options, } )
141 - vim.diagnostic.show( ns, bufnr, { options, } )
140 + vim.diagnostic.set( ns, bufnr, { options } )
141 + vim.diagnostic.show( ns, bufnr, { options } )
144 144 local send_dia = function ()
145 - dia( vim.diagnostic.severity.ERROR, 1 )
146 - dia( vim.diagnostic.severity.WARN, 2 )
147 - dia( vim.diagnostic.severity.INFO, 3 )
148 - dia( vim.diagnostic.severity.HINT, 4 )
145 + dia( vim.diagnostic.severity.ERROR, 1 )
146 + dia( vim.diagnostic.severity.WARN, 2 )
147 + dia( vim.diagnostic.severity.INFO, 3 )
148 + dia( vim.diagnostic.severity.HINT, 4 )
151 151 vim.g.send_dia = send_dia

neovim/lua/bugabinga/lazy.lua

Modified
1 -local win32 = vim.loop.os_uname().sysname:match 'Win'
1 +local win32 = vim.uv.os_uname().sysname:match 'Win'
2 2 local lazypath = vim.fn.stdpath 'data' .. '/lazy/lazy.nvim'
3 -if not vim.loop.fs_stat( lazypath ) then
3 +if not vim.uv.fs_stat( lazypath ) then
4 4 vim.fn.system {
5 5 'git',
6 6 'clone',
22 22 local overrides = require 'std.localrc' ( '.lazy.specs.lua', 'table' )
24 24 lazy.setup {
25 - spec = { { import = 'bugabinga.plugins', }, overrides, },
25 + spec = { { import = 'bugabinga.plugins' }, overrides },
26 26 defaults = {
27 27 lazy = true,
28 28 -- version = '*',
29 29 -- useful to globally disable plugins
30 - -- cond = function ( plugin_spec )
31 - -- return plugin_spec.name:find 'oil'
32 - -- end,
30 + cond = function ( plugin_spec )
31 + return true
32 + -- return plugin_spec.name:find 'virt'
33 + end,
34 35 install = {
35 36 missing = true,
36 - colorscheme = { 'nugu_fresh', 'quiet', },
37 + colorscheme = { 'nugu', 'quiet' },
38 39 checker = {
39 40 enabled = not win32,
40 - notify = false,
41 + notify = true,
42 43 ui = {
43 - size = { width = 0.69, heigth = 0.69, },
44 + size = { width = 0.69, heigth = 0.69 },
44 45 border = vim.g.border_style,
45 46 icons = {
46 47 lazy = icon.lazy,
47 48 task = icon.terminal,
48 49 ft = icon.file,
50 - custom_keys = {
51 - ['<localleader>l'] = {
52 - function ( plugin )
53 - require 'lazy.util'.float_term( { 'gitui', }, {
54 - cwd = plugin.dir,
55 - } )
56 - end,
57 - desc = 'Open gitui',
58 - },
60 - ['<localleader>t'] = {
61 - function ( plugin )
62 - require 'lazy.util'.float_term( nil, {
63 - cwd = plugin.dir,
64 - } )
65 - end,
66 - desc = 'Open terminal in plugin dir',
67 - },
68 - },
70 - diff = { cmd = 'diffview.nvim', },
71 - change_detection = { notify = false, },
52 + change_detection = { notify = true },
72 53 performance = {
73 54 rtp = {
74 55 disabled_plugins = {
100 81 dev = {
101 82 fallback = true,
102 - patterns = { 'bugabinga', },
83 + patterns = { 'bugabinga' },
103 84 path = win32 and 'W:/' or '~/Workspace',
105 86 profiling = {
106 - loader = true,
107 - require = true,
87 + loader = false,
88 + require = false,
111 92 local map = require 'std.map'
113 94 local lazy_cmds = vim.iter {
114 - { 'Show', '', lazy.show, },
115 - { 'Install', 'i', lazy.install, },
116 - { 'Update', 'u', lazy.update, },
117 - { 'Sync', 's', lazy.sync, },
118 - { 'Clean', 'x', lazy.clean, },
119 - { 'Check', 'c', lazy.check, },
120 - { 'Log', 'l', lazy.log, },
121 - { 'Restore', 'r', lazy.restore, },
122 - { 'Profile', 'p', lazy.profile, },
123 - { 'Debug', 'd', lazy.debug, },
95 + { 'Show', '', lazy.show },
96 + { 'Install', 'i', lazy.install },
97 + { 'Update', 'u', lazy.update },
98 + { 'Sync', 's', lazy.sync },
99 + { 'Clean', 'x', lazy.clean },
100 + { 'Check', 'c', lazy.check },
101 + { 'Log', 'l', lazy.log },
102 + { 'Restore', 'r', lazy.restore },
103 + { 'Profile', 'p', lazy.profile },
104 + { 'Debug', 'd', lazy.debug },
126 107 local base_key = '<leader>z'

neovim/lua/bugabinga/lsp/init.lua

Modified
3 3 local dbg = require 'std.dbg'
4 4 local icon = require 'std.icon'
5 5 local defer = require 'std.defer'
6 6 local map = require 'std.map'
7 7 local auto = require 'std.auto'
8 -local ui = require 'bugabinga.ui'
9 8 local table = require 'std.table'
10 9 local ignored = require 'std.ignored'
11 10 local user_command = require 'std.user_command'
271 270 vim.bo[bufnr].omnifunc = 'v:lua.vim.lsp.omnifunc'
274 - if client.server_capabilities.documentHighlightProvider then
275 - -- FIXME: there is an incubating pluging, that adds [r ]r bindings to navigate
276 - -- highlighted references.
277 - -- steal those, improve the debouncing below (i still see dubbel highlights sometimes)
278 - -- and then remove plugin.
279 - -- the timer has application lifetime. no need to close
280 - -- local delay = 300
281 - -- local debounced_highlight = defer.debounce_leading( vim.lsp.buf.document_highlight, delay )
282 - -- local debounced_clear = defer.debounce_leading( vim.lsp.buf.clear_references, delay )
283 - --
284 - -- auto 'document_highlight' {
285 - -- {
286 - -- description = 'Highlight symbol under cursor on hold',
287 - -- events = 'CursorHold',
288 - -- buffer = bufnr,
289 - -- command = debounced_highlight,
290 - -- },
291 - -- {
292 - -- description = 'Remove highlight from symbol under cursor on move',
293 - -- events = { 'CursorMoved', 'InsertEnter' },
294 - -- buffer = bufnr,
295 - -- command = debounced_clear,
296 - -- },
297 - -- }
298 - end
300 273 if client.server_capabilities.inlayHintProvider then
301 274 add( client_id, map.normal {
302 275 description = 'Toggle inlay hints',
459 432 :totable()
461 - ui.show_tree( infos )
434 + vim.print( vim.inspect( infos ) )
464 437 local lsp_info_extended = function ( command )
465 438 local all_or_current = command.args and command.args == 'all' and {} or { bufnr = 0 }
466 439 local active_clients = vim.lsp.get_clients( all_or_current )
467 - ui.show_tree( active_clients )
440 + vim.print( vim.inspect( active_clients ) )
470 443 user_command.LspInfo
512 485 completion_kinds[i] = completion_icons[kind] or kind
516 488 -- style the lsp hover window
517 489 vim.lsp.handlers['textDocument/hover'] = vim.lsp.with(
518 490 vim.lsp.handlers.hover, {

neovim/lua/bugabinga/mark.lua

Deleted
deleted file mode 100644
1 --- Custom mark API.
2 --- Implementation slightly inspired by https://github.com/chentoast/marks.nvim, but this is
3 --- much simpler.
5 ----Map of mark information per buffer.
6 ----@type table<integer, table<string, {line: integer, id: integer}>>
7 -local marks = {}
9 ----Keeps track of the signs I've already created.
10 ----@type table<string, boolean>
11 -local sign_cache = {}
13 ----The sign and autocommand group name.
14 -local sign_group_name = 'MarksSigns'
16 ----@param mark string
17 -local function is_lowercase_mark( mark )
18 - return 97 <= mark:byte() and mark:byte() <= 122
19 -end
21 ----@param mark string
22 -local function is_uppercase_mark( mark )
23 - return 65 <= mark:byte() and mark:byte() <= 90
24 -end
26 ----@param mark string
27 -local function is_letter_mark( mark )
28 - return is_lowercase_mark( mark ) or is_uppercase_mark( mark )
29 -end
31 ----@param mark string
32 ----@param bufnr integer
33 -local function delete_mark( mark, bufnr )
34 - local buffer_marks = marks[bufnr]
36 - if not buffer_marks or not buffer_marks[mark] then
37 - return
38 - end
40 - vim.fn.sign_unplace( sign_group_name, { buffer = bufnr, id = buffer_marks[mark].id } )
41 - buffer_marks[mark] = nil
43 - if is_letter_mark( mark ) then
44 - vim.cmd( 'delmarks ' .. mark )
45 - end
46 -end
48 ----@param mark string
49 ----@param bufnr integer
50 ----@param line? integer
51 -local function register_mark( mark, bufnr, line )
52 - local buffer_marks = marks[bufnr]
54 - if not buffer_marks then
55 - return
56 - end
58 - if buffer_marks[mark] then
59 - -- Mark already exists, remove it first.
60 - delete_mark( mark, bufnr )
61 - end
63 - -- Add the sign to the tracking table.
64 - local id = mark:byte() * 100
65 - line = line or vim.api.nvim_win_get_cursor( 0 )[1]
66 - buffer_marks[mark] = { line = line, id = id }
68 - -- Create the sign.
69 - local sign_name = 'Marks_' .. mark
70 - if not sign_cache[sign_name] then
71 - vim.fn.sign_define( sign_name, { text = mark, texthl = 'GitSignsChange' } )
72 - sign_cache[sign_name] = true
73 - end
74 - vim.fn.sign_place( id, sign_group_name, sign_name, bufnr, {
75 - lnum = line,
76 - priority = 10,
77 - } )
78 -end
80 ----@param bufnr integer
81 -local function set_keymaps( bufnr )
82 - vim.api.nvim_buf_set_keymap( bufnr, 'n', '<leader>ma', '', {
83 - desc = 'Add mark',
84 - callback = function ()
85 - local ok, mark = pcall( function ()
86 - return vim.fn.getcharstr()
87 - end )
88 - if not ok then
89 - return
90 - end
92 - if is_letter_mark( mark ) then
93 - register_mark( mark, bufnr )
94 - vim.cmd( 'normal! m' .. mark )
95 - end
96 - end,
97 - } )
99 - vim.api.nvim_buf_set_keymap( bufnr, 'n', '<leader>md', '', {
100 - desc = 'Delete mark',
101 - callback = function ()
102 - local ok, mark = pcall( function ()
103 - return vim.fn.getcharstr()
104 - end )
105 - if not ok then
106 - return
107 - end
109 - if is_letter_mark( mark ) then
110 - delete_mark( mark, bufnr )
111 - end
112 - end,
113 - } )
115 - vim.api.nvim_buf_set_keymap( bufnr, 'n', '<leader>mD', '', {
116 - desc = 'Delete all buffer marks',
117 - callback = function ()
118 - -- This will delete the builtin marks too, but I'll restore
119 - -- them on cursor move so whatever.
120 - marks[bufnr] = {}
121 - vim.fn.sign_unplace( sign_group_name, { buffer = bufnr } )
122 - vim.cmd 'delmarks!'
123 - end,
124 - } )
125 -end
127 ----@param bufnr integer
128 -local function refresh_builtin_marks( bufnr )
129 - for _, builtin_mark in ipairs { '.', '`' } do
130 - local pos = vim.fn.getpos( "'" .. builtin_mark )
131 - local cached_mark = marks[bufnr][builtin_mark]
132 - if (pos[1] == 0 or pos[1] == bufnr) and pos[2] ~= 0 and (not cached_mark or pos[2] ~= cached_mark.line) then
133 - register_mark( builtin_mark, bufnr, pos[2] )
134 - end
135 - end
136 -end
138 -vim.api.nvim_create_autocmd( 'BufWinEnter', {
139 - group = vim.api.nvim_create_augroup( sign_group_name, { clear = true } ),
140 - desc = 'Configure mark signs',
141 - callback = function ( event )
142 - local bufnr = event.buf
143 - -- Only handle normal buffers.
144 - if vim.bo[bufnr].bt ~= '' then
145 - return
146 - end
148 - -- Set custom mappings.
149 - set_keymaps( bufnr )
151 - if not marks[bufnr] then
152 - marks[bufnr] = {}
153 - end
155 - -- Remove all marks that were deleted.
156 - for mark, _ in pairs( marks[bufnr] ) do
157 - if vim.api.nvim_buf_get_mark( bufnr, mark )[1] == 0 then
158 - delete_mark( mark, bufnr )
159 - end
160 - end
162 - -- Register the letter marks.
163 - for _, data in ipairs( vim.fn.getmarklist() ) do
164 - local mark = data.mark:sub( 2, 3 )
165 - local pos = data.pos
166 - local cached_mark = marks[bufnr][mark]
168 - if is_uppercase_mark( mark ) and pos[1] == bufnr and (not cached_mark or pos[2] ~= cached_mark.line) then
169 - register_mark( mark, bufnr, pos[2] )
170 - end
171 - end
172 - for _, data in ipairs( vim.fn.getmarklist '%' ) do
173 - local mark = data.mark:sub( 2, 3 )
174 - local pos = data.pos
175 - local cached_mark = marks[bufnr][mark]
177 - if is_lowercase_mark( mark ) and (not cached_mark or pos[2] ~= cached_mark.line) then
178 - register_mark( mark, bufnr, pos[2] )
179 - end
180 - end
182 - local buf_group_name = sign_group_name .. tostring( bufnr )
183 - if pcall( vim.api.nvim_get_autocmds, { group = buf_group_name, buffer = bufnr } ) then
184 - return
185 - end
186 - refresh_builtin_marks( bufnr )
187 - local marks_buf_group = vim.api.nvim_create_augroup( buf_group_name, { clear = true } )
188 - vim.api.nvim_create_autocmd( 'CursorMoved', {
189 - group = marks_buf_group,
190 - desc = 'Refresh signs for builtin marks',
191 - buffer = bufnr,
192 - callback = function ()
193 - refresh_builtin_marks( bufnr )
194 - end,
195 - } )
196 - end,
197 -} )

neovim/lua/bugabinga/nugu/init.lua

Modified
124 124 _.Normal { fg = content_normal, bg = content_backdrop }
125 125 _.NormalUi { fg = ui_normal, bg = ui_backdrop }
126 +_.NormalFloat { bg = _.NormalUi.bg }
127 +_.FloatBorder { fg = ui_accent, bg = _.NormalFloat.bg }
128 +_.FloatTitle { fg = _.FloatBorder.fg, bg = _.FloatBorder.bg, bold = true }
129 +_.EndOfBuffer { bg = _.Normal.bg }
126 130 _.Comment { fg = content_important_global }
127 131 _.NotifyBackground = _.NormalUi
128 -_.LineNr { fg = ui_minor, bg = content_backdrop }
132 +_.LineNr { fg = ui_focus, bg = content_backdrop }
133 +_.LineNrAbove { fg = ui_minor, bg = content_backdrop }
134 +_.LineNrBelow { fg = ui_minor, bg = content_backdrop }
135 +_.FoldColumn = _.LineNrAbove
136 +_.SignColumn = _.LineNrAbove
137 +_.CursorLine { bg = ui_unfocus }
129 138 _.CursorLineNr { fg = ui_focus, bg = ui_backdrop }
139 +_.CursorLineSign = _.CursorLineNr
130 140 _.Search { bg = content_unfocus }
131 141 _.IncSearch { fg = content_focus }
132 142 _.CurSearch { fg = content_important_global, bg = content_unfocus }
133 -_.NormalFloat = _.NormalUi
134 -_.FloatBorder { fg = ui_accent, bg = _.NormalFloat.bg }
135 143 _.ColorColumn { fg = ui_important_global, bg = _.Normal.bg }
136 144 _.Conceal { fg = content_focus, bg = _.Normal.bg }
137 145 _.Cursor { fg = content_backdrop, bg = content_accent }
142 150 _.DiffDelete { fg = content_focus, strikethrough = true }
143 151 _.DiffChange { fg = content_important_global }
144 152 _.DiffText { fg = content_normal, bg = content_unfocus }
145 -_.EndOfBuffer = _.Normal
146 153 -- _.TermCursor = _.Cursor
147 154 -- _.TermCursorNC = _.Cursor
148 155 _.ErrorMsg { fg = error }
149 156 _.VertSplit { fg = ui_important_global }
150 157 _.Folded = _.Conceal
151 -_.FoldColumn = _.LineNr
152 -_.SignColumn = _.LineNr
153 158 _.ModeMsg { bold = true }
154 159 _.MsgArea = _.NormalUi
155 160 _.MsgSeparator = _.NormalUi
156 161 _.MoreMsg = _.NormalUi
157 162 _.NonText { fg = content_unfocus }
158 163 _.Whitespace = _.NonText
159 -_.NormalNC { fg = content_minor, bg = _.Normal.bg }
160 164 _.Pmenu = _.NormalFloat
161 165 _.PmenuSel { fg = ui_important_local, sp = ui_important_local, bg = _.Pmenu.bg, bold = true, underline = true }
162 166 _.PmenuSbar { bg = ui_unfocus }
169 173 _.SpellLocal = _.SpellBad
170 174 _.SpellRare = _.SpellBad
171 175 _.StatusLine = _.NormalUi
172 -_.StatusLineNC { fg = ui_minor, bg = ui_backdrop }
173 -_.Winbar { fg = ui_focus, bg = _.StatusLine.bg }
174 -_.WinbarNC { fg = content_minor, bg = _.Normal.bg }
175 -_.Title { fg = content_important_global, sp = content_important_global, bold = true, underline = true }
176 +_.StatusLineNC { fg = ui_minor, bg = _.StatusLine.bg }
177 +_.WinBar { fg = ui_focus, bg = _.StatusLine.bg }
178 +_.WinBarNC { fg = ui_minor, bg = _.StatusLine.bg }
176 179 _.TabLine = _.StatusLine
177 180 _.TabLineFill = _.StatusLine
178 -_.TabLineSel { fg = ui_important_global, bold = true, underline = true }
181 +_.TabLineSel { fg = ui_important_global, bg = _.TabLine.bg, bold = true, underline = true }
182 +_.Title { fg = content_important_global, sp = content_important_global, bold = true, underline = true }
179 183 _.Visual { bg = content_unfocus }
180 184 _.VisualNOS { bg = ui_unfocus }
181 185 _.WarningMsg { fg = warning, bold = true }
188 192 _.Number = _.String
189 193 _.Boolean = _.String
190 194 _.Float = _.String
191 -_.Identifier { fg = _.Normal.fg }
195 +_.Identifier { fg = _.Normal.fg }
196 +_.Function { fg = _.Normal.fg }
192 197 _.MutableVariable = _.Debug
193 -_.Function = _.Normal
198 +_.Parameter { fg = content_focus }
199 +_.Type { fg = _.Normal.fg }
200 +_.Delimiter { fg = content_minor }
195 202 _.Statement { fg = content_minor }
196 203 _.Conditional = _.Statement
198 205 _.Label = _.Statement
199 206 _.Operator = _.Statement
200 207 _.Keyword = _.Statement
201 -_.Parameter { fg = content_focus }
202 208 _.Exception = _.Statement
209 +_.StorageClass = _.Statement
210 +_.Structure = _.Statement
211 +_.Typedef = _.Statement
204 213 _.PreProc { fg = content_important_global, bold = true }
205 214 _.Include = _.PreProc
207 216 _.Macro = _.PreProc
208 217 _.PreCondit = _.PreProc
210 -_.Type = _.Normal
211 -_.StorageClass = _.Statement
212 -_.Structure = _.Statement
213 -_.Typedef = _.Statement
215 219 _.Special { fg = content_normal, italic = true, bold = true }
216 220 _.SpecialChar = _.Special
217 221 _.Tag = _.Special
218 -_.Delimiter { fg = content_minor }
219 222 _.SpecialComment = _.Special
221 224 _.Underlined { sp = content_normal, underline = true }
222 225 _.Bold { bold = true }
223 226 _.Italic { italic = true }
225 -_.Ignore { fg = _.Normal.bg, bg = _.Normal.bg }
228 +_.Ignore { fg = _.Normal.bg }
227 230 _.Error { fg = error }
228 231 _.Todo { fg = content_important_global, sp = content_important_global, bold = true, underdouble = true }
229 233 _.DiagnosticUnnecessary { fg = ui_focus }
230 234 _.DiagnosticDeprecated { fg = ui_important_global, sp = ui_important_global, strikethrough = true }
231 235 _.DiagnosticError { fg = error }
305 309 _['@debug'] = _.Debug
306 310 _['@tag'] = _.Tag
308 -_['@markup.raw.block'] { bg = content_backdrop }
309 -_['@markup.raw.block.markdown'] { fg = ui_normal }
312 +_['@markup.raw.block'] { fg = content_normal }
313 +_['@markup.raw.block.markdown'] { fg = ui_normal }
310 314 _['@markup.raw.block.vimdoc'] { fg = ui_normal }
312 316 _['@lsp.type.namespace'] = _['@namespace']
325 329 _['@lsp.type.macro'] = _['@macro']
326 330 _['@lsp.type.decorator'] = _['@function']
328 -_.LazyButton = _.NormalFloat
329 -_.LazyButton { sp = _.NormalFloat.fg, bold = true }
330 -_.LazyButtonActive { fg = ui_focus, sp = _.NormalFloat.fg, bg = ui_important_local, bold = true }
331 -_.LazyComment = _.Keyword
332 -_.LazyCommit = _.LazyComment
333 -_.LazyCommitIssue = _.LazyComment
334 -_.LazyCommitScope = _.LazyComment
335 -_.LazyCommitScope { italic = true }
336 -_.LazyCommitType = _.LazyCommitScope
337 -_.LazyDimmed { fg = _.NormalFloat.fg }
338 -_.LazyDir { fg = _.NormalFloat.fg }
339 -_.LazyH1 = _.Bold
340 -_.LazyH2 = _.LazyH1
341 -_.LazyLocal {}
342 -_.LazyNoCond = _.WarningMsg
343 -_.LazyNormal = _.NormalFloat
344 -_.LazyProgressDone { fg = _.Search.bg, bg = _.Cursor.bg, bold = true }
345 -_.LazyProgressTodo { fg = _.LazyProgressDone.bg, bg = _.LazyProgressDone.fg, bold = true }
346 -_.LazyProp = _.LazyComment
347 -_.LazyReasonCmd = _.NormalFloat
348 -_.LazyReasonEvent = _.NormalFloat
349 -_.LazyReasonFt = _.NormalFloat
350 -_.LazyReasonImport = _.NormalFloat
351 -_.LazyReasonKeys = _.NormalFloat
352 -_.LazyReasonPlugin = _.NormalFloat
353 -_.LazyReasonRuntime = _.NormalFloat
354 -_.LazyReasonSource = _.NormalFloat
355 -_.LazyReasonStart = _.NormalFloat
356 -_.LazySpecial { fg = _.ColorColumn.fg }
357 -_.LazyTaskError = _.ErrorMsg
358 -_.LazyTaskOutput = _.Debug
359 -_.LazyUrl { sp = _.NormalFloat.fg, italic = true, underline = true }
360 -_.LazyValue { italic = true }
362 -_.TelescopeSelectionCaret = _.PmenuSel
363 -_.TelescopeSelection = _.PmenuSel
364 -_.TelescopeMultiSelection { fg = content_normal, bg = ui_important_local }
366 -_.FlashBackdrop { fg = ui_normal, bg = ui_backdrop }
367 -_.FlashMatch = _.IncSearch
368 -_.FlashCurrent = _.CurSearch
369 -_.FlashLabel { fg = ui_accent, bg = ui_backdrop }
371 -_.WhichKey { fg = ui_important_global }
372 -_.WhichKeyGroup { fg = ui_important_local }
373 -_.WhichKeySeparator { fg = ui_minor }
374 -_.WhichKeyDesc { fg = ui_normal }
375 -_.WhichKeyFloat = _.NormalFloat
376 -_.WhichKeyBorder = _.FloatBorder
377 -_.WhichKeyValue = _.Comment
379 332 return function ()
380 333 local namespace = 0
381 334 for name, group in pairs( _.groups ) do

neovim/lua/bugabinga/options/behaviour.lua

Modified
1 -local dbg = require 'std.dbg'
2 -local const = require 'std.const'
3 1 local auto = require 'std.auto'
2 +local ignored = require 'std.ignored'
3 +local dbg = require 'std.dbg'
5 --- How many milliseconds must pass before neovim decides I was "idle"
6 -vim.opt.updatetime = 50
7 --- How long to wait between key sequences in order to chain them. e.g. <LEADER>b
8 -vim.opt.timeoutlen = 250
10 --- allow commands like find, grep, ... to search for files recursively
11 -vim.opt.path:append '**'
13 --- wrap line movements, when start/end is reached
14 -vim.opt.whichwrap:append '<'
15 -vim.opt.whichwrap:append '>'
16 -vim.opt.whichwrap:append '['
17 -vim.opt.whichwrap:append ']'
18 -vim.opt.whichwrap:append 'h'
19 -vim.opt.whichwrap:append 'l'
21 --- treat words separated by a dash as one word. used in snail-case-convention
22 -vim.opt.iskeyword:append '-'
24 --- Tabs and Spaces, i like 'em 2 spaces wide
25 --- only insert spaces for tabs if language configuration explicitly declares so
26 -vim.opt.expandtab = false
27 -local tab_size = 2
28 -vim.opt.tabstop = tab_size
29 -vim.opt.shiftwidth = tab_size
30 -vim.opt.softtabstop = tab_size
31 -vim.opt.shiftround = true
32 --- insert whitespace type based on whitespace on previous line
33 -vim.opt.smarttab = true
35 -vim.opt.wrap = false
36 -vim.opt.breakindent = true
38 --- do not keep distance to borders while scrolling
39 -vim.opt.scrolloff = 0
40 -vim.opt.sidescrolloff = 0
42 --- try to guess indentation based on context
43 -vim.opt.smartindent = true
44 --- Keep indentation of new lines in line with previous lines
45 -vim.opt.autoindent = true
46 -vim.opt.copyindent = true
48 --- open splits to the right and below
49 -vim.opt.splitbelow = true
50 -vim.opt.splitright = true
51 -vim.opt.splitkeep = 'screen'
53 --- enable mouse
54 -vim.opt.mouse = 'a'
55 --- disable popup menu on right click
56 -vim.opt.mousemodel = 'extend'
58 -if vim.fn.executable 'nu' then
59 - -- integrate Nushell with nvim
60 - vim.opt.shell = 'nu'
61 - -- flags for nu:
62 - -- * `--stdin` redirect all input to -c
63 - -- * `--no-newline` do not append `\n` to stdout
64 - -- * `--commands` execute a command
65 - vim.opt.shellcmdflag = '--stdin --no-newline --commands'
66 - -- string to be used to put the output of shell commands in a temp file
67 - -- 1. when 'shelltemp' is `true`
68 - -- 2. in the `diff-mode` (`nvim -d file1 file2`) when `diffopt` is set
69 - -- to use an external diff command: `set diffopt-=internal`
70 - vim.opt.shellredir = 'out+err> "%s"'
71 - -- string to be used with `:make` command to:
72 - -- 1. save the stderr of `makeprg` in the temp file which Neovim reads using `errorformat` to populate the `quickfix` buffer
73 - -- 2. show the stdout, stderr on the screen
74 - -- NOTE: `ansi strip` removes all ansi coloring from nushell errors
75 - vim.opt.shellpipe =
76 - '| complete | get stderr stdout | str join (char nl) | ansi strip | tee { save --force --raw "%s" }'
77 - -- WARN: disable the usage of temp files for shell commands
78 - -- because Nu doesn't support `input redirection` which Neovim uses to send buffer content to a command:
79 - -- `{shell_command} < {temp_file_with_selected_buffer_content}`
80 - -- When set to `false` the stdin pipe will be used instead.
81 - -- NOTE: some info about `shelltemp`: https://github.com/neovim/neovim/issues/1008
82 - vim.opt.shelltemp = false
83 - vim.opt.shellxquote = ''
84 - vim.opt.shellxescape = ''
85 - vim.opt.shellquote = ''
86 -end
88 -require 'bugabinga.health'.add_dependency
90 - name = 'Nushell',
91 - name_of_executable = 'nu',
5 +auto 'highlight_yanked_text' {
6 + description = 'briefly highlight yanked text',
7 + events = 'TextYankPost',
8 + pattern = '*',
9 + command = function ()
10 + vim.highlight.on_yank {
11 + higroup = 'TextYankPost',
12 + timeout = 169,
13 + }
14 + end,
94 --- highlight all search matches
95 -vim.opt.hlsearch = true
96 --- enable smart case in searches
97 -vim.opt.ignorecase = true
98 -vim.opt.smartcase = true
99 -vim.opt.incsearch = true
100 -vim.opt.showmatch = true
101 -vim.opt.hidden = true
102 -vim.opt.wildignorecase = true
103 --- Show the effects of substitutions incrementally
104 -vim.opt.inccommand = 'nosplit'
106 -if vim.fn.executable 'rg' then
107 - -- use ripgrep instead of grep
108 - vim.opt.grepprg = 'rg --hidden --vimgrep --no-heading --smart-case -- '
109 - vim.opt.grepformat = '%f:%l:%c:%m'
110 -end
112 -require 'bugabinga.health'.add_dependency
114 - name = 'Ripgrep',
115 - name_of_executable = 'rg',
17 +auto 'disable_columns_in_special_buffers' {
18 + description = 'Hide columns in buffers, that do not show source code.',
19 + events = { 'FileType' },
20 + pattern = ignored.filetypes,
21 + command = function ()
22 + vim.notify 'Hiding columns in buffers without source code'
23 + vim.opt_local.colorcolumn = {}
24 + vim.opt_local.signcolumn = 'no'
25 + vim.opt_local.foldcolumn = '0'
26 + vim.opt_local.number = false
27 + end,
118 --- ask me to force failed commands
119 -vim.opt.confirm = true
121 -if const.wsl then
122 - require 'bugabinga.health'.add_dependency
123 - {
124 - name = 'win32yank',
125 - name_of_executable = 'win32yank.exe',
126 - }
127 - vim.g.clipboard = {
128 - name = 'win32yank-wsl',
129 - copy = {
130 - ['+'] = 'win32yank.exe -i --crlf',
131 - ['*'] = 'win32yank.exe -i --crlf',
132 - },
133 - paste = {
134 - ['+'] = 'win32yank.exe -o --lf',
135 - ['*'] = 'win32yank.exe -o --lf',
136 - },
137 - cache_enabled = true,
138 - }
139 -end
141 30 auto 'handle_usr1_signal' {
142 31 description = 'Reloads the current theme, when USR1 signal is received',
143 32 events = { 'Signal' },
144 33 pattern = 'SIGUSR1',
145 34 command = function ()
146 35 dbg.print 'received signal USR1! Attempting to reload colorscheme.'
148 36 vim.cmd.colorscheme 'nugu'

neovim/lua/bugabinga/options/commands.lua

Modified
1 -local light_up = require 'std.light_up'
2 1 local user_command = require 'std.user_command'
2 +local light_up = require 'std.light_up'
4 4 local light_up_current_buffer = function ()
5 5 local group_names = light_up.get_vim_highlight_groups()

neovim/lua/bugabinga/options/file.lua

Deleted
deleted file mode 100644
1 --- Keep track of file changes outside of vim
2 -vim.opt.autoread = true
4 --- encode files in UTF-8
5 -vim.opt.fileencoding = 'utf-8'
7 --- do not create local backup files
8 -vim.opt.backup = true
9 --- by default backups are created next to the edited file.
10 --- that tends to pollute the workspace.
11 --- instead, backup to the second default directory only.
12 --- neovim should create it if it does not exist.
13 --- the double slash at the end means something important...
14 --- i think it means to use full path as name for backup files to avoid
15 --- collisions.
16 -vim.opt.backupdir = vim.fn.stdpath 'state' .. '/backup//'
18 --- do not make a backup before writing to a file
19 -vim.opt.writebackup = true
21 --- save a swap file after every 100 typed characters.
22 -vim.opt.swapfile = true
23 -vim.opt.updatecount = 100
25 --- enable persistent undo. save undo history across neovim instances
26 -vim.opt.undofile = true
28 -vim.filetype.add {
29 - extension = {
30 - norg = 'norg',
31 - },
32 - pattern = {
33 - ['.*/%.vscode/.*%.json'] = 'json5', -- These json files frequently have comments
34 - README = 'markdown',
35 - TODO = 'markdown',
36 - DEPENDENCIES = 'markdown',
37 - ROADMAP = 'markdown',
38 - },
39 -}

neovim/lua/bugabinga/options/init.lua

Modified
1 --- NEOVIM EDITOR OPTIONS
3 -require 'bugabinga.options.behaviour'
4 -require 'bugabinga.options.ui'
5 -require 'bugabinga.options.file'
6 -require 'bugabinga.options.keymaps'
7 -require 'bugabinga.options.spelling'
8 -require 'bugabinga.options.commands'
1 +local const = require 'std.const'
2 +local icon = require 'std.icon'
10 4 -- disable some runtime providers that i will not use.
11 5 -- keeps checkhealth clean
14 8 vim.g.loaded_ruby_provider = 0
15 9 vim.g.loaded_node_provider = 0
16 10 vim.g.loaded_perl_provider = 0
12 +-- add new filetypes rearly on
13 +require 'bugabinga.options.filetypes'
15 +-- NEOVIM EDITOR OPTIONS
17 +-- Keep track of file changes outside of vim
18 +vim.opt.autoread = true
20 +-- encode files in UTF-8
21 +vim.opt.fileencoding = 'utf-8'
23 +-- do not create local backup files
24 +vim.opt.backup = true
25 +-- by default backups are created next to the edited file.
26 +-- that tends to pollute the workspace.
27 +-- instead, backup to the second default directory only.
28 +-- neovim should create it if it does not exist.
29 +-- the double slash at the end means something important...
30 +-- i think it means to use full path as name for backup files to avoid
31 +-- collisions.
32 +vim.opt.backupdir = vim.fn.stdpath 'state' .. '/backup//'
34 +-- do not make a backup before writing to a file
35 +vim.opt.writebackup = true
37 +-- save a swap file after every 100 typed characters.
38 +vim.opt.swapfile = true
39 +vim.opt.updatecount = 100
41 +-- enable persistent undo. save undo history across neovim instances
42 +vim.opt.undofile = true
44 +-- How many milliseconds must pass before neovim decides I was "idle"
45 +vim.opt.updatetime = 50
46 +-- How long to wait between key sequences in order to chain them. e.g. <LEADER>b
47 +vim.opt.timeoutlen = 250
49 +-- allow commands like find, grep, ... to search for files recursively
50 +vim.opt.path:append '**'
52 +-- wrap line movements, when start/end is reached
53 +vim.opt.whichwrap:append '<'
54 +vim.opt.whichwrap:append '>'
55 +vim.opt.whichwrap:append '['
56 +vim.opt.whichwrap:append ']'
57 +vim.opt.whichwrap:append 'h'
58 +vim.opt.whichwrap:append 'l'
60 +-- treat words separated by a dash as one word. used in snail-case-convention
61 +vim.opt.iskeyword:append '-'
63 +-- Tabs and Spaces, i like 'em 2 spaces wide
64 +-- only insert spaces for tabs if language configuration explicitly declares so
65 +vim.opt.expandtab = false
66 +local tab_size = 2
67 +vim.opt.tabstop = tab_size
68 +vim.opt.shiftwidth = tab_size
69 +vim.opt.softtabstop = tab_size
70 +vim.opt.shiftround = true
71 +-- insert whitespace type based on whitespace on previous line
72 +vim.opt.smarttab = true
74 +vim.opt.wrap = false
75 +-- wrapped lines will continue on indentation
76 +vim.opt.breakindent = true
78 +-- do not keep distance to borders while scrolling
79 +vim.opt.scrolloff = 0
80 +vim.opt.sidescrolloff = 0
82 +-- try to guess indentation based on context
83 +vim.opt.smartindent = true
84 +-- Keep indentation of new lines in line with previous lines
85 +vim.opt.autoindent = true
86 +vim.opt.copyindent = true
88 +-- open splits to the right and below
89 +vim.opt.splitbelow = true
90 +vim.opt.splitright = true
91 +vim.opt.splitkeep = 'screen'
93 +-- enable mouse
94 +vim.opt.mouse = 'a'
95 +-- disable popup menu on right click
96 +vim.opt.mousemodel = 'extend'
98 +-- if vim.fn.executable 'nu' then
99 +-- -- integrate Nushell with nvim
100 +-- vim.opt.shell = 'nu'
101 +-- -- flags for nu:
102 +-- -- * `--stdin` redirect all input to -c
103 +-- -- * `--no-newline` do not append `\n` to stdout
104 +-- -- * `--commands` execute a command
105 +-- vim.opt.shellcmdflag = '--stdin --no-newline --commands'
106 +-- -- string to be used to put the output of shell commands in a temp file
107 +-- -- 1. when 'shelltemp' is `true`
108 +-- -- 2. in the `diff-mode` (`nvim -d file1 file2`) when `diffopt` is set
109 +-- -- to use an external diff command: `set diffopt-=internal`
110 +-- vim.opt.shellredir = 'out+err> "%s"'
111 +-- -- string to be used with `:make` command to:
112 +-- -- 1. save the stderr of `makeprg` in the temp file which Neovim reads using `errorformat` to populate the `quickfix` buffer
113 +-- -- 2. show the stdout, stderr on the screen
114 +-- -- NOTE: `ansi strip` removes all ansi coloring from nushell errors
115 +-- vim.opt.shellpipe =
116 +-- '| complete | get stderr stdout | str join (char nl) | ansi strip | tee { save --force --raw "%s" }'
117 +-- -- WARN: disable the usage of temp files for shell commands
118 +-- -- because Nu doesn't support `input redirection` which Neovim uses to send buffer content to a command:
119 +-- -- `{shell_command} < {temp_file_with_selected_buffer_content}`
120 +-- -- When set to `false` the stdin pipe will be used instead.
121 +-- -- NOTE: some info about `shelltemp`: https://github.com/neovim/neovim/issues/1008
122 +-- vim.opt.shelltemp = false
123 +-- vim.opt.shellxquote = ''
124 +-- vim.opt.shellxescape = ''
125 +-- vim.opt.shellquote = ''
126 +-- end
128 +-- require 'bugabinga.health'.add_dependency
129 +-- {
130 +-- name = 'Nushell',
131 +-- name_of_executable = 'nu',
132 +-- }
134 +-- highlight all search matches
135 +vim.opt.hlsearch = true
136 +-- enable smart case in searches
137 +vim.opt.ignorecase = true
138 +vim.opt.smartcase = true
139 +vim.opt.incsearch = true
140 +vim.opt.showmatch = true
141 +vim.opt.hidden = true
143 +-- Show the effects of substitutions incrementally
144 +vim.opt.inccommand = 'nosplit'
146 +if vim.fn.executable 'rg' then
147 + -- use ripgrep instead of grep
148 + vim.opt.grepprg = 'rg --hidden --vimgrep --no-heading --smart-case -- '
149 + vim.opt.grepformat = '%f:%l:%c:%m'
150 +end
152 +require 'bugabinga.health'.add_dependency
154 + name = 'Ripgrep',
155 + name_of_executable = 'rg',
158 +-- ask me to force failed commands
159 +vim.opt.confirm = true
161 +if const.wsl or const.win32 then
162 + require 'bugabinga.health'.add_dependency
164 + name = 'win32yank',
165 + name_of_executable = 'win32yank.exe',
167 + vim.g.clipboard = {
168 + name = 'win32yank-wsl',
169 + copy = {
170 + ['+'] = 'win32yank.exe -i --crlf',
171 + ['*'] = 'win32yank.exe -i --crlf',
172 + },
173 + paste = {
174 + ['+'] = 'win32yank.exe -o --lf',
175 + ['*'] = 'win32yank.exe -o --lf',
176 + },
177 + cache_enabled = true,
179 +end
181 +-- show trailing whitespace
182 +vim.opt.list = true
183 +vim.opt.listchars = {
184 + -- space = icon.space,
185 + -- eol = icon.eol,
186 + -- tab = icon.tab .. icon.middle_ellipsis,
187 + tab = ' ',
188 + trail = icon.trail,
189 + extends = icon.extends,
190 + precedes = icon.precedes,
191 + nbsp = icon.nbsp,
194 +-- force English messages
195 +vim.cmd [[ language en_US.utf8 ]]
197 +-- keeps title in terminal uptodate
198 +vim.cmd [[ set title ]]
200 +-- do not spam the cmdline with every little input
201 +vim.opt.showcmd = false
203 +-- autocomplete menu in command buffer
204 +vim.opt.wildmode = 'list:longest'
205 +vim.opt.wildignorecase = true
207 +-- virtually break lines on border
209 +-- always display the signcolumn to avoid jitter
210 +vim.opt.signcolumn = 'yes:2'
212 +-- what is a ruler? me?
213 +vim.opt.ruler = false
215 +-- avoid jitter by keeping status area big
216 +vim.opt.laststatus = 3
218 +-- hide weird symbol at end of buffer
219 +vim.opt.fillchars = {
220 + eob = ' ',
221 + lastline = ' ',
222 + diff = '╱',
223 + wbr = ' ',
225 + horiz = '─',
226 + horizup = '┴',
227 + horizdown = '┬',
228 + vert = '│',
229 + vertleft = '┤',
230 + vertright = '├',
231 + verthoriz = '┼',
234 +-- better have no syntax highlighting than regex based, treesitter will take over later
235 +vim.opt.syntax = 'off'
237 +-- hide output of insert completion popup in status
238 +-- vim.opt.shortmess:append 'c'
239 +-- hide vim intro screen
240 +vim.opt.shortmess:append 'I'
241 +-- truncate messages at end
242 +-- vim.opt.shortmess:append 't'
244 +-- show cmd window to prevent jitter UI
245 +vim.opt.cmdheight = 1
247 +-- do not conceal special characters by default. ftplugin can enable this on demand.
248 +vim.opt.conceallevel = 0
250 +-- I do not care for folding
251 +vim.opt.foldenable = false
253 +-- show visual indicators for lines too long
254 +vim.opt.colorcolumn = { '80', '120', '140' }
256 +-- highlight the current line
257 +vim.opt.cursorline = false
259 +-- pop up menu height
260 +vim.opt.pumheight = 10
262 +-- no transparent popups and floating windows
263 +vim.opt.pumblend = 0
264 +vim.opt.winblend = 0
266 +-- use this in various places for consistent border style
267 +vim.g.border_style = 'single'
269 +-- hide the mode indicator in status
270 +vim.opt.showmode = false
272 +-- always show tabs, to avoid jitter UI
273 +vim.opt.showtabline = 2
275 +local is_tty = vim.env.XDG_SESSION_TYPE == 'tty' and vim.env.SSH_TTY == ''
276 +if is_tty then
277 + vim.opt.termguicolors = false
278 + vim.g.nerdfont = false
279 + vim.opt.lazyredraw = true
280 +else
281 + vim.opt.termguicolors = true
282 + vim.g.nerdfont = true
283 + vim.opt.lazyredraw = false
284 +end
286 +-- scroll by screen lines if buffer is wrapped
287 +vim.opt.smoothscroll = true
289 +-- cursor
290 +-- vim.opt.guicursor = 'n-v-c-sm:block-Cursor,i-ci-ve:ver25-blinkon250,r-cr:hor20,o:hor50'
292 +-- font
293 +-- vim.opt.guifont = 'Cousine,Symbols Nerd Font Mono:h15:#e-subpixelantialias:#h-none'
295 +-- neovide only options
296 +if vim.g.neovide then
297 + vim.g.neovide_profiler = false
298 + -- interpret all touch events as scroll events
299 + vim.g.neovide_touch_deadzone = 0.0
300 + -- after this timeout, start a visual selection
301 + vim.g.neovide_underline_stroke_scale = 2.5
302 + vim.g.neovide_touch_drag_timeout = 0.69
303 + vim.g.neovide_padding_top = 8
304 + vim.g.neovide_padding_left = 8
305 + vim.g.neovide_padding_bottom = 0
306 + vim.g.neovide_padding_right = 0
307 + vim.g.neovide_hide_mouse_when_typing = true
308 + vim.g.neovide_refresh_rate_idle = 5
309 + vim.g.neovide_theme = 'auto'
310 + vim.g.experimental_layer_grouping = true
311 +end
313 +require 'bugabinga.options.behaviour'
314 +require 'bugabinga.options.keymaps'
315 +require 'bugabinga.options.spelling'
316 +require 'bugabinga.options.commands'

neovim/lua/bugabinga/options/ui.lua

Deleted
deleted file mode 100644
1 -local dbg = require 'std.dbg'
2 -local icon = require 'std.icon'
3 -local auto = require 'std.auto'
4 -local ignored = require 'std.ignored'
6 -auto 'highlight_yanked_text' {
7 - description = 'briefly highlight yanked text',
8 - events = 'TextYankPost',
9 - pattern = '*',
10 - command = function ()
11 - vim.highlight.on_yank {
12 - higroup = 'TextYankPost',
13 - timeout = 333,
14 - }
15 - end,
18 -auto 'disable_columns_in_special_buffers' {
19 - description = 'Hide columns in buffers, that do not show source code.',
20 - events = { 'FileType' },
21 - pattern = ignored.filetypes,
22 - command = function ()
23 - dbg.print 'Hiding columns in buffers without source code'
24 - vim.opt_local.colorcolumn = {}
25 - vim.opt_local.signcolumn = 'no'
26 - vim.opt_local.foldcolumn = '0'
27 - vim.opt_local.number = false
28 - end,
31 --- show trailing whitespace
32 -vim.opt.list = true
33 -vim.opt.listchars = {
34 - -- space = icon.space,
35 - -- eol = icon.eol,
36 - -- tab = icon.tab .. icon.middle_ellipsis,
37 - tab = ' ',
38 - trail = icon.trail,
39 - extends = icon.extends,
40 - precedes = icon.precedes,
41 - nbsp = icon.nbsp,
44 --- force English messages
45 -vim.cmd [[ language en_US.utf8 ]]
47 --- keeps title in terminal uptodate
48 -vim.cmd [[ set title ]]
50 --- do not spam the cmdline with every little input
51 -vim.opt.showcmd = false
52 -vim.opt.wildmode = 'list:longest'
54 --- virtually break lines on border
56 --- always display the signcolumn to avoid jitter
57 -vim.opt.signcolumn = 'yes:1'
59 --- what is a ruler? me?
60 -vim.opt.ruler = false
62 --- avoid jitter by keeping status area big
63 -vim.opt.laststatus = 3
65 --- hide weird symbol at end of buffer
66 -vim.opt.fillchars = {
67 - eob = ' ',
68 - lastline = ' ',
69 - diff = '╱',
70 - wbr = ' ',
72 - horiz = '─',
73 - horizup = '┴',
74 - horizdown = '┬',
75 - vert = '│',
76 - vertleft = '┤',
77 - vertright = '├',
78 - verthoriz = '┼',
81 --- better have no syntax highlighting than regex based, treesitter will take over later
82 -vim.opt.syntax = 'off'
84 --- hide output of insert completion popup in status
85 --- vim.opt.shortmess:append 'c'
86 --- hide vim intro screen
87 -vim.opt.shortmess:append 'I'
88 --- truncate messages at end
89 --- vim.opt.shortmess:append 't'
91 --- show cmd window to prevent jitter UI
92 -vim.opt.cmdheight = 1
94 --- do not conceal special characters by default. ftplugin can enable this on demand.
95 -vim.opt.conceallevel = 0
97 --- I do not care for folding
98 -vim.opt.foldenable = false
100 --- show visual indicators for lines too long
101 -vim.opt.colorcolumn = { '80', '120', '140' }
103 --- highlight the current line
104 -vim.opt.cursorline = false
106 --- pop up menu height
107 -vim.opt.pumheight = 10
109 --- no transparent popups and floating windows
110 -vim.opt.pumblend = 0
111 -vim.opt.winblend = 0
113 --- use this in various places for consistent border style
114 -vim.g.border_style = 'single'
116 --- hide the mode indicator in status
117 -vim.opt.showmode = false
119 --- always show tabs, to avoid jitter UI
120 -vim.opt.showtabline = 2
122 -local is_tty = os.getenv 'XDG_SESSION_TYPE' == 'tty' and os.getenv 'SSH_TTY' == ''
123 -if is_tty then
124 - vim.opt.termguicolors = false
125 - vim.g.nerdfont = false
126 - vim.opt.lazyredraw = true
127 -else
128 - vim.opt.termguicolors = true
129 - vim.g.nerdfont = true
130 - vim.opt.lazyredraw = false
131 -end
133 --- scroll by screen lines if buffer is wrapped
134 -vim.opt.smoothscroll = true
136 --- cursor
137 --- vim.opt.guicursor = 'n-v-c-sm:block-Cursor,i-ci-ve:ver25-blinkon250,r-cr:hor20,o:hor50'
139 --- font
140 --- vim.opt.guifont = 'Cousine,Symbols Nerd Font Mono:h15:#e-subpixelantialias:#h-none'
142 --- neovide only options
143 -if vim.g.neovide then
144 - vim.g.neovide_profiler = false
145 - -- interpret all touch events as scroll events
146 - vim.g.neovide_touch_deadzone = 0.0
147 - -- after this timeout, start a visual selection
148 - vim.g.neovide_underline_stroke_scale = 2.5
149 - vim.g.neovide_touch_drag_timeout = 0.69
150 - vim.g.neovide_padding_top = 8
151 - vim.g.neovide_padding_left = 8
152 - vim.g.neovide_padding_bottom = 0
153 - vim.g.neovide_padding_right = 0
154 - vim.g.neovide_hide_mouse_when_typing = true
155 - vim.g.neovide_refresh_rate_idle = 5
156 - vim.g.neovide_theme = 'auto'
157 - vim.g.experimental_layer_grouping = true
158 -end

neovim/lua/bugabinga/plugins/bufremove.lua

Deleted
deleted file mode 100644
1 -local map = require 'std.map'
3 -map.normal {
4 - description = 'Delete Buffer',
5 - category = 'buffer',
6 - keys = '<leader>bd',
7 - command = function ()
8 - local delete_buffer = require 'mini.bufremove'.delete
9 - if vim.bo.modified then
10 - local choice = vim.fn.confirm( ('Save changes to %q?'):format( vim.fn.bufname() ), '&Yes\n&No\n&Cancel' )
11 - if choice == 1 then -- Yes
12 - vim.cmd.write()
13 - delete_buffer( 0 )
14 - elseif choice == 2 then -- No
15 - delete_buffer( 0, true )
16 - end
17 - else
18 - delete_buffer( 0 )
19 - end
20 - end,
21 -}
23 -map.normal {
24 - description = 'Delete Buffer (Force)',
25 - category = 'buffer',
26 - keys = '<leader>bD',
27 - command = function () require 'mini.bufremove'.delete( 0, true ) end,
28 -}
30 -return {
31 - 'echasnovski/mini.bufremove',
32 - version = '0.*',
33 -}

neovim/lua/bugabinga/plugins/comment.lua

Deleted
deleted file mode 100644
1 -return {
2 - 'numToStr/Comment.nvim',
3 - version = '0.*',
4 - lazy = false,
5 - opts = {},
6 -}

neovim/lua/bugabinga/plugins/last-place.lua

Deleted
deleted file mode 100644
1 -local ignored = require 'std.ignored'
3 -return {
4 - 'ethanholz/nvim-lastplace',
5 - commit = '0bb6103c506315044872e0f84b1f736c4172bb20',
6 - lazy = false,
7 - opts = {
8 - lastplace_ignore_buftype = ignored.buftypes,
9 - lastplace_ignore_filetype = ignored.filetypes,
10 - lastplace_open_folds = true,
11 - },
12 -}

neovim/lua/bugabinga/plugins/navigation.lua

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

neovim/lua/bugabinga/plugins/nui.lua

Deleted
deleted file mode 100644
1 -return {
2 - 'MunifTanjim/nui.nvim',
3 -}

neovim/lua/bugabinga/plugins/picker.lua

Deleted
deleted file mode 100644
1 -require 'bugabinga.health'.add_dependency
2 -{
3 - name = 'ripgrep',
4 - name_of_executable = 'rg',
5 -}
6 - {
7 - name = 'find-fd',
8 - name_of_executable = 'fd',
9 - }
10 - {
11 - name = 'CMake',
12 - name_of_executable = 'cmake',
13 - }
15 -local map = require 'std.map'
16 -local icon = require 'std.icon'
18 -map.normal {
19 - description = 'Switch to recently used folders',
20 - category = 'navigation',
21 - keys = '<c-p><c-z>',
22 - command = function () require 'telescope'.extensions.zoxide.list() end,
25 -map.normal.visual.terminal {
26 - description = 'Search help files',
27 - category = 'help',
28 - keys = '<F1>',
29 - command = function () require 'telescope.builtin'.help_tags() end,
32 -map.normal {
33 - description = 'Open last search...',
34 - category = 'plugins',
35 - keys = '<c-p>',
36 - command = function () require 'telescope.builtin'.resume() end,
39 -map.normal {
40 - description = 'Open search for all files...',
41 - category = 'search',
42 - keys = '<c-p><c-p>',
43 - command = function () require 'telescope.builtin'.find_files() end,
46 -map.normal {
47 - description = 'Open search for keymaps...',
48 - category = 'search',
49 - keys = '<c-p><c-k>',
50 - command = function () require 'telescope.builtin'.keymaps() end,
53 -map.normal {
54 - description = 'Open search for symbols...',
55 - category = 'search',
56 - keys = '<c-p><c-s>',
57 - command = function () require 'telescope.builtin'.symbols() end,
60 -map.normal {
61 - description = 'Open search for all file contents...',
62 - category = 'search',
63 - keys = '<c-p><c-g>',
64 - command = function () require 'telescope.builtin'.live_grep() end,
67 -map.normal {
68 - description = 'Open undo hisory...',
69 - category = 'undo',
70 - keys = '<c-p><c-u>',
71 - command = function () require 'telescope'.extensions.undo.undo() end,
74 -map.normal {
75 - description = 'Open search for current buffer content...',
76 - category = 'search',
77 - keys = '<c-p><c-/>',
78 - command = function () require 'telescope.builtin'.current_buffer_fuzzy_find() end,
81 -map.normal {
82 - description = 'Open search for buffers...',
83 - category = 'search',
84 - keys = '<c-e>',
85 - command = function () require 'telescope.builtin'.buffers() end,
88 -map.normal {
89 - description = 'Open clipboard history...',
90 - category = 'history',
91 - keys = '<c-p><c-v>',
92 - command = function ()
93 - require 'telescope'.extensions.neoclip.default()
94 - end,
97 -return {
98 - 'nvim-telescope/telescope.nvim',
99 - version = '0.*',
100 - cmd = 'Telescope',
101 - dependencies = {
102 - {
103 - 'nvim-telescope/telescope-fzf-native.nvim',
104 - build =
105 - function ( plugin_spec )
106 - local result
107 - result = vim.system( { 'cmake', '-S.', '-Bbuild', '-DCMAKE_BUILD_TYPE=Release' },
108 - { text = true, cwd = plugin_spec.dir } ):wait()
109 - if result.code ~= 0 then error( result.stderr ) end
110 - result = vim.system( { 'cmake', '--build', 'build', '--config', 'Release' },
111 - { text = true, cwd = plugin_spec.dir } ):wait()
112 - if result.code ~= 0 then error( result.stderr ) end
113 - result = vim.system( { 'cmake', '--install', 'build', '--prefix', 'build' },
114 - { text = true, cwd = plugin_spec.dir } ):wait()
115 - if result.code ~= 0 then error( result.stderr ) end
116 - end,
117 - },
118 - 'nvim-lua/plenary.nvim',
119 - 'nvim-tree/nvim-web-devicons',
120 - 'nvim-telescope/telescope-symbols.nvim',
121 - 'jvgrootveld/telescope-zoxide',
122 - 'AckslD/nvim-neoclip.lua',
123 - 'debugloop/telescope-undo.nvim',
124 - },
125 - config = function ()
126 - local telescope = require 'telescope'
127 - local actions = require 'telescope.actions'
128 - local themes = require 'telescope.themes'
130 - local ivy = themes.get_ivy { layout_config = { preview_width = 0.23 } }
132 - telescope.setup {
133 - defaults = {
134 - prompt_prefix = icon.telescope .. ' ',
135 - selection_caret = icon.arrow_right .. ' ',
136 - file_ignore_patterns = {
137 - '%.git/',
138 - '%.git/',
139 - '%.svn\\',
140 - '%.svn\\',
141 - '%.pdf',
142 - '%.mkv',
143 - '%.mp4',
144 - '%.zip',
145 - '%.spl',
146 - },
147 - mappings = {
148 - i = {
149 - ['<c-j>'] = actions.cycle_history_next,
150 - ['<c-k>'] = actions.cycle_history_prev,
151 - ['<c-n>'] = actions.move_selection_next,
152 - ['<c-p>'] = actions.move_selection_previous,
153 - ['<c-s>'] = actions.file_split,
154 - ['g?'] = actions.which_key,
155 - },
156 - n = { q = actions.close },
157 - },
158 - },
159 - pickers = {
160 - find_files = ivy,
161 - fd = ivy,
162 - keymaps = ivy,
163 - diagnostics = ivy,
164 - symbols = ivy,
165 - live_grep = ivy,
166 - current_buffer_fuzzy_find = ivy,
167 - buffers = ivy,
168 - help_tags = ivy,
169 - },
170 - extensions = {
171 - zoxide = { prompt_title = 'Navigate deez nuts!' },
172 - },
173 - }
175 - require 'neoclip'.setup()
177 - telescope.load_extension 'fzf'
178 - telescope.load_extension 'zoxide'
179 - telescope.load_extension 'neoclip'
180 - telescope.load_extension 'undo'
181 - end,

neovim/lua/bugabinga/plugins/statusbar.lua

Modified
223 - local escape_status = {
224 - condition = function ()
225 - local ok, _ = pcall( require, 'better_escape' )
226 - return ok
227 - end,
228 - provider = function ()
229 - local ok, _ = pcall( require, 'better_escape' )
230 - -- TODO: add to icons
231 - return ok and _.waiting and '󰂸' or ''
232 - end,
233 - }
236 223 local lsp_active = {
237 224 condition = conditions.lsp_attached,
238 225 update = { 'LspAttach', 'LspDetach', 'BufEnter', 'BufLeave' },
451 438 align,
452 439 space,
453 440 space,
454 - escape_status,
455 - space,
456 441 lsp_active,
457 442 space,
458 443 file_encoding,
534 519 return conditions.buffer_matches { buftype = { 'terminal' } }
522 + space,
537 523 file_type,
538 524 space,
539 525 terminal_name,
547 - -- local tabline_buffer_number = {
548 - -- provider = function ( self )
549 - -- return '(' .. tostring( self.bufnr ) .. ')'
550 - -- end,
551 - -- hl = function ( self )
552 - -- if self.is_active then
553 - -- return { fg = utils.get_highlight 'TabLineSel'.fg, }
554 - -- elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then
555 - -- return { fg = utils.get_highlight 'StatusLineNc'.fg, }
556 - -- else
557 - -- return { fg = utils.get_highlight 'TabLine'.fg, }
558 - -- end
559 - -- end,
560 - -- }
562 - -- local tabline_file_name = {
563 - -- provider = function ( self )
564 - -- local name = self.file_name
565 - -- return name == '' and NEW_FILE or vim.fs.normalize( vim.fn.fnamemodify( name, ':t' ) )
566 - -- end,
567 - -- hl = function ( self ) return { bold = self.is_active or self.is_visible, italic = true, } end,
568 - -- }
570 - -- local tabline_file_flags = {
571 - -- {
572 - -- condition = function ( self ) return vim.api.nvim_get_option_value( 'modified', { buf = self.bufnr, } ) end,
573 - -- provider = icon.modified .. ' ',
574 - -- },
575 - -- {
576 - -- condition = function ( self )
577 - -- return not vim.api.nvim_get_option_value( 'modifiable', { buf = self.bufnr, } ) or
578 - -- vim.api.nvim_get_option_value( 'readonly', { buf = self.bufnr, } )
579 - -- end,
580 - -- provider = function ( self )
581 - -- if vim.api.nvim_get_option_value( 'buftype', { buf = self.bufnr, } ) == 'terminal' then
582 - -- return icon.terminal
583 - -- else
584 - -- return icon.lock
585 - -- end
586 - -- end,
587 - -- },
588 - -- hl = 'Bold',
589 - -- }
591 - -- local tabline_file_name_block = {
592 - -- init = function ( self )
593 - -- self.file_name = vim.api.nvim_buf_get_name( self.bufnr )
594 - -- end,
595 - --
596 - -- hl = function ( self )
597 - -- if self.is_active then
598 - -- return 'TabLineSel'
599 - -- elseif not vim.api.nvim_buf_is_loaded( self.bufnr ) then
600 - -- return { fg = utils.get_highlight 'StatusLineNc'.fg, }
601 - -- else
602 - -- return 'TabLine'
603 - -- end
604 - -- end,
605 - --
606 - -- on_click = {
607 - -- callback = function ( _, minwid, _, button )
608 - -- if button == 'm' then --m = middle click
609 - -- vim.schedule( function ()
610 - -- vim.api.nvim_buf_delete( minwid, { force = false, } )
611 - -- vim.cmd.redrawtabline()
612 - -- end )
613 - -- else
614 - -- vim.api.nvim_win_set_buf( 0, minwid )
615 - -- end
616 - -- end,
617 - -- minwid = function ( self ) return self.bufnr end,
618 - -- name = 'heirline_tabline_buffer_callback',
619 - -- },
620 - --
621 - -- file_icon,
622 - -- { provider = ' ', },
623 - -- tabline_file_name,
624 - -- tabline_buffer_number,
625 - -- tabline_file_flags,
626 - -- }
628 - -- local tabline_buffer_block = utils.surround(
629 - -- {
630 - -- ' ' .. icon.slant_left,
631 - -- icon.slant_right .. ' ',
632 - -- },
633 - -- function ( self )
634 - -- if self.is_active then
635 - -- return utils.get_highlight 'TabLine'.bg
636 - -- else
637 - -- return utils.get_highlight 'TabLineFill'.bg
638 - -- end
639 - -- end,
640 - -- { tabline_file_name_block, }
641 - -- )
643 - -- local buffer_line = utils.make_buflist(
644 - -- tabline_buffer_block,
645 - -- { provider = icon.arrow_left .. ' ', hl = 'TabLine', },
646 - -- { provider = ' ' .. icon.arrow_right, hl = 'TabLine', }
647 - -- )
649 533 local tabpage = {
650 534 provider = function ( self )
651 535 return '%' .. self.tabnr .. 'T ' .. self.tabpage .. ' %T'
664 548 utils.make_tablist( tabpage ),
667 - -- local tabline = { buffer_line, tab_pages, }
669 - -- local statuscolumn = {}
671 551 heirline.setup {
672 552 statusline = statuslines,
673 553 winbar = winbars,
674 554 tabline = tab_pages,
675 - -- tabline = tabline,
676 - -- statuscolumn = statuscolumn,
678 556 opts = {
679 557 colors = nugu,

neovim/lua/bugabinga/plugins/surround.lua

Modified
6 6 -- setting key maps for this plugin is pretty intricate.
7 7 -- normally I would set them myself, but in this case not...
8 8 keymaps = {
9 - insert = '<C-g>ms',
10 - insert_line = '<C-g>mS',
9 + insert = '<C-g>s',
10 + insert_line = '<C-g>S',
12 - normal = 'ms',
13 - normal_cur = 'mss',
14 - normal_line = 'mS',
15 - normal_cur_line = 'mSS',
12 + normal = 'sa',
13 + normal_line = 'sA',
14 + normal_cur = 'sa',
15 + normal_cur_line = 'sC',
17 - visual = 'ms',
18 - visual_line = 'mS',
17 + visual = 'sa',
18 + visual_line = 'sA',
20 - delete = 'md',
20 + delete = 'sd',
22 - change = 'mr',
23 - change_line = 'mR',
22 + change = 'sr',
23 + change_line = 'sR',
25 25 surrounds = {
26 26 ['R'] = {

neovim/lua/bugabinga/plugins/whichkey.lua

Deleted
deleted file mode 100644
1 -local ignored = require 'std.ignored'
2 -local icon = require 'std.icon'
3 -local map = require 'std.map'
4 -local dbg = require 'std.dbg'
6 -map.normal {
7 - description = 'Show key maps',
8 - category = 'help',
9 - keys = '<leader>?',
10 - command = function ()
11 - prequire 'which-key'.show { global = false }
12 - end,
13 -}
15 -return {
16 - 'folke/which-key.nvim',
17 - version = '3.*',
18 - event = 'VeryLazy',
19 - opts = {
20 - icons = {
21 - group = icon.group .. ' ',
22 - keys = {
23 - CR = icon.return_key,
24 - Esc = icon.esc_key,
25 - Space = icon.space_key,
26 - Tab = icon.tab_key,
27 - },
28 - },
29 - win = {
30 - border = vim.g.border_style,
31 - wo = {
32 - winblend = vim.o.winblend,
33 - },
34 - },
35 - disable = {
36 - bt = ignored.buftypes,
37 - ft = ignored.filetypes,
38 - },
39 - debug = dbg.get(),
40 - spec = {
41 - { '<leader> ', group = 'fun' },
43 - { '<leader>b', group = 'Buffers' },
44 - { '<leader>f', group = 'Files' },
45 - { '<leader>j', group = 'Join' },
46 - { '<leader>l', group = 'Lsp' },
47 - { '<leader>t', group = 'Toggle' },
48 - { '<leader>v', group = 'Version control' },
49 - { '<leader>z', group = 'laZy' },
50 - },
51 - },
52 -}

neovim/lua/bugabinga/plugins/zen.lua

Deleted
deleted file mode 100644
1 -local map = require 'std.map'
3 -map.normal {
4 - description = 'Enable zen mode',
5 - category = 'ui',
6 - keys = '<leader>tz',
7 - command = function () require 'zen-mode'.toggle() end,
8 -}
10 -return {
11 - 'folke/zen-mode.nvim',
12 - version = '1.*',
13 - cmd = 'ZenMode',
14 - opts = {
15 - plugins = { wezterm = { enabled = true, font = '+2' } },
16 - window = {
17 - width = 0.69,
18 - backdrop = 0.42,
19 - options = {
20 - signcolumn = 'no',
21 - number = false,
22 - relativenumber = false,
23 - cursorline = false,
24 - cursorcolumn = false,
25 - foldcolumn = '0',
26 - list = false,
27 - },
28 - },
29 - },
30 -}

neovim/lua/bugabinga/ui.lua

Deleted
deleted file mode 100644
1 -local NuiPopup = prequire 'nui.popup'
2 -local NuiText = prequire 'nui.text'
3 -local NuiLine = prequire 'nui.line'
5 -local get_nui_popup = function ()
6 - local popup = NuiPopup {
7 - relative = 'editor',
8 - focusable = true,
9 - position = '50%',
10 - enter = true,
11 - size = {
12 - width = '69%',
13 - height = '42%',
14 - },
15 - border = {
16 - style = vim.g.border_style,
17 - },
18 - buf_options = {
19 - modifiable = true,
20 - readonly = false,
21 - },
22 - }
23 - popup:map( 'n', 'q', function () popup:unmount() end, { noremap = true } )
24 - return popup
25 -end
27 -return {
28 - show_tree = function ( tree )
29 - local popup = get_nui_popup()
30 - local bufnr = popup.bufnr
31 - local text = vim.inspect( tree )
33 - local line_number = 1
34 - local namespace = -1
35 - for line in text:gmatch '[^\r\n]+' do
36 - local nui_line = NuiLine()
37 - nui_line:append( NuiText( line, 'NormalFloat' ) )
39 - nui_line:render( bufnr, namespace, line_number )
40 - line_number = line_number + 1
41 - end
43 - popup:mount()
44 - end,
45 -}

neovim/lua/std/ignored.lua

Modified
1 1 -- TODO: add functions to add stuff to lists so that plugins can register these
2 2 -- and they get cleaned up when plugins get removed
3 3 local filetypes = {
4 - 'NvimTree',
5 4 'Outline',
6 - 'TelescopePrompt',
7 - 'TelescopeResults',
8 - 'Trouble',
9 5 'WhichKey',
10 6 '^git.*',
11 - 'copilot-chat',
12 - 'flash_prompt',
13 7 'help',
14 8 'ivy',
15 9 'lazy',
16 - 'noice',
17 10 'notify',
18 11 'nvim-docs-view',
19 12 'oil',
20 13 'qf',
21 - 'spectre_panel',
22 - 'starter',
23 14 'svn',
24 - 'toggleterm',
25 - 'copilot-chat',
28 17 local buftypes = {

neovim/spell/nerd.utf-8.add

Modified
1 -bugabinga
2 -neovim
3 -lua
4 -api
5 -nugu
6 -ftplugin
7 -ai
8 -todo
9 -pandoc
10 -nushell
11 -ltex
12 -nvim
13 -github
14 -vimpreviewpandoc
15 -Shirou
16 -Emiya
17 -KKG
18 -isp
19 -insoft
20 -KKG5
21 -KKG6
22 -lspconfig
23 -neoconf
24 -lsp
25 -autopairs
26 -cterm/!
27 -navic
28 -winbar
29 -resession
30 -configs
31 -BufNewFile
32 -LuaLS
33 -editorconfig
34 -exrc
35 -localrc
36 -signcolumn
37 -togglers
38 -ripgrep
39 -prequire
40 -pcall
41 -args
42 -ipairs
43 -setmetatable
44 -colorscheme
45 -cmdline
46 -treesitter
47 -cmd
48 -popups
49 -neovide
50 -wezterm
51 -fullscreen
52 -checkhealth
53 -pls
54 -stylua
55 -eol
56 -kool
57 -grepprg
58 -makeprg
59 -modulepath
60 -FFI
61 -jdtls
62 -href
63 -DocumentUri
64 -sinnfrei
65 -Asciidoc
66 -AsciidocFX
67 -GraalVM
68 -Validierung
69 -JUnit4
70 -Nullability
71 -EclipseStore
72 -gRPC
73 -UUIDs
74 -FKs
75 -FIXMEs
76 -JSpecify
77 -aerc
78 -yazi
79 -magit
80 -gitu
81 -sk
82 -Bugabinga's
83 -inlyne
84 -mdcat
85 -nuon
86 -LSPs
87 -golang
88 -presenterm
89 -bartib
90 -rbwsearch
91 -Muratori
92 -dorkfile
93 -hx
94 -zellij
95 -difftastic
96 -weechat
97 -tarsnap
98 -mux
99 -icepuma
100 -traefik
101 -tclock
102 -sbyte
103 -httm
104 -handlr
105 -sd
106 -diskonaut
107 -mdsh
108 -ast-grep
109 -JavaDoc
110 -CiaoCiao
111 -EntwicklerQuiz
112 -Toolchain
113 -Rätselantworten
114 -minidlna
115 -systemd
116 -filetype
117 -Libcyber
118 -REPL
119 -Bézier
120 -Tailscale
121 -tailscale
122 -PopOs
123 -Mailinabox
124 -wluma
125 -stylix
126 -nixvim
1 +bugabinga
2 +neovim
3 +lua
4 +api
5 +nugu
6 +ftplugin
7 +ai
8 +todo
9 +pandoc
10 +nushell
11 +ltex
12 +nvim
13 +github
14 +vimpreviewpandoc
15 +Shirou
16 +Emiya
17 +KKG
18 +isp
19 +insoft
20 +KKG5
21 +KKG6
22 +lspconfig
23 +neoconf
24 +lsp
25 +autopairs
26 +cterm/!
27 +navic
28 +winbar
29 +resession
30 +configs
31 +BufNewFile
32 +LuaLS
33 +editorconfig
34 +exrc
35 +localrc
36 +signcolumn
37 +togglers
38 +ripgrep
39 +prequire
40 +pcall
41 +args
42 +ipairs
43 +setmetatable
44 +colorscheme
45 +cmdline
46 +treesitter
47 +cmd
48 +popups
49 +neovide
50 +wezterm
51 +fullscreen
52 +checkhealth
53 +pls
54 +stylua
55 +eol
56 +kool
57 +grepprg
58 +makeprg
59 +modulepath
60 +FFI
61 +jdtls
62 +href
63 +DocumentUri
64 +sinnfrei
65 +Asciidoc
66 +AsciidocFX
67 +GraalVM
68 +Validierung
69 +JUnit4
70 +Nullability
71 +EclipseStore
72 +gRPC
73 +UUIDs
74 +FKs
75 +FIXMEs
76 +JSpecify
77 +aerc
78 +yazi
79 +magit
80 +gitu
81 +sk
82 +Bugabinga's
83 +inlyne
84 +mdcat
85 +nuon
86 +LSPs
87 +golang
88 +presenterm
89 +bartib
90 +rbwsearch
91 +Muratori
92 +dorkfile
93 +hx
94 +zellij
95 +difftastic
96 +weechat
97 +tarsnap
98 +mux
99 +icepuma
100 +traefik
101 +tclock
102 +sbyte
103 +httm
104 +handlr
106 +diskonaut
107 +mdsh
108 +ast-grep
109 +JavaDoc
110 +CiaoCiao
111 +EntwicklerQuiz
112 +Toolchain
113 +Rätselantworten
114 +minidlna
115 +systemd
116 +filetype
117 +Libcyber
118 +REPL
119 +Bézier
120 +Tailscale
121 +tailscale
122 +PopOs
123 +Mailinabox
124 +wluma
125 +stylix
126 +nixvim
127 127 Krylow
128 128 Entwicklerfrühstück
129 129 Prozess

wezterm/bugabinga/status.lua

Modified
34 34 { Text = ' Font ', },
35 35 { Attribute = { Intensity = 'Bold', }, },
36 36 { Text = table.concat( fonts, ', ' ), },
37 - { Text = ' ' },
37 + { Text = ' ', },
38 38 'ResetAttributes',
40 40 local pane_domain = pane:get_domain_name()
42 - local status = { ' ', }
43 - if leader then
44 - table.insert( status, leader )
45 - end
42 + local os_icon = wez.target_triple:find 'windows' and ' ' or ' '
43 + local status = { os_icon, }
46 45 if key_table then
47 46 table.insert( status, key_table )
64 63 window:set_right_status(
65 64 wez.format {
66 - { Foreground = { AnsiColor = 'White' } },
67 - { Text = table.concat( status, DELIMITER) },
68 - 'ResetAttributes',
65 + { Foreground = { AnsiColor = 'White', }, },
66 + { Text = table.concat( status, DELIMITER ), },
67 + 'ResetAttributes',
71 70 window:set_left_status(
72 71 wez.format {
73 - { Foreground = { AnsiColor = 'White' } },
74 - { Text = '  ' },
75 - 'ResetAttributes',
72 + { Foreground = { AnsiColor = 'White', }, },
73 + { Text = '  ', },
74 + 'ResetAttributes',
78 77 end )