diff --git a/core/siren-modules.el b/core/siren-modules.el index 2d4ef92..2d481a3 100644 --- a/core/siren-modules.el +++ b/core/siren-modules.el @@ -96,6 +96,7 @@ (require 'siren-php) (require 'siren-plantuml) (require 'siren-ruby) +(require 'siren-rust) (require 'siren-sass) (require 'siren-scss) (require 'siren-sh) diff --git a/custom.el b/custom.el index 20a6463..b32d69f 100644 --- a/custom.el +++ b/custom.el @@ -7,7 +7,7 @@ '(magit-commit-arguments (quote ("-S"))) '(package-selected-packages (quote - (ace-ack ag-anti anywhere-anzu avy-bright bright browse-browse buffer-coffee column-company company completing-cursors dash-descbinds describe-diff diminish-direx dockerfile-dumb dup-ecb editorconfig-eldoc-eslintd evil-exec-expand feature-file-fill-fix flycheck-flycheck flycheck from-full gh-git git gitconfig-github github-gitignore go-go go-go go-go gometalinter-gotest gtags-guides guru-haml helm-helm helm-helm helm-helm helm-helm highlight-highlight highlight-hl ido-ido imenu-indent indentation-indicator inf-inflection-js json-jump key kill-line link lint-linum lua magit-magit markdown-mode mode-mode mode-mode mode-mode mode-mode mode-mode mode-mode mode mode-mode mode mode-mode mode mode-modes-move move-multiple-open+ package-package package-path phi-php-plantuml prettier-projectile projectile-pulls-quotes rainbow-read refactor-region relative rename-ring rjsx-rspec ruby-ruby-ruby sass-scss search-shell shift smart smart-smartparens smex string-swoop symbol-theme-theme thrift timemachine-toggle-tools twilight twilight-use vertical-web-which window-window-yaml-yari yasnippet zoom))) + (ace-ack ag anti anywhere-anzu avy-bright bright-browse browse-buffer cargo-cargo coffee-column company-company completing cursors-dash descbinds-describe diff-diminish direx dockerfile-dumb dup-ecb editorconfig-eldoc eslintd-evil exec-expand feature-file fill-fix-flycheck flycheck-flycheck-flycheck from-full-gh-git git-gitconfig github github-gitignore go-go go go-go go-gometalinter gotest-gtags guides-guru haml-helm helm-helm helm-helm helm-helm helm-highlight highlight-highlight hl-ido ido-imenu indent-indentation indicator-inf inflection-js json-jump key-kill line-link-lint linum-lua magit magit-markdown mode mode-mode mode mode-mode mode-mode mode-mode mode-mode mode-mode mode-mode mode-mode mode-mode mode mode-mode modes move-move multiple open-package-package package-path-phi+ php-plantuml playground-prettier projectile-projectile-pulls quotes-racer rainbow-read-refactor region-relative rename-ring rjsx rspec-ruby ruby-ruby rust-rust-rust sass-scss search-shell shift smart smart-smartparens smex string-swoop symbol-theme-theme thrift timemachine-toggle-tools twilight twilight-use vertical-web-which window-window-yaml-yari yasnippet zoom))) '(plantuml-jar-path "/usr/local/Cellar/plantuml/8048/plantuml.8048.jar") '(siren-rubocop-autocorrect-on-save nil)) (custom-set-faces diff --git a/modules/siren-rust.el b/modules/siren-rust.el new file mode 100644 index 0000000..0ef1a4c --- /dev/null +++ b/modules/siren-rust.el @@ -0,0 +1,62 @@ +;;; siren-rust.el --- jimeh's Emacs Siren: rust-mode configuration. + +;;; Commentary: + +;; Basic configuration for rust-mode. + +;;; Code: + +(require 'siren-flycheck) +(require 'siren-folding) +(require 'siren-programming) + +(use-package rust-mode + :mode "\\.rs\\'" + :interpreter "rust" + :commands rust-mode + :bind (:map rust-mode-map + ("RET" . newline-and-indent)) + + :hook + (rust-mode . siren-rust-mode-setup) + + :init + (defun siren-rust-mode-setup () + (siren-prog-mode-setup) + + (setq rust-format-on-save t) + + (hs-minor-mode 1) + (hideshowvis-enable) + (highlight-indentation-current-column-mode) + (subword-mode +1))) + +(use-package cargo + :hook (rust-mode . cargo-minor-mode)) + +(use-package flycheck-rust + :requires rust-mode flycheck + :commands flycheck-rust-setup + :init + (with-eval-after-load 'rust-mode + (add-hook 'flycheck-mode-hook #'flycheck-rust-setup))) + +(use-package racer + :requires rust-mode company + :commands racer-mode + :bind (:map rust-mode-map + ("TAB" . company-indent-or-complete-common)) + + :hook + (rust-mode . racer-mode) + (racer-mode . eldoc-mode) + (racer-mode . siren-racer-mode-setup) + + :config + (defun siren-racer-mode-setup () + (setq company-tooltip-align-annotations t))) + +(use-package rust-playground) + +(provide 'siren-rust) +;;; siren-rust.el ends here