From c193072deb2fe34f0d789660e384449646f20f7f Mon Sep 17 00:00:00 2001 From: Franck Cuny Date: Mon, 7 Dec 2020 11:58:07 -0800 Subject: emacs: update configuration for LSP I want to remap the prefix for `lsp-mode` from `` to ``, 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). --- emacs.d/custom/fcuny-prog.el | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'emacs.d/custom') 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) -- cgit 1.4.1