Skip to content

Commit f82c75b

Browse files
committed
Mark _ as a word constituent to avoid highlighting parts of identifiers as keywords
1 parent b5571ed commit f82c75b

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/etc/emacs/rust-mode.el

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,11 @@
3131
(modify-syntax-entry ?\" "\"" table)
3232
(modify-syntax-entry ?\\ "\\" table)
3333

34+
;; mark _ as a word constituent so that identifiers
35+
;; such as xyz_type don't cause type to be highlighted
36+
;; as a keyword
37+
(modify-syntax-entry ?_ "w" table)
38+
3439
;; Comments
3540
(modify-syntax-entry ?/ ". 124b" table)
3641
(modify-syntax-entry ?* ". 23" table)

0 commit comments

Comments
 (0)