finally, hover completion and docs
This commit is contained in:
parent
adf6c73340
commit
b289b608e9
28
config.el
28
config.el
|
@ -131,9 +131,25 @@
|
||||||
(after! lsp-mode
|
(after! lsp-mode
|
||||||
(setq lsp-completion-provider :none)) ;; Disable LSP's completion provider
|
(setq lsp-completion-provider :none)) ;; Disable LSP's completion provider
|
||||||
|
|
||||||
(use-package! corfu
|
(after! corfu
|
||||||
:custom
|
(setq corfu-auto t ;; Enable auto completion
|
||||||
(corfu-auto t) ;; Enable auto completion
|
corfu-auto-delay 0.0 ;; No delay for completion
|
||||||
(corfu-auto-prefix 2) ;; Complete after 2 characters
|
corfu-auto-prefix 1 ;; Complete after 1 character
|
||||||
(corfu-auto-delay 0.0) ;; No delay for completion
|
corfu-preview-current t ;; Preview current candidate
|
||||||
;; (corfu-echo-documentation nil)) ;; Disable documentation in echo area
|
corfu-preselect 'prompt ;; Preselect first item
|
||||||
|
corfu-popupinfo-delay '(0.5 . 0.2)) ;; Show docs after 0.5 sec
|
||||||
|
|
||||||
|
;; VSCode-like keybindings
|
||||||
|
(map! :map corfu-map
|
||||||
|
"C-j" #'corfu-next
|
||||||
|
"C-k" #'corfu-previous
|
||||||
|
"TAB" #'corfu-insert
|
||||||
|
"<escape>" #'corfu-quit)
|
||||||
|
|
||||||
|
(corfu-popupinfo-mode)) ;; Enable popup documentation
|
||||||
|
|
||||||
|
(after! lsp-ui
|
||||||
|
(setq lsp-ui-doc-enable t
|
||||||
|
lsp-ui-doc-show-with-mouse t ;; Show doc on mouse hover
|
||||||
|
lsp-ui-doc-delay 0.2 ;; Delay before showing
|
||||||
|
lsp-ui-doc-position 'at-point)) ;; Show at point instead of sidebar
|
||||||
|
|
Loading…
Reference in New Issue