branch: elpa/web-mode
commit 34b08791ca84463ed6ed75ca7f60abfa81bfd7fe
Author: Wilhelm Hugo Kirschbaum <[email protected]>
Commit: Wilhelm Hugo Kirschbaum <[email protected]>
[ Elixir ] Match atoms, variables and function names before keywords
When using a @for variable, the font is wrong. Similarly with :for
etc..
Moving the keyword and constants down the list means it will match it
first. It also makes it not jump colours when choosing variable names
like @form between r and m.
---
web-mode.el | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/web-mode.el b/web-mode.el
index b66beee922..f836929707 100644
--- a/web-mode.el
+++ b/web-mode.el
@@ -2277,11 +2277,11 @@ shouldn't be moved back.)")
(defvar web-mode-elixir-font-lock-keywords
(list
- (cons (concat "\\_<\\(" web-mode-elixir-keywords "\\)\\_>") '(0
'web-mode-builtin-face))
- (cons (concat "\\_<\\(" web-mode-elixir-constants "\\)\\_>") '(0
'web-mode-constant-face))
- '("def[ ]+\\([[:alnum:]_]+\\)" 1 'web-mode-function-name-face)
'("@\\([[:alnum:]_]+\\)" 0 'web-mode-variable-name-face)
'("[ ]\\(:[[:alnum:]-_]+\\)" 1 'web-mode-symbol-face)
+ '("def[ ]+\\([[:alnum:]_]+\\)" 1 'web-mode-function-name-face)
+ (cons (concat "\\_<\\(" web-mode-elixir-keywords "\\)\\_>") '(0
'web-mode-builtin-face))
+ (cons (concat "\\_<\\(" web-mode-elixir-constants "\\)\\_>") '(0
'web-mode-constant-face))
))
(defvar web-mode-erlang-font-lock-keywords