Separate more languages
This commit is contained in:
parent
4073c40b2c
commit
daa26bbc3b
7 changed files with 97 additions and 59 deletions
28
languages/rust.el
Normal file
28
languages/rust.el
Normal file
|
|
@ -0,0 +1,28 @@
|
|||
;;; Rust -- summary
|
||||
;;; Commentary:
|
||||
|
||||
;;; Code:
|
||||
|
||||
;;========== Editor config =========================
|
||||
(defun editor-config-rust ()
|
||||
"Editor configuration for Rust."
|
||||
(set-indent 4)
|
||||
(set-width-99))
|
||||
|
||||
;;========== Code completion =======================
|
||||
(defun completion-config-rust ()
|
||||
"Code completion and inspection for Rust."
|
||||
(racer-mode 1)
|
||||
(company-mode 1)
|
||||
(flycheck-mode 1)
|
||||
(flymake-mode)
|
||||
(set (make-local-variable 'company-backends)
|
||||
'((company-racer company-capf company-dabbrev-code company-yasnippet
|
||||
company-files))))
|
||||
|
||||
;;========== Hooks =================================
|
||||
(add-hook 'rust-mode-hook 'editor-config-rust)
|
||||
(add-hook 'rust-mode-hook 'completion-config-rust)
|
||||
|
||||
(provide 'rust)
|
||||
;;; rust.el ends here
|
||||
Loading…
Add table
Add a link
Reference in a new issue