hylang / hy-mode

Hy mode for Emacs
GNU General Public License v3.0
189 stars 48 forks source link

Missing syntax highlighting for decorated functions #110

Open nagy opened 1 year ago

nagy commented 1 year ago

The new syntax introduced with https://github.com/hylang/hy/pull/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: https://github.com/hylang/hy-mode/blob/df814865a1faa8414dacdbb35b2a9029995312ec/hy-font-lock.el#L347-L352