Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Missing syntax highlighting for decorated functions #110

Open
nagy opened this issue Dec 18, 2022 · 0 comments
Open

Missing syntax highlighting for decorated functions #110

nagy opened this issue Dec 18, 2022 · 0 comments

Comments

@nagy
Copy link

nagy commented Dec 18, 2022

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))))

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant