nvim UI improvements

This commit is contained in:
LordMZTE 2023-05-27 01:26:34 +02:00
parent 3b1c623c9b
commit f74f7b0fd4
Signed by: LordMZTE
GPG key ID: B64802DC33A64FF6
3 changed files with 13 additions and 0 deletions

View file

@ -17,6 +17,14 @@
(jdtls-setup.add_commands)
(jdtls.setup_dap {:hotcodereplace :auto}))
;; Deshittify pick UI
(tset (require :jdtls.ui) :pick_one
(fn [items prompt label-fn]
(let [co (coroutine.running)]
((. (require :jdtls.ui) :pick_one_async) items prompt label-fn
#(coroutine.resume co $1))
(coroutine.yield))))
(let [opts {:cmd [:jdtls :-configuration dirs.config :-data dirs.workspace]
:capabilities caps
:root_dir (jdtls-setup.find_root [:.git

View file

@ -5,5 +5,6 @@
(local mopt (. (require :mzte_nv) :utils :map_opt))
(vim.keymap.set :n :ma mark.toggle_file mopt)
(vim.keymap.set :n :mc mark.clear_all mopt)
(vim.keymap.set :n :mn ui.nav_next mopt)
(vim.keymap.set :n :mp ui.nav_prev mopt)

View file

@ -6,6 +6,10 @@
(noice.setup {:messages {:view :mini}
:lsp {:override (collect [_ o (ipairs overrides)] (values o true))}
:routes [;; Redirect DAP messages to mini view
{:filter {:event :notify
:cond #(and $1.opts (= $.opts.title :DAP))}
:view :mini}]
:presets {:lsp_doc_border true}})
;; Shift-Enter to redirect cmdline