tools/lsp: lazy load <leader> c l keybind
Fixes a issue where folks would try to rebind <leader> c, only to get a non-prefix key error about <leader> c l.
This commit is contained in:
parent
362f101227
commit
841eacc77d
4 changed files with 51 additions and 39 deletions
20
modules/config/default/autoload/deferred.el
Normal file
20
modules/config/default/autoload/deferred.el
Normal file
|
@ -0,0 +1,20 @@
|
|||
;;; config/default/autoload/deferred.el -*- lexical-binding: t; -*-
|
||||
|
||||
;; TODO generalize this
|
||||
;;;###autoload
|
||||
(defun +default/lsp-command-map ()
|
||||
"Lazily invoke `lsp-command-map'."
|
||||
(interactive)
|
||||
(require 'lsp-mode)
|
||||
(map! :leader "c l" lsp-command-map)
|
||||
(dolist (leader-key (list doom-leader-key doom-leader-alt-key))
|
||||
(let ((lsp-keymap-prefix (concat leader-key " c l")))
|
||||
(lsp-enable-which-key-integration)))
|
||||
(setq prefix-arg current-prefix-arg
|
||||
unread-command-events
|
||||
(mapcar (lambda (e) (cons t e))
|
||||
(vconcat (when evil-this-operator
|
||||
(where-is-internal evil-this-operator
|
||||
evil-normal-state-map
|
||||
t))
|
||||
(this-command-keys)))))
|
Loading…
Add table
Add a link
Reference in a new issue