repositories / dotfiles

dotfiles

bugabingas dorkfiles

owned by bugabinga

adds useful mini.nvim plugins

8217481b3923ab78904575a7b630a50b6371fc74

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

unsigned

Browse filesCompare with HEAD

Changed files (7)

+128 / −0 text lines

Diff layout

neovim/lua/bugabinga/options/filetypes.lua

Added
new file mode 100644

+12 / −0 text lines

1vim.filetype.add {
2 extension = {
3 norg = 'norg',
4 },
5 pattern = {
6 ['.*/%.vscode/.*%.json'] = 'json5', -- These json files frequently have comments
7 README = 'markdown',
8 TODO = 'markdown',
9 DEPENDENCIES = 'markdown',
10 ROADMAP = 'markdown',
11 },
12}

neovim/lua/bugabinga/plugins/cursorword.lua

Added
new file mode 100644

+62 / −0 text lines

1local table = require 'std.table'
2local auto = require 'std.auto'
3
4return {
5 'echasnovski/mini.cursorword',
6 version = '0.*',
7 event = 'VeryLazy',
8 opts = {
9 delay = 4242,
10 },
11 config = function ( _, opts )
12 local cursorword_blocklist = function ()
13 local curword = vim.fn.expand '<cword>'
14 local filetype = vim.bo.filetype
16 -- Add any disabling global or filetype-specific logic here
17 local blocklist = {
18 '_',
19 'if',
20 'else',
21 'switch',
22 'case',
23 'return',
24 'true', 'false',
25 }
26 if filetype == 'lua' then
27 table.join( blocklist, {
28 'local',
29 'require',
30 'prequire',
31 'then',
32 'end',
33 'elseif',
34 } )
35 elseif filetype == 'java' then
36 table.join( blocklist, {
37 'import',
38 'class',
39 'final',
40 'interface',
41 'record',
42 'abstract',
43 'static',
44 'public',
45 'private',
46 } )
47 end
49 vim.b.minicursorword_disable = vim.tbl_contains( blocklist, curword )
50 end
52 -- Make sure to add this autocommand *before* calling module's `setup()`.
53 auto 'mini_cursorword_blocklist_update' {
54 description = 'Disable Cursorword for certein words.',
55 events = 'CursorMoved',
56 pattern = '*',
57 command = cursorword_blocklist,
58 }
59 prequire 'mini.cursorword'.setup( opts )
60 vim.api.nvim_set_hl( 0, 'MiniCursorwordCurrent', { reverse = true } )
61 end,
62}

neovim/lua/bugabinga/plugins/diff.lua

Added
new file mode 100644

+6 / −0 text lines

1return {
2 'echasnovski/mini.diff',
3 version = '0.*',
4 event = 'VeryLazy',
5 opts = {},
6}

neovim/lua/bugabinga/plugins/jump2d.lua

Added
new file mode 100644

+6 / −0 text lines

1return {
2 'echasnovski/mini.jump2d',
3 version = '0.*',
4 event = 'VeryLazy',
5 opts = {},
6}

neovim/lua/bugabinga/plugins/misc.lua

Added
new file mode 100644

+14 / −0 text lines

1local ignored = require 'std.ignored'
2
3return {
4 'echasnovski/mini.misc',
5 version = '0.*',
6 lazy = false,
7 opts = { make_global = {} },
8 config = function ( _, opts )
9 local misc = require 'mini.misc'
10 misc.setup( opts )
11 -- misc.setup_termbg_sync()
12 misc.setup_restore_cursor { ignore_filetype = ignored.filetypes }
13 end,
14}

neovim/lua/bugabinga/plugins/notifications.lua

Added
new file mode 100644

+22 / −0 text lines

1return {
2 'j-hui/fidget.nvim',
3 version = 'v1.*',
4 lazy = false,
5 opts = {
6 -- Options related to LSP progress subsystem
7 progress = {
8 suppress_on_insert = true, -- Suppress new messages while in insert mode
9 },
11 -- Options related to notification subsystem
12 notification = {
13 override_vim_notify = true, -- Automatically override vim.notify() with Fidget
15 -- Options related to the notification window and buffer
16 window = {
17 winblend = vim.o.winblend, -- Background color opacity in the notification window
18 border = vim.g.border_style, -- Border around the notification window
19 },
20 },
21 },
22}

neovim/lua/bugabinga/plugins/operators.lua

Added
new file mode 100644

+6 / −0 text lines

1return {
2 'echasnovski/mini.operators',
3 version = '0.*',
4 event = 'VeryLazy',
5 opts = {},
6}