summary refs log tree commit diff
path: root/emacs.d/custom
diff options
context:
space:
mode:
authorFranck Cuny <franck@fcuny.net>2020-12-07 11:58:07 -0800
committerFranck Cuny <franck@fcuny.net>2020-12-07 11:58:07 -0800
commitc193072deb2fe34f0d789660e384449646f20f7f (patch)
treeb6ab35447b6fe03e151796871bcee86a650e2970 /emacs.d/custom
parentemacs: ensure diminish is installed (diff)
downloademacs.d-c193072deb2fe34f0d789660e384449646f20f7f.tar.gz
emacs: update configuration for LSP
I want to remap the prefix for `lsp-mode` from `<s-l>` to `<C-c l>`,
since I'm already using super for i3.

Diminish the mode, there's no need to have this in the modeline.

Update some of the variables (some were deprecated / replaced with
different names).
Diffstat (limited to '')
-rw-r--r--emacs.d/custom/fcuny-prog.el18
1 files changed, 13 insertions, 5 deletions
diff --git a/emacs.d/custom/fcuny-prog.el b/emacs.d/custom/fcuny-prog.el
index 8987496..961a155 100644
--- a/emacs.d/custom/fcuny-prog.el
+++ b/emacs.d/custom/fcuny-prog.el
@@ -18,14 +18,20 @@
 
 (use-package lsp-mode
   :ensure t
-  :hook ((go-mode . lsp-deferred)
-         (lsp-mode . lsp-enable-which-key-integration))
   :commands (lsp lsp-deferred)
+  :diminish lsp-mode
+  :hook (((go-mode) . lsp-deferred)
+         (lsp-mode . (lambda() (let ((lsp-keymap-prefix "C-c l"))
+                                 (lsp-enable-which-key-integration)))))
+  :config
+  (define-key lsp-mode-map (kbd "C-c l") lsp-command-map)
   :custom
   (lsp-session-file (expand-file-name "lsp-session-v1" fcuny/path-emacs-var))
   (lsp-enable-snippet t)
-  (lsp-prefer-capf t)
-  (lsp-enable-completion-at-point t)
+  (lsp-signature-doc-lines 5)
+  (lsp-modeline-diagnostic-scope :workspace)
+  (lsp-completion-provider :capf)
+  (lsp-completion-enable t)
   (lsp-enable-indentation t)
   (lsp-prefer-flymake nil))
 
@@ -34,7 +40,9 @@
   :hook (lsp-mode . lsp-ui-mode)
   :commands lsp-ui-mode
   :custom
-  (lsp-ui-doc-enable nil)
+  (lsp-ui-doc-delay 0.4)
+  (lsp-ui-doc-enable t)
+  (lsp-ui-doc-position 'top)
   (lsp-ui-doc-include-signature t)
   (lsp-ui-peek-enable t)
   (lsp-ui-sideline-enable t)