Giter Site home page Giter Site logo

Comments (7)

AndreasArvidsson avatar AndreasArvidsson commented on August 11, 2024 1

Nope. Global context wins over global module.

from andreas-talon.

pokey avatar pokey commented on August 11, 2024

Right now I'm running clippy-talon using a shallow clone of this repo:

git clone -n --depth=1 --filter=tree:0 '[email protected]:AndreasArvidsson/andreas-talon.git' clippy-talon
cd clippy-talon 
git sparse-checkout set plugins/clippy core/rpc_client
git checkout

from andreas-talon.

AndreasArvidsson avatar AndreasArvidsson commented on August 11, 2024

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?

from andreas-talon.

pokey avatar pokey commented on August 11, 2024

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)

from andreas-talon.

AndreasArvidsson avatar AndreasArvidsson commented on August 11, 2024

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.

from andreas-talon.

pokey avatar pokey commented on August 11, 2024

oh really? I thought I had to have something on the context for it to win

from andreas-talon.

pokey avatar pokey commented on August 11, 2024

Ok I edited the code snippet. Haven't tested it, but will take your word for it

from andreas-talon.

Related Issues (7)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.