2023-05-27 22:57:31 +02:00
|
|
|
(local (mztenv noice) (values (require :mzte_nv) (require :noice)))
|
2023-02-19 21:23:55 +01:00
|
|
|
|
|
|
|
(local overrides [:vim.lsp.util.convert_input_to_markdown_lines
|
|
|
|
:vim.lsp.util.stylize_markdown
|
|
|
|
:cmp.entry.get_documentation])
|
|
|
|
|
2023-05-27 22:57:31 +02:00
|
|
|
(fn show-mini? [notif]
|
2023-05-27 23:05:21 +02:00
|
|
|
(or ;; INFO level
|
|
|
|
(= notif.level :info) (and notif.opts notif.opts.mzte_nv_mini)))
|
2023-05-27 22:57:31 +02:00
|
|
|
|
2023-06-16 19:16:17 +02:00
|
|
|
(noice.setup {:cmdline {:format {:fnl {:pattern "^:%s*Fnl%s+"
|
|
|
|
:icon "🌜"
|
|
|
|
:lang :fennel
|
|
|
|
:title :Fennel}}}
|
|
|
|
:messages {:view :mini}
|
2023-05-14 19:14:25 +02:00
|
|
|
:lsp {:override (collect [_ o (ipairs overrides)] (values o true))}
|
2023-05-27 01:26:34 +02:00
|
|
|
:routes [;; Redirect DAP messages to mini view
|
2023-05-27 22:57:31 +02:00
|
|
|
{:filter {:event :notify :cond show-mini?} :view :mini}]
|
2023-05-14 19:14:25 +02:00
|
|
|
:presets {:lsp_doc_border true}})
|
2023-05-26 00:39:16 +02:00
|
|
|
|
|
|
|
;; Shift-Enter to redirect cmdline
|
|
|
|
(vim.keymap.set :c :<S-Enter> #(noice.redirect (vim.fn.getcmdline))
|
|
|
|
{:desc "Redirect Cmdline"})
|