Git Product home page Git Product logo

Comments (6)

dvcrn avatar dvcrn commented on May 21, 2024

Hi,

  {:t {:category "toggles"}
     :p {:category "pomodoro"
         :s {:action "pomodoro:start"
             :title "Start Timer"}
         :a {:action "pomodoro:abort"
             :title "Abort Timer"}}})

here you are just overwriting the :t key: :t {:category "toggles"} (the :t map is closed). I think you have a little bracket misplacement.

Nevertheless, code in question is here. Looks like I misunderstood what merge does. Need to apply a recursive merge here that goes into sub-maps

from proton.

dvcrn avatar dvcrn commented on May 21, 2024

Found some deep-merge implementations and added them as helpers here. Didn't have time yet to check deep-merging of keybindings

from proton.

sglyon avatar sglyon commented on May 21, 2024

So the deep merge seems to work.

How could I extend the :t map (i.e. what did you mean by "it is closed")?

from proton.

dvcrn avatar dvcrn commented on May 21, 2024

I mean, you want :p inside :t, don't you? So :p should be a element of the map thats assigned to :t.

In your example you define 2 root keys: :t and :p.

{:t {:category "toggles"}
   :p {:category "pomodoro"
       :s {:action "pomodoro:start"
           :title "Start Timer"}
       :a {:action "pomodoro:abort"
           :title "Abort Timer"}}}

It should be

{:t {:category "toggles"
     :p {:category "pomodoro"
         :s {:action "pomodoro:start"
             :title "Start Timer"}
         :a {:action "pomodoro:abort"
             :title "Abort Timer"}}}}

now :p is inside :t and the chain would be t -> p -> s for pomodoro start

from proton.

sglyon avatar sglyon commented on May 21, 2024

🤦 oh man that was a dumb mistake. Parifiner is cool, but I'm going to have to get used to it adding brackets in places.

Anyway, this is closed by #28

from proton.

dvcrn avatar dvcrn commented on May 21, 2024

Haha that's what I thought :)

You technically never really have to touch your brackets with Parinfer. Just indent it so the :p aligns with :category and it will change the brackets for you.

from proton.

Related Issues (20)

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.