emacs-diffs
[Top][All Lists]
Advanced

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

emacs-29 79ab62e0bb: go-ts-mode: Highlight variable declarations


From: Dmitry Gutov
Subject: emacs-29 79ab62e0bb: go-ts-mode: Highlight variable declarations
Date: Sun, 5 Feb 2023 21:42:28 -0500 (EST)

branch: emacs-29
commit 79ab62e0bb5d6185a358a2473c65b6461ea97793
Author: Dmitry Gutov <dgutov@yandex.ru>
Commit: Dmitry Gutov <dgutov@yandex.ru>

    go-ts-mode: Highlight variable declarations
    
    * lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings):
    Highlight variable declarations in 'definition' feature.
---
 lisp/progmodes/go-ts-mode.el | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/lisp/progmodes/go-ts-mode.el b/lisp/progmodes/go-ts-mode.el
index dbb08c8144..7802c1fbfc 100644
--- a/lisp/progmodes/go-ts-mode.el
+++ b/lisp/progmodes/go-ts-mode.el
@@ -135,7 +135,13 @@
      (field_declaration
       name: (field_identifier) @font-lock-property-face)
      (parameter_declaration
-      name: (identifier) @font-lock-variable-name-face))
+      name: (identifier) @font-lock-variable-name-face)
+     (short_var_declaration
+      left: (expression_list
+             (identifier) @font-lock-variable-name-face
+             ("," (identifier) @font-lock-variable-name-face)*))
+     (var_spec name: (identifier) @font-lock-variable-name-face
+               ("," name: (identifier) @font-lock-variable-name-face)*))
 
    :language 'go
    :feature 'function



reply via email to

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