From d1c5db326f8daf453d71e9afcbd508832347aac3 Mon Sep 17 00:00:00 2001 From: Huon Wilson Date: Sun, 17 Aug 2014 11:55:46 +1000 Subject: [PATCH] Add new keywords (particularly `where` & `virtual`) to editor modes. --- src/etc/emacs/rust-mode.el | 5 +++-- .../gedit/share/gtksourceview-3.0/language-specs/rust.lang | 2 ++ src/etc/kate/rust.xml | 3 +++ src/etc/vim/syntax/rust.vim | 2 +- 4 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/etc/emacs/rust-mode.el b/src/etc/emacs/rust-mode.el index beb2e6510fd..6a514c81b09 100644 --- a/src/etc/emacs/rust-mode.el +++ b/src/etc/emacs/rust-mode.el @@ -170,7 +170,7 @@ (defconst rust-mode-keywords '("as" "box" "break" - "continue" "crate" + "const" "continue" "crate" "do" "else" "enum" "extern" "false" "fn" "for" @@ -182,7 +182,8 @@ "self" "static" "struct" "super" "true" "trait" "type" "unsafe" "use" - "while")) + "virtual" + "where" "while")) (defconst rust-special-types '("u8" "i8" diff --git a/src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang b/src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang index b54de8802cf..9f22a99b774 100644 --- a/src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang +++ b/src/etc/gedit/share/gtksourceview-3.0/language-specs/rust.lang @@ -71,6 +71,8 @@ trait unsafe use + virtual + where while diff --git a/src/etc/kate/rust.xml b/src/etc/kate/rust.xml index f2f54d9d307..cf59f1454c1 100644 --- a/src/etc/kate/rust.xml +++ b/src/etc/kate/rust.xml @@ -19,6 +19,7 @@ as break box + const continue crate do @@ -44,6 +45,8 @@ trait unsafe use + virtual + where while diff --git a/src/etc/vim/syntax/rust.vim b/src/etc/vim/syntax/rust.vim index 544c938dd73..b25cbd726dd 100644 --- a/src/etc/vim/syntax/rust.vim +++ b/src/etc/vim/syntax/rust.vim @@ -26,7 +26,7 @@ syn keyword rustKeyword fn nextgroup=rustFuncName skipwhite skipempty syn keyword rustKeyword for in if impl let syn keyword rustKeyword loop once proc pub syn keyword rustKeyword return super -syn keyword rustKeyword unsafe virtual while +syn keyword rustKeyword unsafe virtual where while syn keyword rustKeyword use nextgroup=rustModPath,rustModPathInUse skipwhite skipempty " FIXME: Scoped impl's name is also fallen in this category syn keyword rustKeyword mod trait struct enum type nextgroup=rustIdentifier skipwhite skipempty