Skip to content

Missing syntax highlighting for decorated functions #110

Description

@nagy

The new syntax introduced with hylang/hy#2270 is not being recognized by hy-mode. For example:

(import click)

(defn
  [click.command
   (click.option "--name")]
  main [name]
  (print "Hi" name))

(when (= __name__ "__main__") (main))

Here, the defun is not highlighted correctly. The responsible part is probably this:

hy-mode/hy-font-lock.el

Lines 347 to 352 in df81486

(rx-to-string
`(: "("
symbol-start
(group-n 1 (or ,@hy-font-lock--definitions))
(1+ space)
(group-n 2 (1+ word))))

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions