Open pokey opened 4 months ago
Right now I'm running clippy-talon using a shallow clone of this repo:
git clone -n --depth=1 --filter=tree:0 'git@github.com:AndreasArvidsson/andreas-talon.git' clippy-talon
cd clippy-talon
git sparse-checkout set plugins/clippy core/rpc_client
git checkout
This is going a have to change if I'm moving this into a separate repository. At long as its in my repository it's of course going to be based upon my lists and captures. You can just make a context specific override on that capture?
Yeah that's what I ended up doing. Pasting here for reference:
from talon import Context
ctx = Context()
@ctx.capture(rule="<user.number_key> | {user.letter} [{user.letter}]")
def clippy_hint(m) -> str:
try:
return str(m.number_key)
except AttributeError:
return "".join(m.letter_list)
Nice. Thank you :) I guess neither of those lists are mac specific though? Since it's already on a context it should win over the default module definition so you don't need to think about specificity.
oh really? I thought I had to have something on the context for it to win
Nope. Global context wins over global module.
Ok I edited the code snippet. Haven't tested it, but will take your word for it
https://github.com/AndreasArvidsson/andreas-talon/blob/24455da4e8bd5ed4ed13538530d0f2bc848451a6/plugins/clippy/clippy_targets.py#L31