emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[nongnu] elpa/web-mode 34b08791ca 05/15: [ Elixir ] Match atoms, variabl


From: ELPA Syncer
Subject: [nongnu] elpa/web-mode 34b08791ca 05/15: [ Elixir ] Match atoms, variables and function names before keywords
Date: Fri, 19 Aug 2022 05:59:27 -0400 (EDT)

branch: elpa/web-mode
commit 34b08791ca84463ed6ed75ca7f60abfa81bfd7fe
Author: Wilhelm Hugo Kirschbaum <wkirschbaum@gmail.com>
Commit: Wilhelm Hugo Kirschbaum <wkirschbaum@gmail.com>

    [ 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]