added rust mode

This commit is contained in:
Thomas von Dein
2020-09-02 20:44:21 +02:00
parent 49340f6524
commit 0c4563cb28
2 changed files with 10109 additions and 4 deletions

23
.emacs
View File

@@ -1,4 +1,4 @@
;; Toms Emacs Config - portable - version ("20200101.01") -*-emacs-lisp-*-
;; Toms Emacs Config - portable - version ("20200902.01") -*-emacs-lisp-*-
;; * Introduction
;; This is my emacs config, it is more than twenty years old. It
@@ -785,6 +785,9 @@
;; - added smerge hydra plus alias 'merge
;; - fixed window resize hydra help
;; 20200902.01
;; - added rust mode
;; ** TODO
;; - check helpful https://github.com/wilfred/helpful
@@ -812,7 +815,7 @@
;; My emacs config has a version (consisting of a timestamp with a
;; serial), which I display in the mode line. So I can clearly see, if
;; I'm using an outdated config somewhere.
(defvar tvd-emacs-version "20200101.01")
(defvar tvd-emacs-version "20200902.01")
;; --------------------------------------------------------------------------------
@@ -2114,6 +2117,22 @@ col1, col2"
(add-to-list 'file-coding-system-alist '("\\.vala$" . utf-8))
(add-to-list 'file-coding-system-alist '("\\.vapi$" . utf-8))
;; --------------------------------------------------------------------------------
;; *** rust mode
(autoload 'rust-mode "rust-mode" nil t)
(defun rustlings-done ()
"I use this with rustlings"
(interactive)
(search-backward "DONE")
(move-beginning-of-line 1)
(kill-line)
(save-buffer))
(setq auto-mode-alist
(append '(("\\.\\(rs\\)$" . rust-mode))
auto-mode-alist))
;; --------------------------------------------------------------------------------
;; *** python mode