mirror of
https://github.com/masscollaborationlabs/emacs.git
synced 2025-07-05 03:39:38 +00:00
Fix go-ts-mode const_spec highlighting (Bug#76330)
* lisp/progmodes/go-ts-mode.el (go-ts-mode--font-lock-settings): Handle multiple const_spec identifiers. * test/lisp/progmodes/go-ts-mode-resources/font-lock.go: Add test case.
This commit is contained in:
parent
bd1d6761f4
commit
b531bbf73e
2 changed files with 8 additions and 1 deletions
|
@ -154,7 +154,8 @@
|
||||||
,@(when (go-ts-mode--iota-query-supported-p)
|
,@(when (go-ts-mode--iota-query-supported-p)
|
||||||
'((iota) @font-lock-constant-face))
|
'((iota) @font-lock-constant-face))
|
||||||
(const_declaration
|
(const_declaration
|
||||||
(const_spec name: (identifier) @font-lock-constant-face)))
|
(const_spec name: (identifier) @font-lock-constant-face
|
||||||
|
("," name: (identifier) @font-lock-constant-face)*)))
|
||||||
|
|
||||||
:language 'go
|
:language 'go
|
||||||
:feature 'delimiter
|
:feature 'delimiter
|
||||||
|
|
|
@ -3,3 +3,9 @@ for idx, val := range arr {}
|
||||||
// ^ font-lock-variable-name-face
|
// ^ font-lock-variable-name-face
|
||||||
for idx := 0; idx < n; idx++ {}
|
for idx := 0; idx < n; idx++ {}
|
||||||
// ^ font-lock-variable-name-face
|
// ^ font-lock-variable-name-face
|
||||||
|
|
||||||
|
const (
|
||||||
|
zero, one = 0, 1
|
||||||
|
// ^ font-lock-constant-face
|
||||||
|
// ^ font-lock-constant-face
|
||||||
|
)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue