add borders to floating lsp windows in neovim

pull/2/head
Alpha Chen 2 years ago
parent 4e9e4bd084
commit 4cf5cb74d0

@ -101,6 +101,12 @@
;; (vim.lsp.set_log_level :debug) ;; (vim.lsp.set_log_level :debug)
;; default hover windows to have borders
(let [{: handlers : with} vim.lsp
{: hover} handlers]
(tset handlers :textDocument/hover (with hover {:border :rounded}))
(tset handlers :textDocument/signatureHelp (with hover {:border :rounded})))
(let [opts {:noremap true :silent true}] (let [opts {:noremap true :silent true}]
(vim.keymap.set :n :<leader>e vim.diagnostic.open_float opts) (vim.keymap.set :n :<leader>e vim.diagnostic.open_float opts)
(vim.keymap.set :n "[d" vim.diagnostic.goto_prev opts) (vim.keymap.set :n "[d" vim.diagnostic.goto_prev opts)
@ -142,9 +148,9 @@
((. rust_analyzer :setup) {:on_attach on-attach ((. rust_analyzer :setup) {:on_attach on-attach
:settings {:rust-analyzer {:checkOnSave {:command :clippy}}}}) :settings {:rust-analyzer {:checkOnSave {:command :clippy}}}})
((. tsserver :setup) {:on_attach (fn [client bufnr] ((. tsserver :setup) {:on_attach (fn [client bufnr]
(on-attach client bufnr) (on-attach client bufnr)
(set client.resolved_capabilities.document_formatting (set client.resolved_capabilities.document_formatting
false))})) false))}))
;;; netrw ;;; netrw

Loading…
Cancel
Save