Skip to content

Commit

Permalink
Split modalkit into multiple crates in workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
ulyssa committed Feb 1, 2024
1 parent 0f50356 commit fd40c09
Show file tree
Hide file tree
Showing 74 changed files with 1,756 additions and 1,706 deletions.
49 changes: 18 additions & 31 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,42 +1,29 @@
[package]
name = "modalkit"
version = "0.0.16"
edition = "2018"
[workspace]
members = [ "crates/*" ]
default-members = [ "crates/*" ]
resolver = "2"

[workspace.package]
authors = ["Ulyssa <[email protected]>"]
repository = "https://github.com/ulyssa/modalkit"
homepage = "https://github.com/ulyssa/modalkit"
readme = "README.md"
description = "A library for building applications that use modal editing"
license = "Apache-2.0"
exclude = [".github", "CONTRIBUTING.md"]
keywords = ["modal", "readline", "tui", "vim"]
categories = ["command-line-interface", "text-editors"]
edition = "2018"
rust-version = "1.67"

[features]
default = ["readline", "widgets"]
readline = ["intervaltree"]
widgets = ["tui", "intervaltree"]
[workspace.dependencies.keybindings]
path = "crates/keybindings"

[dependencies]
anymap2 = "0.13.0"
arboard = "3.2.0"
derive_more = "0.99.16"
thiserror = "^1.0.37"
[workspace.dependencies.modalkit]
path = "crates/modalkit"

[workspace.dependencies]
bitflags = "2.4.2"
crossterm = "0.27"
intervaltree = { version = "0.2.6" }
libc = "0.2"
tui = { version = "0.23", optional = true, package = "ratatui" }
intervaltree = { version = "0.2.6", optional = true }
bitflags = "2.4.2"
nom = "7.0.0"
radix_trie = "0.2.1"
rand = "0.8.4"
regex = "^1.5"
ropey = "1.5.0"
serde = { version = "^1.0", features = ["derive"] }
textwrap = "^0.16"
temp-dir = "0.1.11"
thiserror = "^1.0.37"
unicode-segmentation = "^1.7"
unicode-width = "0.1.10"

[dev-dependencies]
rand = "0.8.4"
temp-dir = "0.1.11"
16 changes: 16 additions & 0 deletions crates/keybindings/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
[package]
name = "keybindings"
version = "0.0.1"
homepage = "https://github.com/ulyssa/modalkit/tree/main/crates/keybindings"
keywords = ["modal", "keybindings"]

edition.workspace = true
authors.workspace = true
repository.workspace = true
license.workspace = true
rust-version.workspace = true

[dependencies]
textwrap = "^0.16"
unicode-segmentation = { workspace = true }
unicode-width = { workspace = true }
33 changes: 33 additions & 0 deletions crates/keybindings/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
# keybindings

[![Build Status](https://github.com/ulyssa/modalkit/actions/workflows/ci.yml/badge.svg)](https://github.com/ulyssa/modalkit/actions?query=workflow%3ACI+)
[![License: Apache 2.0](https://img.shields.io/crates/l/keybindings.svg?logo=apache)](https://crates.io/crates/keybindings)
[![#modalkit:0x.badd.cafe](https://img.shields.io/badge/matrix-%23modalkit:0x.badd.cafe-blue)](https://matrix.to/#/#modalkit:0x.badd.cafe)
[![Latest Version](https://img.shields.io/crates/v/keybindings.svg?logo=rust)](https://crates.io/crates/keybindings)
[![Docs Status](https://docs.rs/keybindings/badge.svg)](https://docs.rs/crate/keybindings/)

## About

This crate provides environment-agnostic interfaces for tracking and processing
keybindings in different modes, and can be used to build applications with
modal input.

See [modalkit] for an example of using this crate to implement Vim and Emacs
keybindings.

## Usage

This crate can be used by adding `keybindings` to your dependencies in your
project's `Cargo.toml`.

```toml
[dependencies]
modalkit = "0.0.16"
```

## License

`modalkit` is released under the [Apache License, Version 2.0].

[Apache License, Version 2.0]: https://github.com/ulyssa/modalkit/blob/master/LICENSE
[modalkit]: https://docs.rs/modalkit/latest/modalkit/
File renamed without changes.
Loading

0 comments on commit fd40c09

Please sign in to comment.