Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 7599a32

Browse files
committed
feat: version 0.1.0: convert a TOML snippets file to a VS Code snippets file
0 parents  commit 7599a32

File tree

7 files changed

+2248
-0
lines changed

7 files changed

+2248
-0
lines changed

.github/workflows/rust.yml

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Rust
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
8+
runs-on: ubuntu-latest
9+
10+
steps:
11+
- uses: actions/checkout@v2
12+
- name: Build
13+
run: cargo build --all-targets --all-features
14+
- name: Run tests
15+
run: cargo test --all-targets --all-features
16+
- name: Clippy
17+
run: cargo clippy --all-targets --all-features -- -D warnings -D clippy::all -D clippy::cargo
18+
- name: Check for correct formatting
19+
run: cargo fmt -- --check --files-with-diff

.gitignore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/target
2+
Cargo.lock
3+
.vscode
4+
/node_modules

Cargo.toml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
[package]
2+
name = "character-snippets"
3+
version = "0.1.0"
4+
authors = ["Bram Geron <[email protected]>"]
5+
edition = "2018"
6+
7+
description = "Convert a TOML file in a certain format to a Visual Studio Code snippets file. Contains many useful snippets by default."
8+
license = "MIT OR Apache-2.0"
9+
repository = "https://github.com/rusty-plasma/smallbigint"
10+
categories = ["command-line-utilities"]
11+
keywords = ["vscode", "snippet"]
12+
readme = "README.md"
13+
14+
15+
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html
16+
17+
[dependencies]
18+
toml = "0.5.6"
19+
serde = { version = "1.0", features = ["derive"] }
20+
clap = "2.33.0"
21+
structopt = "0.3.9"
22+
exitfailure = "0.5.1"
23+
failure = "0.1.6"
24+
log = "0.4.8"
25+
env_logger = "0.7.1"
26+
serde_json = "1.0.48"
27+
indexmap = { version = "1.3.0", features = ["serde-1"]}
28+
chrono = "0.4.10"

README.md

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
# Character-snippets
2+
3+
[![Docs.rs link](https://docs.rs/character-snippets/badge.svg)](https://docs.rs/character-snippets)
4+
[![Commitizen friendly](https://img.shields.io/badge/commitizen-friendly-brightgreen.svg)](http://commitizen.github.io/cz-cli/)
5+
6+
A small program that generates a Visual Studio Code snippets file from a TOML input file.
7+
8+
This is particularly useful for a file with snippets for Unicode characters.
9+
10+
The format of the input file should be as follows:
11+
12+
```toml
13+
[Snippets]
14+
xbrackets = "〚$1〛"
15+
xcheckbox = ""
16+
xchecked = ""
17+
xcheckmark = ""
18+
xch = ""
19+
```
20+
21+
Visual Studio Code will interpret variables such as `$1` as placeholders.
22+
23+
Output will be sent to standard output.
24+
25+
TODO document better
26+
27+
# License
28+
29+
This project is licensed under either of
30+
31+
* Apache License, Version 2.0, ([LICENSE-APACHE](LICENSE-APACHE) or
32+
http://www.apache.org/licenses/LICENSE-2.0)
33+
* MIT license ([LICENSE-MIT](LICENSE-MIT) or
34+
http://opensource.org/licenses/MIT)
35+
36+
at your option.
37+
38+
### Contribution
39+
40+
Unless you explicitly state otherwise, any contribution intentionally submitted
41+
for inclusion in toml-rs by you, as defined in the Apache-2.0 license, shall be
42+
dual licensed as above, without any additional terms or conditions.

0 commit comments

Comments
 (0)