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

.dir-locals.el support for custom syntax #403

Open
juszczakn opened this issue Sep 24, 2019 · 1 comment
Open

.dir-locals.el support for custom syntax #403

juszczakn opened this issue Sep 24, 2019 · 1 comment

Comments

@juszczakn
Copy link

juszczakn commented Sep 24, 2019

Might be cool to provide supported vars that can be incorporated into syntax highlighting. That way, individual projects could create a .dir-local.el that defines highlighting for custom syntax they have.

https://www.gnu.org/software/emacs/manual/html_node/emacs/Directory-Variables.html

Looks like racket--common-variables in racket-common.el and racket-font-lock.el would be places to start.

@juszczakn juszczakn changed the title .dir-locals.el support for macros .dir-locals.el support for custom syntax Sep 24, 2019
@greghendershott
Copy link
Owner

greghendershott commented Oct 22, 2019

Thank you for the suggestion. A couple quick brain-dump thoughts:

  • There's already the ability to specify custom indent, following the example of Emacs Lisp and Scheme modes, by setting a property on racket-indent-function. As it happens, you can also do this as a file- or directory-local setting by using the "variable" eval. Maybe something similar could make sense for syntax highlighting -- but I haven't had time to think about it, much.

  • Of course Racket lets a #lang supply its own indent and highlighting lexer, to Dr Racket. Racket Mode does not currently try to use these. Someday it could; assuming performance is satisfactory. (However: specifying indent only at the level of a #lang seems the wrong granularity to me; custom syntax provided by a mere library also ought to be able to supply indent, somehow TBD/someday.)

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

No branches or pull requests

2 participants