mirror of https://github.com/Flinner/dots.git
feat: utilize `lsp-ui` and `lsp-ui-peek`
This commit is contained in:
parent
3bcffbbfc1
commit
16b557435e
|
@ -520,8 +520,10 @@ Capture
|
||||||
"cl" '(lsp-avy-lens :which-key "Code Action")
|
"cl" '(lsp-avy-lens :which-key "Code Action")
|
||||||
"ci" '(lsp-ui-imenu :which-key "lsp imenu")
|
"ci" '(lsp-ui-imenu :which-key "lsp imenu")
|
||||||
"cr" '(lsp-rename :which-key "rename")
|
"cr" '(lsp-rename :which-key "rename")
|
||||||
"cs" '(lsp-find-refernces :which-key "find refernces")
|
;"cs" '(lsp-find-refernces :which-key "find refernces")
|
||||||
"cd" '(lsp-find-definition :which-key "goto defintion")
|
;"cd" '(lsp-find-definition :which-key "goto defintion")
|
||||||
|
"cd" '(lsp-ui-peek-find-definitions :which-key "goto defintion")
|
||||||
|
"cs" '(lsp-ui-peek-find-refernces :which-key "find refernces")
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
**** Git (g)
|
**** Git (g)
|
||||||
|
@ -600,7 +602,7 @@ Capture
|
||||||
(define-key evil-insert-state-map "\C-y" 'yank)
|
(define-key evil-insert-state-map "\C-y" 'yank)
|
||||||
(define-key evil-visual-state-map "\C-y" 'yank)
|
(define-key evil-visual-state-map "\C-y" 'yank)
|
||||||
|
|
||||||
(define-key evil-normal-state-map "K" 'lsp-ui-doc-glance); TODO: all modes
|
;(define-key evil-normal-state-map "K" 'lsp-ui-doc-glance); moved to lsp-ui
|
||||||
(define-key evil-visual-state-map "\C-y" 'yank)
|
(define-key evil-visual-state-map "\C-y" 'yank)
|
||||||
;(define-key evil-insert-state-map "\C-k" 'kill-line)
|
;(define-key evil-insert-state-map "\C-k" 'kill-line)
|
||||||
(define-key evil-normal-state-map "Q" 'call-last-kbd-macro)
|
(define-key evil-normal-state-map "Q" 'call-last-kbd-macro)
|
||||||
|
@ -1496,7 +1498,7 @@ Stopped using this, I just use Anki like a normal person
|
||||||
(use-package rainbow-delimiters
|
(use-package rainbow-delimiters
|
||||||
:hook (prog-mode . rainbow-delimiters-mode)
|
:hook (prog-mode . rainbow-delimiters-mode)
|
||||||
(prog-mode . show-paren-mode)
|
(prog-mode . show-paren-mode)
|
||||||
(prog-mode . electric-pair-local-mode)
|
;(prog-mode . electric-pair-local-mode)
|
||||||
)
|
)
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
@ -1595,6 +1597,8 @@ Lsp UI
|
||||||
;; (lsp-ui-doc-enable nil)
|
;; (lsp-ui-doc-enable nil)
|
||||||
:bind
|
:bind
|
||||||
(:map lsp-ui-mode-map
|
(:map lsp-ui-mode-map
|
||||||
|
([remap evil-lookup] . lsp-ui-doc-glance)
|
||||||
|
([remap xref-find-references] . lsp-ui-peek-find-references)
|
||||||
("C-c z" . lsp-ui-doc-focus-frame)
|
("C-c z" . lsp-ui-doc-focus-frame)
|
||||||
:map lsp-ui-doc-frame-mode-map
|
:map lsp-ui-doc-frame-mode-map
|
||||||
("C-g" . lsp-ui-doc-unfocus-frame)
|
("C-g" . lsp-ui-doc-unfocus-frame)
|
||||||
|
@ -1602,6 +1606,8 @@ Lsp UI
|
||||||
))
|
))
|
||||||
#+end_src
|
#+end_src
|
||||||
|
|
||||||
|
#+RESULTS:
|
||||||
|
|
||||||
*** lsp treemacs
|
*** lsp treemacs
|
||||||
#+begin_src emacs-lisp
|
#+begin_src emacs-lisp
|
||||||
;; (use-package lsp-treemacs
|
;; (use-package lsp-treemacs
|
||||||
|
@ -1753,9 +1759,6 @@ Auto format
|
||||||
;; comment to disable rustfmt on save
|
;; comment to disable rustfmt on save
|
||||||
(setq rustic-format-on-save t)
|
(setq rustic-format-on-save t)
|
||||||
(add-hook 'rustic-mode-hook 'my/dev/rustic-mode-hook)
|
(add-hook 'rustic-mode-hook 'my/dev/rustic-mode-hook)
|
||||||
;; (add-hook 'rustic-mode-hook 'electric-pair-mode)
|
|
||||||
;; (define-key lsp-ui-mode-map [remap xref-find-definitions] #'lsp-ui-peek-find-definitions)
|
|
||||||
;; (define-key lsp-ui-mode-map [remap xref-find-references] #'lsp-ui-peek-find-references)
|
|
||||||
(add-hook 'rustic-mode-hook 'lsp)
|
(add-hook 'rustic-mode-hook 'lsp)
|
||||||
:custom
|
:custom
|
||||||
(rustic-rustfmt-config-alist '((edition . "2021"))))
|
(rustic-rustfmt-config-alist '((edition . "2021"))))
|
||||||
|
|
Loading…
Reference in New Issue