401-rust: update custom handling
Signed-off-by: Ralf Zerres <ralf.zerres@networkx.de>
This commit is contained in:
@@ -10,26 +10,43 @@
|
||||
;; it superseeds rust-mode
|
||||
(use-package rustic
|
||||
:ensure t
|
||||
:custom
|
||||
(linum-on)
|
||||
(linum-relative-mode 1)
|
||||
(rustic-lsp-server 'rust-analyzer)
|
||||
(setq-default indent-tabs-mode nil)
|
||||
(rustic-lsp-format t)
|
||||
;;(linum-relative-toggle)
|
||||
;;(hs-minor-mode t)
|
||||
;;(lsp-origami-try-enable)
|
||||
;;(linum-relative-mode 1)
|
||||
;;(setq-default indent-tabs-mode nil)
|
||||
;;(rustic-lsp-server 'rust-analyzer)
|
||||
;;(rustic-lsp-format t)
|
||||
|
||||
:config
|
||||
;; recommended: use spaces instead of tabs
|
||||
(add-hook 'rust-mode-hook
|
||||
(lambda () (setq indent-tabs-mode nil)))
|
||||
(lambda () (setq indent-tabs-mode nil)))
|
||||
(add-hook 'rustic-mode-hook
|
||||
(lambda () (setq indent-tabs-mode nil)))
|
||||
(lambda () (setq indent-tabs-mode nil)))
|
||||
;; enable code folding und line numbering rust buffers
|
||||
(add-hook 'prog-mode-hook
|
||||
;;'lsp-origami-mode
|
||||
'hs-minor-mode
|
||||
'linum-relative-mode)
|
||||
;;'lsp-origami-mode
|
||||
'hs-minor-mode
|
||||
'linum-relative-mode)
|
||||
;;(remove-hook 'rustic-mode-hook 'flycheck-mode)
|
||||
|
||||
;; use the lsp UI package
|
||||
;; https://emacs-lsp.github.io/lsp-mode
|
||||
(use-package lsp-ivy)
|
||||
(use-package lsp-ui)
|
||||
(use-package lsp-ivy
|
||||
:ensure t)
|
||||
(use-package lsp-ui
|
||||
:ensure t)
|
||||
|
||||
;; use the yasnippet
|
||||
(use-package yasnippet
|
||||
:ensure t
|
||||
;; YASnippet is a template system for Emacs.
|
||||
;; It allows you to type an abbreviation and automatically expand it into function templates
|
||||
;; use YASnippet as a non-global minor mode
|
||||
@@ -41,14 +58,7 @@
|
||||
:config
|
||||
(setq linum-relative-backend 'display-line-numbers-mode))
|
||||
|
||||
:custom
|
||||
;;(linum-on)
|
||||
;;(linum-relative-toggle)
|
||||
;;(hs-minor-mode t)
|
||||
;;(lsp-origami-try-enable)
|
||||
;;(linum-relative-mode 1))
|
||||
(rustic-lsp-server 'rust-analyzer)
|
||||
(rustic-lsp-format t))
|
||||
)
|
||||
|
||||
(provide '401-rust)
|
||||
;; Local Variables:
|
||||
|
||||
Reference in New Issue
Block a user