-
Notifications
You must be signed in to change notification settings - Fork 60
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
ftdetect: Support #lang at-exp chains #65
base: master
Are you sure you want to change the base?
Conversation
This is clever. If you use a |
@benknoble How do you run the tests for this project? |
Modifies the regular expression to ignore `at-exp` when present in the #lang statement, and use the next language in the chain. See documentation for #lang at-exp at https://docs.racket-lang.org/scribble/reader-internals.html#%28part._at-exp-lang%29
I added an example file with #lang at-exp and used your suggestion for a non-capturing group (good idea, thanks!). |
I don't run the tests, per se--they mostly exist to take a look at the highlighting working, AFAIK. I just wanted to see an example to compare. I will note that it is likely to be difficult to correctly support |
HI @benknoble, did you see the test file I added? Good luck with the pollen/ |
Hey @sundbry , I did see it. Been a bit busy. As I said earlier, it won't be perfect: anything in the I'm going to merge this into my fork. If you come across similar things "language modifiers", LMK! I know of one ( |
Pull-request: wlangstroth#65 * sundbry/master: ftdetect: Support #lang at-exp chains Conflicts: ftdetect/racket.vim The differences in `g:racket_hash_lang_dict` caused conflicts. Keep my dict and the new regex.
I took the liberty of re-organizing to make it easier to declaratively add more modifying langs, and also to allow for better user-overriding. |
Modifies the regular expression to ignore
at-exp
when present in the #lang statement, and use the next language in the chain.See documentation for #lang at-exp at https://docs.racket-lang.org/scribble/reader-internals.html#%28part._at-exp-lang%29