diff --git a/05prog-mode.el b/05prog-mode.el index ed39141..c08f79f 100644 --- a/05prog-mode.el +++ b/05prog-mode.el @@ -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." diff --git a/06company-yasnippet.el b/06company-yasnippet.el index 24edc36..0b4be7f 100644 --- a/06company-yasnippet.el +++ b/06company-yasnippet.el @@ -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 diff --git a/20rust.el b/20rust.el new file mode 100644 index 0000000..58f5a94 --- /dev/null +++ b/20rust.el @@ -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) diff --git a/init.el b/init.el index 2c9a182..8f6fc51 100644 --- a/init.el +++ b/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.