Coder Social home page Coder Social logo

kmonadx's Introduction

Banner

kmonadx's People

Contributors

srithon avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

kmonadx's Issues

Make CLI set the exit code properly

Currently, the CLI prints out "Exit code would be ...". This was because of an issue with the exit() function terminating the program without running destructors, but this is easily solved.

Add support for contextual compile-time variables

At times, it would be nice to be able to refer to the environment of an alias or a key. One prominent example used in target_tutorial.kbdx is the &layer variable, which would resolve to the name of the layer within which an alias or key is defined. It could also be convenient to have an &key variable, which resolved to the key being mapped.

[some-layer]
[[private]]
exit-layer = (layer-rem &layer)

Support variable interpolation in buttons

The parser currently supports all types as rvalues, but the compiler only allows buttons outside of the [configuration] table. It would be really convenient if we could define variables and use them in buttons, like so:

[aliases]
tap-hold-delay = 250

[some-layer]
[[public]]
l = (tap-hold-next-release $tap-hold-delay @leader_next lmet)

The interpolation syntax itself is yet to be decided; should it be &tap-hold-delay to disambiguate from shell variable interpolation?

Support list lvalues in [[keys]] assignments

Sometimes, you may want to have two keys do the same thing. Currently, the best way to achieve this behavior is to abstract the functionality into an alias, and have both keys execute that alias. However, it would be cleaner if instead, we could just set the values of both keys simultaneously, like so:

{ X, Y } = 'A'

Create custom syntax highlighting rules for kbdx

Currently, the TOML syntax highlighting on GitHub is flagging all of the unquoted rvalues red, as they would not be valid TOML syntax.

Screenshot_20210628_080110

This is valid syntax in kbdx, so we need to add custom rules to make sure our documents get highlighted properly.
Another issue that could come about is tap macro syntactic sugar being interpreted as comments, since they are prefixed with a hash symbol.
This is currently being masked by the red highlighting from the first issue, but after that is fixed it will likely become a problem.
Custom highlighting rules would fix both of these

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.