Add rust config
This commit is contained in:
parent
46c73d8e9b
commit
2b1be43977
4 changed files with 23 additions and 1 deletions
|
|
@ -38,6 +38,9 @@
|
|||
;; When possible, show code documentation
|
||||
(global-eldoc-mode 1)
|
||||
|
||||
;; Use flycheck globally to check syntax and compile languages
|
||||
(global-flycheck-mode 1)
|
||||
|
||||
;; Function for definiting indentation
|
||||
(defun set-indent (step)
|
||||
"Set indentation to X STEPs."
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@
|
|||
(company-clang company-cmake) ;; C
|
||||
company-robe ;; Ruby
|
||||
alchemist-company ;; Elixir
|
||||
company-racer ;; Rust
|
||||
(company-dabbrev-code company-dabbrev company-abbrev) ;; abbrev
|
||||
company-files ; files & directory
|
||||
company-ispell ; Ispell
|
||||
|
|
|
|||
11
20rust.el
Normal file
11
20rust.el
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
(defun activate-rust-mode ()
|
||||
"All things for Rust mode"
|
||||
(interactive)
|
||||
(set-indent 4)
|
||||
(column-enforce-n 99))
|
||||
|
||||
;; (flymake-rust-setup))
|
||||
|
||||
(add-hook 'rust-mode-hook 'activate-rust-mode)
|
||||
(add-hook 'rust-mode-hook 'racer-mode)
|
||||
(add-hook 'rust-mode-hook 'flycheck-rust-setup)
|
||||
9
init.el
9
init.el
|
|
@ -39,6 +39,7 @@
|
|||
company ;; Code completion framework
|
||||
yasnippet ;; Code snippets framework
|
||||
yasnippet-snippets ;; Actual snippets for various languages
|
||||
flycheck ;; Compilation framework
|
||||
|
||||
;; Project management
|
||||
projectile
|
||||
|
|
@ -58,6 +59,11 @@
|
|||
;; Elixir
|
||||
alchemist
|
||||
|
||||
;; Rust
|
||||
racer
|
||||
rust-mode
|
||||
flycheck-rust
|
||||
|
||||
;; Web
|
||||
web-mode
|
||||
|
||||
|
|
@ -95,6 +101,7 @@
|
|||
(load "~/.emacs.d/20web.el")
|
||||
(load "~/.emacs.d/20elixir.el")
|
||||
(load "~/.emacs.d/20sh.el")
|
||||
(load "~/.emacs.d/20rust.el")
|
||||
|
||||
(custom-set-variables
|
||||
;; custom-set-variables was added by Custom.
|
||||
|
|
@ -103,7 +110,7 @@
|
|||
;; If there is more than one, they won't work right.
|
||||
'(package-selected-packages
|
||||
(quote
|
||||
(hydra markdown-mode solarized-theme company-ansible alchemist window-purpose column-enforce-mode yaml-mode ansible dockerfile-mode ruby-end web-mode flymake-ruby rvm dash-at-point robe base16-theme exec-path-from-shell))))
|
||||
(enh-ruby-mode counsel-projectile counsel ivy flycheck-rust flycheck racer rust-mode hydra markdown-mode solarized-theme company-ansible alchemist window-purpose column-enforce-mode yaml-mode ansible dockerfile-mode ruby-end web-mode rvm dash-at-point robe base16-theme exec-path-from-shell))))
|
||||
(custom-set-faces
|
||||
;; custom-set-faces was added by Custom.
|
||||
;; If you edit it by hand, you could mess it up, so be careful.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue