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

Syntax highlightning incorrectly recognizes def form #128

Open
KGOH opened this issue Oct 6, 2024 · 6 comments
Open

Syntax highlightning incorrectly recognizes def form #128

KGOH opened this issue Oct 6, 2024 · 6 comments

Comments

@KGOH
Copy link
Contributor

KGOH commented Oct 6, 2024

Syntax highlightning incorrectly recognizes def form and highlights the first argument of any function which name starts with "def". Notice the highlight of the 'k argument on the screenshot below
Screenshot 2024-10-06 at 14 07 18

@tonsky
Copy link
Owner

tonsky commented Oct 6, 2024

That is unfortunate, but that’s part of design. This way we can support all past and future def* forms. Any suggestions?

@KGOH
Copy link
Contributor Author

KGOH commented Oct 7, 2024

maybe make a setting?
like ["*.def.*"]
And I'll change it in my config to ["*.defn", "*.def", "*.deftest", "*.defn-"]

@tonsky
Copy link
Owner

tonsky commented Oct 7, 2024

Can’t, this goes into syntax highlighting, no settings there

@KGOH
Copy link
Contributor Author

KGOH commented Oct 7, 2024

@tonsky
Copy link
Owner

tonsky commented Oct 7, 2024

This wouldn’t work for rum/defc, rum/defcs and humble’s ui/defcomp for example

@KGOH
Copy link
Contributor Author

KGOH commented Oct 7, 2024

@tonsky add them too :) this will make a subtle advert for your libs

And then wait for requests to add some other def* forms to your syntax rules. I doubt that this will be a frequent chore

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

2 participants