repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

neovim: adds some fun and incubating plugins

d77e0642bd240a4d35993e7cc1cd7fea2b9c5d8b

Oliver Jan Krylow <oliver@bugabinga.net> ·

unsigned

Browse filesCompare with HEAD

Changed files (8)

neovim/init.lua

Modified
21 21 -- setup debug mode
22 -vim.g.bugabinga_debug_mode = false
22 +vim.g.bugabinga_debug_mode = true
23 23 -- start `profiler.nvim` with `NVIM_PROFILE=1 nvim ...` to instrument all modules,
24 24 -- but not start profiler yet.
25 25 -- or `NVIM_PROFILE=start nvim ...` to start the profiler on startup
74 74 require 'bugabinga.notifications'
75 75 require 'bugabinga.patterns'
76 76 require 'bugabinga.search_and_replace'
77 -require 'bugabinga.specs'
77 +require 'bugabinga.fun'
78 78 require 'bugabinga.splitjoin'
79 79 require 'bugabinga.surround'
80 80 require 'bugabinga.terminal'

neovim/lsp/lua_ls.lua

Modified
14 14 on_init = function(client)
15 15 if client.workspace_folders then
16 - local path = normalize(realpath(client.workspace_folders[1].name))
16 + local root = client.workspace_folders[1].name
17 + local path = normalize(realpath(root))
17 18 local config_path = normalize(realpath(vim.fn.stdpath('config')))
18 19 if path ~= config_path then
19 20 return

neovim/lua/bugabinga/colorizer.lua

Modified
1 1 local puk = require 'std.puk'
2 -puk.defer 'nvim-highlight-colors' (function( colors )
2 +puk.defer 'colorizer' (function( colors )
3 3 colors.setup {
4 - render = 'virtual',
4 + lazy_load = true,
5 + user_default_options = {
6 + mode = 'virtualtext',
7 + -- virtualtext_inline = true,
8 + css = true,
9 + xterm = true,
10 + names_custom = function()
11 + return require 'bugabinga.nugu.palette'
12 + end,
13 + }
6 15 end)

neovim/lua/bugabinga/fun.lua

Added
new file mode 100644
1 +local puk = require 'std.puk'
2 +local map = require 'std.map'
3 +local ignored = require 'std.ignored'
5 +map.normal {
6 + description = 'Find cursor!',
7 + category = 'fun',
8 + keys = '<leader><leader>',
9 + command = function() require 'specs'.show_specs() end,
12 +map.normal {
13 + description = 'Find cursor, for real!',
14 + category = 'fun',
15 + keys = '<leader><leader><leader>',
16 + command = function()
17 + require 'specs'.show_specs { width = 69, delay_ms = 69, inc_ms = 42 }
18 + end,
21 +puk.defer 'specs' (function(specs)
22 + specs.setup {
23 + show_jumps = true,
24 + min_jump = 10,
25 + popup = {
26 + delay_ms = 10, -- delay before popup displays
27 + inc_ms = 10, -- time increments used for fade/resize effects
28 + blend = 10, -- starting blend, between 0-100 (fully transparent), see :h winblend
29 + width = 10,
30 + winhl = 'Cursor',
31 + fader = specs.exp_fader,
32 + resizer = specs.shrink_resizer,
33 + },
34 + ignore_filetypes = ignored.filetypes_kv,
35 + ignore_buftypes = ignored.buftypes_kv,
36 + }
37 +end)
39 +puk.defer 'smear_cursor' (function(smear)
40 + smear.setup {
41 + stiffness = 0.8, -- 0.6 [0, 1]
42 + trailing_stiffness = 0.5, -- 0.4 [0, 1]
43 + stiffness_insert_mode = 0.7, -- 0.5 [0, 1]
44 + trailing_stiffness_insert_mode = 0.7, -- 0.5 [0, 1]
45 + damping = 0.8, -- 0.65 [0, 1]
46 + damping_insert_mode = 0.8, -- 0.7 [0, 1]
47 + distance_stop_animating = 0.5, -- 0.1 > 0
48 + }
49 +end)

neovim/lua/bugabinga/incubator.lua

Modified
15 15 --- cannot navigate with C-w inside the DocsView
16 16 --- it has a manual update mode, but which key to bind it to?
17 17 puk.defer 'docs-view' (function(docsview)
18 - docsview.setup {
19 - position = 'top',
20 - width = 42,
21 - }
22 - map.normal {
23 - description = 'Toggle stable documentation panel.',
24 - keys = '<leader>tk',
25 - command = '<cmd>DocsViewToggle<cr>',
26 - }
18 + docsview.setup {
19 + position = 'top',
20 + width = 42,
21 + }
22 + map.normal {
23 + description = 'Toggle stable documentation panel.',
24 + keys = '<leader>tk',
25 + command = '<cmd>DocsViewToggle<cr>',
26 + }
28 28 -------------------------------------------------------------------------------
29 29 puk.defer 'rulebook' (function(rulebook)
30 - rulebook.setup()
31 - map.normal {
32 - description = 'ignore rule',
33 - category = 'lint',
34 - keys = '<leader>ri',
35 - command = rulebook.ignoreRule,
36 - }
37 - map.normal {
38 - description = 'lookup rule',
39 - category = 'lint',
40 - keys = '<leader>rl',
41 - command = rulebook.lookupRule,
42 - }
43 - map.normal {
44 - description = 'yank diagnostic code',
45 - category = 'lint',
46 - keys = '<leader>ry',
47 - command = rulebook.yankDiagnosticCode,
48 - }
49 - map.normal {
50 - description = 'supress formatter',
51 - category = 'lint',
52 - keys = '<leader>rf',
53 - command = rulebook.suppressFormatter,
54 - }
30 + rulebook.setup()
31 + map.normal {
32 + description = 'ignore rule',
33 + category = 'lint',
34 + keys = '<leader>ri',
35 + command = rulebook.ignoreRule,
36 + }
37 + map.normal {
38 + description = 'lookup rule',
39 + category = 'lint',
40 + keys = '<leader>rl',
41 + command = rulebook.lookupRule,
42 + }
43 + map.normal {
44 + description = 'yank diagnostic code',
45 + category = 'lint',
46 + keys = '<leader>ry',
47 + command = rulebook.yankDiagnosticCode,
48 + }
49 + map.normal {
50 + description = 'supress formatter',
51 + category = 'lint',
52 + keys = '<leader>rf',
53 + command = rulebook.suppressFormatter,
54 + }
56 56 -------------------------------------------------------------------------------
57 57 --- this plugin has some sick visual text formatting chops. check them out some time.
58 58 puk.defer 'symbol-usage' (function(symbolusage)
59 - symbolusage.setup {
60 - hi = { link = 'LineNr' },
61 - vt_position = 'end_of_line',
62 - request_pending_text = false,
63 - disable = {
64 - filetypes = ignored.filetypes,
65 - },
66 - log = { enabled = dbg.get() },
67 - }
59 + symbolusage.setup {
60 + hi = { link = 'LineNr' },
61 + vt_position = 'end_of_line',
62 + request_pending_text = false,
63 + disable = {
64 + filetypes = ignored.filetypes,
65 + },
66 + log = { enabled = dbg.get() },
67 + }
69 69 -------------------------------------------------------------------------------
70 70 --- Pretty NICE!
71 71 --- fix highlights to match nugu.
72 72 puk.defer 'glance' (function(glance)
73 - glance.setup()
74 - map.normal {
75 - description = 'peek definitions',
76 - category = 'lsp',
77 - keys = 'grpd',
78 - command = '<cmd>Glance definitions<cr>',
79 - }
80 - map.normal {
81 - description = 'Peek references',
82 - category = 'lsp',
83 - keys = 'grpr',
84 - command = '<cmd>Glance references<cr>',
85 - }
86 - map.normal {
87 - description = 'Peek type definitions',
88 - category = 'lsp',
89 - keys = 'grpt',
90 - command = '<cmd>Glance type_definitions<cr>',
91 - }
92 - map.normal {
93 - description = 'Peek implementations',
94 - keys = 'grpi',
95 - command = '<cmd>Glance implementations<cr>',
96 - }
73 + glance.setup()
74 + map.normal {
75 + description = 'peek definitions',
76 + category = 'lsp',
77 + keys = 'grpd',
78 + command = '<cmd>Glance definitions<cr>',
79 + }
80 + map.normal {
81 + description = 'Peek references',
82 + category = 'lsp',
83 + keys = 'grpr',
84 + command = '<cmd>Glance references<cr>',
85 + }
86 + map.normal {
87 + description = 'Peek type definitions',
88 + category = 'lsp',
89 + keys = 'grpt',
90 + command = '<cmd>Glance type_definitions<cr>',
91 + }
92 + map.normal {
93 + description = 'Peek implementations',
94 + keys = 'grpi',
95 + command = '<cmd>Glance implementations<cr>',
96 + }
98 98 -------------------------------------------------------------------------------
99 99 puk.defer 'tiny-inline-diagnostic' (function(tiny)
100 - tiny.setup {
101 - options = {
102 - -- Show the source of the diagnostic.
103 - show_source = true,
100 + tiny.setup {
101 + options = {
102 + -- Show the source of the diagnostic.
103 + show_source = true,
105 - -- Use your defined signs in the diagnostic config table.
106 - use_icons_from_diagnostic = true,
107 - },
108 - }
105 + -- Use your defined signs in the diagnostic config table.
106 + use_icons_from_diagnostic = true,
107 + },
110 110 -------------------------------------------------------------------------------
111 111 puk.defer 'nvim-autopairs' (function(autopairs)
112 - autopairs.setup {
113 - disable_filetype = ignored.filetypes,
114 - disable_in_visualblock = true,
115 - check_ts = true,
116 - }
112 + autopairs.setup {
113 + disable_filetype = ignored.filetypes,
114 + disable_in_visualblock = true,
115 + check_ts = true,
118 118 -------------------------------------------------------------------------------
119 119 puk.defer 'arrow' (function(arrow)
120 - arrow.setup {
121 - show_icons = true,
122 - leader_key = ';',
123 - buffer_leader_key = 'm',
124 - }
120 + arrow.setup {
121 + show_icons = true,
122 + leader_key = ';',
123 + buffer_leader_key = 'm',
126 126 -------------------------------------------------------------------------------
127 127 puk.defer 'hlchunk' (function(hlchunk)
128 - hlchunk.setup {
129 - chunk = {
130 - enable = true
131 - },
132 - }
128 + hlchunk.setup {
129 + chunk = {
130 + enable = true
131 + },
134 134 -------------------------------------------------------------------------------
135 135 puk.defer 'image' (function(image)
136 - image.setup {
137 - backend = 'kitty',
138 - processor = 'magick_cli',
139 - window_overlap_clear_ft_ignore = ignored.filetypes,
140 - integrations = {
141 - markdown = {
142 - clear_in_insert_mode = true,
143 - only_render_image_at_cursor = true,
144 - },
145 - },
146 - editor_only_render_when_focused = true,
147 - }
136 + image.setup {
137 + backend = 'kitty',
138 + processor = 'magick_cli',
139 + window_overlap_clear_ft_ignore = ignored.filetypes,
140 + integrations = {
141 + markdown = {
142 + clear_in_insert_mode = true,
143 + only_render_image_at_cursor = true,
144 + },
145 + },
146 + editor_only_render_when_focused = true,
149 149 -------------------------------------------------------------------------------
150 150 puk.defer 'diagram' (function(diagram)
151 - diagram.setup {}
151 + diagram.setup {}
152 +end)
153 +-------------------------------------------------------------------------------
154 +puk.defer 'output_panel' (function(output_panel)
155 + output_panel.setup {
156 + max_buffer_size = 10000,
158 + map.normal {
159 + description = "Toggle Output Panel",
160 + category = 'lsp',
161 + keys = '<leader>tp',
162 + command = vim.cmd.OutputPanel,
153 165 -------------------------------------------------------------------------------

neovim/lua/bugabinga/specs.lua

Deleted
deleted file mode 100644
1 -local puk = require 'std.puk'
2 -local map = require 'std.map'
3 -local ignored = require 'std.ignored'
5 -map.normal {
6 - description = 'Find cursor!',
7 - category = 'fun',
8 - keys = '<leader><leader>',
9 - command = function () require 'specs'.show_specs() end,
10 -}
12 -map.normal {
13 - description = 'Find cursor, for real!',
14 - category = 'fun',
15 - keys = '<leader><leader><leader>',
16 - command = function ()
17 - require 'specs'.show_specs { width = 69, delay_ms = 69, inc_ms = 42 }
18 - end,
19 -}
21 -puk.defer 'specs' (function(specs)
22 - specs.setup {
23 - show_jumps = true,
24 - min_jump = 10,
25 - popup = {
26 - delay_ms = 10, -- delay before popup displays
27 - inc_ms = 10, -- time increments used for fade/resize effects
28 - blend = 10, -- starting blend, between 0-100 (fully transparent), see :h winblend
29 - width = 10,
30 - winhl = 'Cursor',
31 - fader = specs.exp_fader,
32 - resizer = specs.shrink_resizer,
33 - },
34 - ignore_filetypes = ignored.filetypes_kv,
35 - ignore_buftypes = ignored.buftypes_kv,
36 - }
37 -end)

neovim/lua/std/ignored.lua

Modified
23 23 'oil',
24 24 'oil_progress',
25 25 'oil_preview',
26 + 'outputpanel',
26 27 'qf',
27 28 'netrw',
28 29 'svn',

neovim/puk.plugins.nuon

Modified
179 - nvim-highlight-colors,
179 + colorizer,
180 180 github,
181 - "brenoprata10/nvim-highlight-colors",
182 - main,
183 - "b42a5ccec7457b44e89f7ed3b3afb1b375bb2093",
181 + 'catgoose/nvim-colorizer.lua'
182 + master,
183 + '16597180b4dd81fa3d23d88c4d2f1b49154f9479',
311 311 "0fd2d5a27504dba7fdc507a53275f22c081fe640",
313 + ],
315 + output_panel,
316 + github,
317 + "mhanberg/output-panel.nvim",
318 + main,
319 + "c6c962882bf107e997f39956702f97a4000820ed",
320 + null
321 + ],
323 + smear_cursor,
324 + github,
325 + 'sphamba/smear-cursor.nvim',
326 + main,
327 + "1a3df9af4ed017fafecd93c6837956914f269472",
328 + null