Add rust config

This commit is contained in:
Maciej 2018-09-09 20:51:45 +03:00
parent 46c73d8e9b
commit 2b1be43977
Signed by: maciej
GPG key ID: 41D62D42D3B0D765
4 changed files with 23 additions and 1 deletions

View file

@ -38,6 +38,9 @@
;; When possible, show code documentation ;; When possible, show code documentation
(global-eldoc-mode 1) (global-eldoc-mode 1)
;; Use flycheck globally to check syntax and compile languages
(global-flycheck-mode 1)
;; Function for definiting indentation ;; Function for definiting indentation
(defun set-indent (step) (defun set-indent (step)
"Set indentation to X STEPs." "Set indentation to X STEPs."

View file

@ -30,6 +30,7 @@
(company-clang company-cmake) ;; C (company-clang company-cmake) ;; C
company-robe ;; Ruby company-robe ;; Ruby
alchemist-company ;; Elixir alchemist-company ;; Elixir
company-racer ;; Rust
(company-dabbrev-code company-dabbrev company-abbrev) ;; abbrev (company-dabbrev-code company-dabbrev company-abbrev) ;; abbrev
company-files ; files & directory company-files ; files & directory
company-ispell ; Ispell company-ispell ; Ispell

11
20rust.el Normal file
View 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)

View file

@ -39,6 +39,7 @@
company ;; Code completion framework company ;; Code completion framework
yasnippet ;; Code snippets framework yasnippet ;; Code snippets framework
yasnippet-snippets ;; Actual snippets for various languages yasnippet-snippets ;; Actual snippets for various languages
flycheck ;; Compilation framework
;; Project management ;; Project management
projectile projectile
@ -58,6 +59,11 @@
;; Elixir ;; Elixir
alchemist alchemist
;; Rust
racer
rust-mode
flycheck-rust
;; Web ;; Web
web-mode web-mode
@ -95,6 +101,7 @@
(load "~/.emacs.d/20web.el") (load "~/.emacs.d/20web.el")
(load "~/.emacs.d/20elixir.el") (load "~/.emacs.d/20elixir.el")
(load "~/.emacs.d/20sh.el") (load "~/.emacs.d/20sh.el")
(load "~/.emacs.d/20rust.el")
(custom-set-variables (custom-set-variables
;; custom-set-variables was added by Custom. ;; custom-set-variables was added by Custom.
@ -103,7 +110,7 @@
;; If there is more than one, they won't work right. ;; If there is more than one, they won't work right.
'(package-selected-packages '(package-selected-packages
(quote (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
;; custom-set-faces was added by Custom. ;; custom-set-faces was added by Custom.
;; If you edit it by hand, you could mess it up, so be careful. ;; If you edit it by hand, you could mess it up, so be careful.