summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjohannst <johannes.stoelp@gmail.com>2021-01-07 21:05:17 +0100
committerjohannst <johannes.stoelp@gmail.com>2021-01-07 21:05:17 +0100
commit4c92182cbf9b28b78c5a70886b24358c3a0b8776 (patch)
tree25bc4ff7f922e0c1d9e21e98ea5bb2003c0b2351
parent56183a201950625ad80ddaeefe70e47d0f1a900c (diff)
downloaddotfiles-4c92182cbf9b28b78c5a70886b24358c3a0b8776.tar.gz
dotfiles-4c92182cbf9b28b78c5a70886b24358c3a0b8776.zip
emacs: add lsp-ui & enable line nr & enable whitespace mode
-rw-r--r--emacs.el25
1 files 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