-
Notifications
You must be signed in to change notification settings - Fork 765
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
dictate python functions from list #169
Conversation
I’m thinking we could make these commands generic (programming.talon) with context-specific captures for supported languages. This would be similar to the initial snippet support The capture could probably be declared in code.py I’m happy to help with this, if it sounds reasonable. A step towards making the ideas here https://github.com/fidgetingbits/knausj_talon/blob/df58c73db3a7ca2f80e633266559f312f91908e8/code/c.py |
I would love to extend this to other programming languages, but I'm a little lost on how to do it so your help would be greatly appreciated. I also liked the idea of selecting the functions by index! |
@RodrigoChT - I took a first pass at making this something that might work reasonably across languages. Sorry for the formatting changes. I'm switching the depot to using @fidgetingbits @barrcodes - you two might be interested in taking a peek at this. Meat of the idea is really in these two, with whatever supporting code in code.py: I would potentially extend this to include common libraries and types for each language as appropriate. Haven't had enough time to think about those just yet.
|
indeed black certainly adds a lot of noise at first, but totally worth it :D I like this idea, and certainly goes well with the recent C stuff I hope to PR soon. I think the selection window idea will be really useful too Since you mentioned types, one the thing I have been wanting to do with types is have the ability to toggle between default types used by the C stuff, since for instance stdint (ex: |
Is changing the typeset something that could be done cleanly per-project? I have my doubts, but... For example, the default type list could be the std_*, or whatever’s considered vanilla C. Then for projects using some other set, the list could be changed via a more specific python context. So a python file with something like the below, plus a modified list.
Then, elsewhere opt-in:
|
This looks great, what has to be done before it is ready to be merged? |
Also ensure it updates when the context changes
I think with my latest changes, it's pretty reasonable and ready to go in. Types and libraries and stubbed in code.py once we're ready for those. I switched to copy and paste for these, so we can hopefully reliably wrap selections without fighting the IDE(s).
|
right now I only have a short list of python functions, once I get approval for the structure of this me and the rest of python users can continue adding to it