-
-
Notifications
You must be signed in to change notification settings - Fork 22
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
Adding live templates for OCaml #343
Conversation
What I did to test
|
|
||
@Override | ||
public boolean isInContext(@NotNull TemplateActionContext templateActionContext) { | ||
return templateActionContext.getFile().getName().endsWith(".ml"); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
maybe it could also work with mli
interface files
Thanks, I really appreciate. small remarks:
|
Thank you! It seems that I have rushed things a bit, sorry this is my first PR. The operator "|" is used quite a lot (match/type/...), it would save a lot of time. I could remove it, but I don't think this is too specific. Should I remove it? As for ~f, this was for labels, but I will remove it. For module struct/module sig, I pondered a bit to find a suitable name (I picked module struct because they will both show up when writing module, or struct/sig). Well, I will change as you want. For I took the ones that I had on sublime-text. I will check everything, and make a patch 👍. |
It's just that they are default values that everybody will get, so I prefer to play safe. |
Okay, no problem. I will remove "|" too. |
Done! I wrote a file in which I listed (and tested) every live template. Maybe, you could use if you want to add something in the documentation (or you can remove it if this is useless). |
Adding live templates for OCaml
docmodule sigmsigmodule structmstruct~fAs explained in #342 . I was quite easy by the way, I mean, running your project 👍 and testing.