Reorganize define-keys

This commit is contained in:
outfoxxed 2023-08-13 16:56:15 -07:00
parent 82cd5dd3cc
commit 3487b21ceb
Signed by: outfoxxed
GPG key ID: 4C88A185FB89301E

16
init.el
View file

@ -275,7 +275,14 @@
:config
(add-hook 'lsp-mode-hook #'lsp-enable-which-key-integration)
(add-hook 'evil-insert-state-entry-hook #'lsp-signature-activate)
(add-hook 'evil-insert-state-exit-hook #'lsp-signature-stop))
(add-hook 'evil-insert-state-exit-hook #'lsp-signature-stop)
(define-key evil-normal-state-map (kbd "SPC l r") #'lsp-rename)
(define-key evil-normal-state-map (kbd "SPC l a") #'lsp-execute-code-action)
(define-key evil-normal-state-map (kbd "SPC l = =") #'lsp-format-buffer)
(define-key evil-normal-state-map (kbd "SPC l = r") #'lsp-format-region)
(define-key evil-normal-state-map (kbd "SPC l s q") #'lsp-workspace-shutdown)
(define-key evil-normal-state-map (kbd "SPC l s r") #'lsp-workspace-restart)
(define-key evil-normal-state-map (kbd "SPC l d") #'lsp-describe-thing-at-point))
(use-package lsp-ui
:after lsp-mode
@ -287,13 +294,6 @@
(define-key lsp-ui-mode-map [remap xref-find-references] #'lsp-ui-peek-find-references)
(define-key evil-normal-state-map (kbd "SPC l d") #'lsp-ui-peek-find-definitions)
(define-key evil-normal-state-map (kbd "SPC l u") #'lsp-ui-peek-find-references)
(define-key evil-normal-state-map (kbd "SPC l r") #'lsp-rename)
(define-key evil-normal-state-map (kbd "SPC l a") #'lsp-execute-code-action)
(define-key evil-normal-state-map (kbd "SPC l = =") #'lsp-format-buffer)
(define-key evil-normal-state-map (kbd "SPC l = r") #'lsp-format-region)
(define-key evil-normal-state-map (kbd "SPC l s q") #'lsp-workspace-shutdown)
(define-key evil-normal-state-map (kbd "SPC l s r") #'lsp-workspace-restart)
(define-key evil-normal-state-map (kbd "SPC d") #'lsp-describe-thing-at-point)
;; Controls inside references popup
(define-key lsp-ui-peek-mode-map (kbd "j") #'lsp-ui-peek--select-next)
(define-key lsp-ui-peek-mode-map (kbd "k") #'lsp-ui-peek--select-prev)