mirror of
https://mzte.de/git/LordMZTE/dotfiles.git
synced 2024-12-13 02:02:57 +01:00
nvim UI improvements
This commit is contained in:
parent
3b1c623c9b
commit
f74f7b0fd4
3 changed files with 13 additions and 0 deletions
|
@ -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
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue