diff options
author | sterni <sternenseemann@systemli.org> | 2022-05-26T11·42+0200 |
---|---|---|
committer | clbot <clbot@tvl.fyi> | 2022-05-26T11·51+0000 |
commit | 80a80a0706d80161cd6d99226a0f34718e99ab33 (patch) | |
tree | 4c830179970cc56fd40b72929f2897b4ca0bddfe /users/sterni/emacs/init.el | |
parent | 3a2ad8ed3b5b95bb4978b21b7daa5da9944be6e2 (diff) |
feat(sterni/emacs): configure lsp-ui add proper lsp bindings r/4131
Change-Id: I1a81feca1bde663d1fbea1e2520f25f0bb57453c Reviewed-on: https://cl.tvl.fyi/c/depot/+/5679 Autosubmit: sterni <sternenseemann@systemli.org> Tested-by: BuildkiteCI Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to 'users/sterni/emacs/init.el')
-rw-r--r-- | users/sterni/emacs/init.el | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/users/sterni/emacs/init.el b/users/sterni/emacs/init.el index 38a87a286417..17b3f3573689 100644 --- a/users/sterni/emacs/init.el +++ b/users/sterni/emacs/init.el @@ -252,7 +252,27 @@ (use-package haskell-mode) (use-package lsp-mode :hook ((haskell-mode . lsp-deferred)) - :commands (lsp lsp-deferred)) + :commands (lsp lsp-deferred) + :config + (evil-define-key 'normal 'global + (kbd "<leader>lwr") 'lsp-workspace-restart + (kbd "<leader>lwq") 'lsp-workspace-shutdown + (kbd "<leader>la=") 'lsp-format-buffer + (kbd "<leader>lar") 'lsp-rename + (kbd "<leader>laa") 'lsp-execute-code-action)) +(use-package lsp-ui + :after lsp-mode + :custom + lsp-ui-doc-enable t + lsp-ui-doc-border "DimGray" + lsp-ui-doc-delay 0.5 + :config + (set-face-background 'lsp-ui-doc-background "WhiteSmoke") + (evil-define-key 'normal lsp-ui-mode-map + ;; TODO(sterni): emulate using xref for non-lsp? + (kbd "<leader>lgr") 'lsp-ui-peek-find-references + (kbd "<leader>lgd") 'lsp-ui-peek-find-definitions + (kbd "<leader>lc") 'lsp-ui-flycheck-list)) (use-package lsp-haskell :after lsp-mode :custom |