You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is the same bug that causes _ in test function names to fail syntax highlighting. Identifiers are [:word:] and _ is not marked as a word syntax class I think.
Edit: _ is marked as word syntax but somehow it still doesn't work.
(defvargo-mode-syntax-table
(let ((st (make-syntax-table)))
;; snip;; TODO make _ a symbol constituent now that xemacs is gone
(modify-syntax-entry?_"w" st)
st)
"Syntax table for Go mode.")
Changing [[:word:][:multibyte:]] in the various regexps to [[:word:]_[:multibyte:]] does fix the issue.
Edit 2: I'm an idiot, I set _ back to symbol syntax in my personal config. However, noting the TODO I quoted above, this will (?) eventually need to be fixed.
darkfeline
changed the title
Syntax highlighting doesn't support _ in named return
Syntax highlighting doesn't support _ in identifiers
Nov 24, 2023
darkfeline
changed the title
Syntax highlighting doesn't support _ in identifiers_ is treated as word syntax rather than symbol syntax
Nov 24, 2023
darkfeline
added a commit
to darkfeline/go-mode.el
that referenced
this issue
Nov 24, 2023
Read comments for context.
Old title: Syntax highlighting doesn't support
_
in named returnOld description:
The syntax highlighting fails on the
_
in cases like:The text was updated successfully, but these errors were encountered: