1 +local map = require 'std.map'
8 + 'MunifTanjim/nui.nvim',
9 + 'rcarriga/nvim-notify',
13 + -- view = 'cmdline', -- cmdline on cursor
17 + auto_open = { trigger = false },
19 + -- override markdown rendering so that **cmp** and other plugins use **Treesitter**
21 + ['vim.lsp.util.convert_input_to_markdown_lines'] = true,
22 + ['vim.lsp.util.stylize_markdown'] = true,
23 + ['cmp.entry.get_documentation'] = true,
27 + inc_rename = true, -- enables an input dialog for inc-rename.nvim
28 + long_message_to_split = true, -- long messages will be sent to a split
32 + size = { width = 'auto', height = 'auto' },
35 + border = { style = vim.g.border_style },
38 + border = { style = vim.g.border_style },
41 + border = { style = vim.g.border_style },
42 + position = { row = -2, col = 2 },
45 + relative = 'cursor',
46 + position = { row = 0, col = 2 },
47 + size = { width = '42', height = 'auto' },
48 + border = { style = 'solid' },
51 + cmdline_popupmenu = {
52 + relative = 'cursor',
53 + position = { row = 1, col = 0 },
54 + size = { width = '42', height = 'auto' },
55 + border = { style = vim.g.border_style },
61 + filter = { cmdline = '^:%s*!' },
65 + filter = { event = 'msg_show', kind = 'echomsg' },
69 + filter = { event = 'msg_show', kind = 'echo' },
73 + filter = { event = 'msg_show', kind = '', find = 'written' },
77 + filter = { any = { { cmdline = '^:%s*lua%s+' }, { cmdline = '^:%s*lua%s*=%s*' }, { cmdline = '^:%s*=%s*' }, } },
78 + view = 'cmdline_output',
82 + config = function ( _, opts )
83 + local noice = require 'noice'
87 + description = 'Open search for notifications...',
88 + category = 'search',
89 + keys = '<C-n><C-n>',
90 + command = function () noice.cmd 'history' end,
94 + description = 'Redirect Cmdline',
97 + ---@diagnostic disable-next-line: param-type-mismatch
98 + command = function () noice.redirect( vim.fn.getcmdline() ) end,
102 + description = 'Dismiss current notifications',
103 + category = 'notify',
105 + command = function () noice.cmd 'dismiss' end,
108 + local noice_lsp = require 'noice.lsp'
111 + description = 'Scroll up in documentation popup',
114 + command = function ()
115 + if not noice_lsp.scroll( -4 ) then return '<C-f>' end
117 + options = { expr = true },
121 + description = 'Scroll down in documentation popup',
124 + command = function ()
125 + if not noice_lsp.scroll( 4 ) then return '<C-b>' end
127 + options = { expr = true },
132 + 'rcarriga/nvim-notify',
133 + config = function ()
134 + local notify = require 'notify'
135 + local fade = require 'notify.stages.fade' 'bottom_up'
137 + local shadow_fade = function ( ... )
138 + local opts = fade[1]( ... )
140 + opts.border = vim.g.border_style
141 + opts.row = opts.row - 1
146 + ---@diagnostic disable-next-line: missing-fields
148 + stages = { shadow_fade, unpack( fade, 2 ) },
149 + render = 'compact',