From 4c92182cbf9b28b78c5a70886b24358c3a0b8776 Mon Sep 17 00:00:00 2001 From: johannst Date: Thu, 7 Jan 2021 21:05:17 +0100 Subject: emacs: add lsp-ui & enable line nr & enable whitespace mode --- emacs.el | 25 +++++++++++++++++++------ 1 file changed, 19 insertions(+), 6 deletions(-) diff --git a/emacs.el b/emacs.el index aba55c9..b12a4bd 100644 --- a/emacs.el +++ b/emacs.el @@ -9,8 +9,10 @@ '(indent-tabs-mode nil) '(inhibit-startup-screen t) '(tool-bar-mode nil) - '(whitespace-style '(trailing tabs newline tab-mark newline-mark)) + '(whitespace-style '(face trailing space-before-tab newline indentation empty space-after-tab tab-mark)) + '(global-whitespace-mode t) '(backup-directory-alist `(("." . "~/.emacs.saves"))) + '(display-line-numbers 'relative) ) ;; global kbd maps @@ -109,11 +111,20 @@ (use-package lsp-mode :ensure t :config - (setq lsp-rust-server 'rust-analyzer) - :hook - (rust-mode . (lambda () - (lsp) - (lsp-rust-analyzer-inlay-hints-mode))) + (setq lsp-rust-server 'rust-analyzer + lsp-rust-analyzer-server-display-inlay-hints t + lsp-rust-analyzer-display-chaining-hints t + lsp-rust-analyzer-display-parameter-hints t + ) + ) + +;; lsp ui +(use-package lsp-ui + :ensure t + :config (setq + lsp-ui-doc-enable nil + lsp-ui-sideline-enable t + ) ) ;; company @@ -159,6 +170,8 @@ (use-package rust-mode :ensure t :mode ("\\.rs\\'" . rust-mode) + :hook + (rust-mode . lsp) ) ;; clang-format -- cgit v1.2.3