Skip to content

Add live-preview to Neovim plugin#27

Merged
alerque merged 3 commits into
masterfrom
preview
Dec 19, 2025
Merged

Add live-preview to Neovim plugin#27
alerque merged 3 commits into
masterfrom
preview

Conversation

@alerque
Copy link
Copy Markdown
Owner

@alerque alerque commented Oct 17, 2024

No description provided.

@github-actions
Copy link
Copy Markdown

🤠 Cargo bloat for toolchain stable-x86_64-unknown-linux-gnu 🤠

@@ Size breakdown @@

Size       215 B
Text size  215 B

No changes to crate sizes

Dependency tree
@@ Dependency tree @@
Count: 439

├─ clap v4.5.20
│  ├─ clap_builder v4.5.20
│  │  ├─ anstream v0.6.15 
│  │  ├─ anstyle v1.0.8
│  │  ├─ clap_lex v0.7.2
│  │  └─ strsim v0.11.1
│  └─ clap_derive v4.5.18 (proc-macro) 
├─ mlua v0.9.9
│  ├─ bstr v1.10.0
│  │  └─ memchr v2.7.4
│  ├─ mlua-sys v0.6.3
│  │  ├─ cc v1.1.30
│  │  │  └─ shlex v1.3.0
│  │  ├─ cfg-if v1.0.0
│  │  └─ pkg-config v0.3.31
│  ├─ mlua_derive v0.9.3 (proc-macro)
│  │  ├─ proc-macro2 v1.0.88 
│  │  ├─ quote v1.0.37 
│  │  └─ syn v2.0.79 
│  ├─ num-traits v0.2.19
│  │  └─ autocfg v1.4.0
│  ├─ once_cell v1.20.2
│  └─ rustc-hash v2.0.0
├─ pyo3 v0.22.5
│  ├─ cfg-if v1.0.0
│  ├─ indoc v2.0.5 (proc-macro)
│  ├─ libc v0.2.160
│  ├─ memoffset v0.9.1
│  │  └─ autocfg v1.4.0
│  ├─ once_cell v1.20.2
│  ├─ pyo3-ffi v0.22.5
│  │  ├─ libc v0.2.160
│  │  └─ pyo3-build-config v0.22.5
│  │     ├─ once_cell v1.20.2
│  │     └─ target-lexicon v0.12.16
│  ├─ pyo3-macros v0.22.5 (proc-macro)
│  │  ├─ proc-macro2 v1.0.88 
│  │  ├─ pyo3-macros-backend v0.22.5
│  │  │  ├─ heck v0.5.0
│  │  │  ├─ proc-macro2 v1.0.88 
│  │  │  ├─ pyo3-build-config v0.22.5 
│  │  │  ├─ quote v1.0.37 
│  │  │  └─ syn v2.0.79 
│  │  ├─ quote v1.0.37 
│  │  └─ syn v2.0.79 
│  ├─ unindent v0.2.3
│  └─ pyo3-build-config v0.22.5 
├─ regex v1.11.0
│  ├─ aho-corasick v1.1.3
│  │  └─ memchr v2.7.4
│  ├─ memchr v2.7.4
│  ├─ regex-automata v0.4.8
│  │  ├─ aho-corasick v1.1.3 
│  │  ├─ memchr v2.7.4
│  │  └─ regex-syntax v0.8.5
│  └─ regex-syntax v0.8.5
├─ strum v0.26.3
├─ strum_macros v0.26.4 (proc-macro)
│  ├─ heck v0.5.0
│  ├─ proc-macro2 v1.0.88 
│  ├─ quote v1.0.37 
│  ├─ rustversion v1.0.18 (proc-macro)
│  └─ syn v2.0.79 
├─ titlecase v3.3.0
│  └─ regex v1.11.0 
├─ unicode_titlecase v2.4.0
├─ wasm-bindgen v0.2.95
│  ├─ cfg-if v1.0.0
│  ├─ once_cell v1.20.2
│  └─ wasm-bindgen-macro v0.2.95 (proc-macro)
│     ├─ quote v1.0.37 
│     └─ wasm-bindgen-macro-support v0.2.95
│        ├─ proc-macro2 v1.0.88 
│        ├─ quote v1.0.37 
│        ├─ syn v2.0.79 
│        ├─ wasm-bindgen-backend v0.2.95
│        │  ├─ bumpalo v3.16.0
│        │  ├─ log v0.4.22
│        │  ├─ once_cell v1.20.2
│        │  ├─ proc-macro2 v1.0.88 
│        │  ├─ quote v1.0.37 
│        │  ├─ syn v2.0.79 
│        │  └─ wasm-bindgen-shared v0.2.95
│        └─ wasm-bindgen-shared v0.2.95
├─ clap_complete v4.5.33
│  └─ clap v4.5.20 
├─ clap_mangen v0.2.24
│  ├─ clap v4.5.20 
│  └─ roff v0.2.2
├─ strum_macros v0.26.4 (proc-macro) 
└─ vergen v8.3.2
   ├─ anyhow v1.0.89
   ├─ cargo_metadata v0.18.1
   │  ├─ camino v1.1.9
   │  │  └─ serde v1.0.210
   │  │     └─ serde_derive v1.0.210 (proc-macro)
   │  │        ├─ proc-macro2 v1.0.88 
   │  │        ├─ quote v1.0.37 
   │  │        └─ syn v2.0.79 
   │  ├─ cargo-platform v0.1.8
   │  │  └─ serde v1.0.210 
   │  ├─ semver v1.0.23
   │  │  └─ serde v1.0.210 
   │  ├─ serde v1.0.210 
   │  ├─ serde_json v1.0.128
   │  │  ├─ itoa v1.0.11
   │  │  ├─ memchr v2.7.4
   │  │  ├─ ryu v1.0.18
   │  │  └─ serde v1.0.210 
   │  └─ thiserror v1.0.64
   │     └─ thiserror-impl v1.0.64 (proc-macro)
   │        ├─ proc-macro2 v1.0.88 
   │        ├─ quote v1.0.37 
   │        └─ syn v2.0.79 
   ├─ cfg-if v1.0.0
   ├─ gix v0.63.0
   │  ├─ gix-actor v0.31.5
   │  │  ├─ bstr v1.10.0
   │  │  │  ├─ memchr v2.7.4
   │  │  │  └─ regex-automata v0.4.8
   │  │  │     ├─ aho-corasick v1.1.3 
   │  │  │     ├─ memchr v2.7.4
   │  │  │     └─ regex-syntax v0.8.5
   │  │  ├─ gix-date v0.8.7
   │  │  │  ├─ bstr v1.10.0 
   │  │  │  ├─ itoa v1.0.11
   │  │  │  ├─ thiserror v1.0.64 
   │  │  │  └─ time v0.3.36
   │  │  │     ├─ deranged v0.3.11
   │  │  │     │  └─ powerfmt v0.2.0
   │  │  │     ├─ itoa v1.0.11
   │  │  │     ├─ libc v0.2.160
   │  │  │     ├─ num-conv v0.1.0
   │  │  │     ├─ num_threads v0.1.7
   │  │  │     ├─ powerfmt v0.2.0
   │  │  │     ├─ time-core v0.1.2
   │  │  │     └─ time-macros v0.2.18 (proc-macro)
   │  │  │        ├─ num-conv v0.1.0
   │  │  │        └─ time-core v0.1.2
   │  │  ├─ gix-utils v0.1.12
   │  │  │  ├─ fastrand v2.1.1
   │  │  │  └─ unicode-normalization v0.1.24
   │  │  │     └─ tinyvec v1.8.0
   │  │  │        └─ tinyvec_macros v0.1.1
   │  │  ├─ itoa v1.0.11
   │  │  ├─ thiserror v1.0.64 
   │  │  └─ winnow v0.6.20
   │  │     └─ memchr v2.7.4
   │  ├─ gix-commitgraph v0.24.3
   │  │  ├─ bstr v1.10.0 
   │  │  ├─ gix-chunk v0.4.8
   │  │  │  └─ thiserror v1.0.64 
   │  │  ├─ gix-features v0.38.2
   │  │  │  ├─ crc32fast v1.4.2
   │  │  │  │  └─ cfg-if v1.0.0
   │  │  │  ├─ flate2 v1.0.34
   │  │  │  │  ├─ crc32fast v1.4.2 
   │  │  │  │  └─ miniz_oxide v0.8.0
   │  │  │  │     └─ adler2 v2.0.0
   │  │  │  ├─ gix-hash v0.14.2
   │  │  │  │  ├─ faster-hex v0.9.0
   │  │  │  │  └─ thiserror v1.0.64 
   │  │  │  ├─ gix-trace v0.1.10
   │  │  │  ├─ gix-utils v0.1.12 
   │  │  │  ├─ libc v0.2.160
   │  │  │  ├─ once_cell v1.20.2
   │  │  │  ├─ prodash v28.0.0
   │  │  │  ├─ sha1_smol v1.0.1
   │  │  │  ├─ thiserror v1.0.64 
   │  │  │  └─ walkdir v2.5.0
   │  │  │     └─ same-file v1.0.6
   │  │  ├─ gix-hash v0.14.2 
   │  │  ├─ memmap2 v0.9.5
   │  │  │  └─ libc v0.2.160
   │  │  └─ thiserror v1.0.64 
   │  ├─ gix-config v0.37.0
   │  │  ├─ bstr v1.10.0 
   │  │  ├─ gix-config-value v0.14.8
   │  │  │  ├─ bitflags v2.6.0
   │  │  │  ├─ bstr v1.10.0 
   │  │  │  ├─ gix-path v0.10.11
   │  │  │  │  ├─ bstr v1.10.0 
   │  │  │  │  ├─ gix-trace v0.1.10
   │  │  │  │  ├─ home v0.5.9
   │  │  │  │  ├─ once_cell v1.20.2
   │  │  │  │  └─ thiserror v1.0.64 
   │  │  │  ├─ libc v0.2.160
   │  │  │  └─ thiserror v1.0.64 
   │  │  ├─ gix-features v0.38.2 
   │  │  ├─ gix-glob v0.16.5
   │  │  │  ├─ bitflags v2.6.0
   │  │  │  ├─ bstr v1.10.0 
   │  │  │  ├─ gix-features v0.38.2 
   │  │  │  └─ gix-path v0.10.11 
   │  │  ├─ gix-path v0.10.11 
   │  │  ├─ gix-ref v0.44.1
   │  │  │  ├─ gix-actor v0.31.5 
   │  │  │  ├─ gix-date v0.8.7 
   │  │  │  ├─ gix-features v0.38.2 
   │  │  │  ├─ gix-fs v0.11.3
   │  │  │  │  ├─ fastrand v2.1.1
   │  │  │  │  ├─ gix-features v0.38.2 
   │  │  │  │  └─ gix-utils v0.1.12 
   │  │  │  ├─ gix-hash v0.14.2 
   │  │  │  ├─ gix-lock v14.0.0
   │  │  │  │  ├─ gix-tempfile v14.0.2
   │  │  │  │  │  ├─ gix-fs v0.11.3 
   │  │  │  │  │  ├─ libc v0.2.160
   │  │  │  │  │  ├─ once_cell v1.20.2
   │  │  │  │  │  ├─ parking_lot v0.12.3
   │  │  │  │  │  │  ├─ lock_api v0.4.12
   │  │  │  │  │  │  │  ├─ scopeguard v1.2.0
   │  │  │  │  │  │  │  └─ autocfg v1.4.0
   │  │  │  │  │  │  └─ parking_lot_core v0.9.10
   │  │  │  │  │  │     ├─ cfg-if v1.0.0
   │  │  │  │  │  │     ├─ libc v0.2.160
   │  │  │  │  │  │     └─ smallvec v1.13.2
   │  │  │  │  │  ├─ signal-hook v0.3.17
   │  │  │  │  │  │  ├─ libc v0.2.160
   │  │  │  │  │  │  └─ signal-hook-registry v1.4.2
   │  │  │  │  │  │     └─ libc v0.2.160
   │  │  │  │  │  ├─ signal-hook-registry v1.4.2 
   │  │  │  │  │  └─ tempfile v3.13.0
   │  │  │  │  │     ├─ cfg-if v1.0.0
   │  │  │  │  │     ├─ fastrand v2.1.1
   │  │  │  │  │     ├─ once_cell v1.20.2
   │  │  │  │  │     └─ rustix v0.38.37
   │  │  │  │  │        ├─ bitflags v2.6.0
   │  │  │  │  │        └─ linux-raw-sys v0.4.14
   │  │  │  │  ├─ gix-utils v0.1.12 
   │  │  │  │  └─ thiserror v1.0.64 
   │  │  │  ├─ gix-object v0.42.3
   │  │  │  │  ├─ bstr v1.10.0 
   │  │  │  │  ├─ gix-actor v0.31.5 
   │  │  │  │  ├─ gix-date v0.8.7 
   │  │  │  │  ├─ gix-features v0.38.2 
   │  │  │  │  ├─ gix-hash v0.14.2 
   │  │  │  │  ├─ gix-utils v0.1.12 
   │  │  │  │  ├─ gix-validate v0.8.5
   │  │  │  │  │  ├─ bstr v1.10.0 
   │  │  │  │  │  └─ thiserror v1.0.64 
   │  │  │  │  ├─ itoa v1.0.11
   │  │  │  │  ├─ smallvec v1.13.2
   │  │  │  │  ├─ thiserror v1.0.64 
   │  │  │  │  └─ winnow v0.6.20 
   │  │  │  ├─ gix-path v0.10.11 
   │  │  │  ├─ gix-tempfile v14.0.2 
   │  │  │  ├─ gix-utils v0.1.12 
   │  │  │  ├─ gix-validate v0.8.5 
   │  │  │  ├─ memmap2 v0.9.5 
   │  │  │  ├─ thiserror v1.0.64 
   │  │  │  └─ winnow v0.6.20 
   │  │  ├─ gix-sec v0.10.8
   │  │  │  ├─ bitflags v2.6.0
   │  │  │  └─ libc v0.2.160
   │  │  ├─ memchr v2.7.4
   │  │  ├─ once_cell v1.20.2
   │  │  ├─ smallvec v1.13.2
   │  │  ├─ thiserror v1.0.64 
   │  │  ├─ unicode-bom v2.0.3
   │  │  └─ winnow v0.6.20 
   │  ├─ gix-date v0.8.7 
   │  ├─ gix-diff v0.44.1
   │  │  ├─ bstr v1.10.0 
   │  │  ├─ gix-hash v0.14.2 
   │  │  ├─ gix-object v0.42.3 
   │  │  └─ thiserror v1.0.64 
   │  ├─ gix-discover v0.32.0
   │  │  ├─ bstr v1.10.0 
   │  │  ├─ gix-fs v0.11.3 
   │  │  ├─ gix-hash v0.14.2 
   │  │  ├─ gix-path v0.10.11 
   │  │  ├─ gix-ref v0.44.1 
   │  │  ├─ gix-sec v0.10.8 
   │  │  └─ thiserror v1.0.64 
   │  ├─ gix-features v0.38.2 
   │  ├─ gix-fs v0.11.3 
   │  ├─ gix-glob v0.16.5 
   │  ├─ gix-hash v0.14.2 
   │  ├─ gix-hashtable v0.5.2
   │  │  ├─ gix-hash v0.14.2 
   │  │  ├─ hashbrown v0.14.5
   │  │  │  ├─ ahash v0.8.11
   │  │  │  │  ├─ cfg-if v1.0.0
   │  │  │  │  ├─ once_cell v1.20.2
   │  │  │  │  ├─ zerocopy v0.7.35
   │  │  │  │  └─ version_check v0.9.5
   │  │  │  └─ allocator-api2 v0.2.18
   │  │  └─ parking_lot v0.12.3 
   │  ├─ gix-index v0.33.1
   │  │  ├─ bitflags v2.6.0
   │  │  ├─ bstr v1.10.0 
   │  │  ├─ filetime v0.2.25
   │  │  │  ├─ cfg-if v1.0.0
   │  │  │  └─ libc v0.2.160
   │  │  ├─ fnv v1.0.7
   │  │  ├─ gix-bitmap v0.2.11
   │  │  │  └─ thiserror v1.0.64 
   │  │  ├─ gix-features v0.38.2 
   │  │  ├─ gix-fs v0.11.3 
   │  │  ├─ gix-hash v0.14.2 
   │  │  ├─ gix-lock v14.0.0 
   │  │  ├─ gix-object v0.42.3 
   │  │  ├─ gix-traverse v0.39.2
   │  │  │  ├─ bitflags v2.6.0
   │  │  │  ├─ gix-commitgraph v0.24.3 
   │  │  │  ├─ gix-date v0.8.7 
   │  │  │  ├─ gix-hash v0.14.2 
   │  │  │  ├─ gix-hashtable v0.5.2 
   │  │  │  ├─ gix-object v0.42.3 
   │  │  │  ├─ gix-revwalk v0.13.2
   │  │  │  │  ├─ gix-commitgraph v0.24.3 
   │  │  │  │  ├─ gix-date v0.8.7 
   │  │  │  │  ├─ gix-hash v0.14.2 
   │  │  │  │  ├─ gix-hashtable v0.5.2 
   │  │  │  │  ├─ gix-object v0.42.3 
   │  │  │  │  ├─ smallvec v1.13.2
   │  │  │  │  └─ thiserror v1.0.64 
   │  │  │  ├─ smallvec v1.13.2
   │  │  │  └─ thiserror v1.0.64 
   │  │  ├─ gix-utils v0.1.12 
   │  │  ├─ gix-validate v0.8.5 
   │  │  ├─ hashbrown v0.14.5 
   │  │  ├─ itoa v1.0.11
   │  │  ├─ libc v0.2.160
   │  │  ├─ memmap2 v0.9.5 
   │  │  ├─ rustix v0.38.37 
   │  │  ├─ smallvec v1.13.2
   │  │  └─ thiserror v1.0.64 
   │  ├─ gix-lock v14.0.0 
   │  ├─ gix-macros v0.1.5 (proc-macro)
   │  │  ├─ proc-macro2 v1.0.88 
   │  │  ├─ quote v1.0.37 
   │  │  └─ syn v2.0.79 
   │  ├─ gix-object v0.42.3 
   │  ├─ gix-odb v0.61.1
   │  │  ├─ arc-swap v1.7.1
   │  │  ├─ gix-date v0.8.7 
   │  │  ├─ gix-features v0.38.2 
   │  │  ├─ gix-fs v0.11.3 
   │  │  ├─ gix-hash v0.14.2 
   │  │  ├─ gix-object v0.42.3 
   │  │  ├─ gix-pack v0.51.1
   │  │  │  ├─ clru v0.6.2
   │  │  │  ├─ gix-chunk v0.4.8 
   │  │  │  ├─ gix-features v0.38.2 
   │  │  │  ├─ gix-hash v0.14.2 
   │  │  │  ├─ gix-hashtable v0.5.2 
   │  │  │  ├─ gix-object v0.42.3 
   │  │  │  ├─ gix-path v0.10.11 
   │  │  │  ├─ memmap2 v0.9.5 
   │  │  │  ├─ smallvec v1.13.2
   │  │  │  └─ thiserror v1.0.64 
   │  │  ├─ gix-path v0.10.11 
   │  │  ├─ gix-quote v0.4.12
   │  │  │  ├─ bstr v1.10.0 
   │  │  │  ├─ gix-utils v0.1.12 
   │  │  │  └─ thiserror v1.0.64 
   │  │  ├─ parking_lot v0.12.3 
   │  │  ├─ tempfile v3.13.0 
   │  │  └─ thiserror v1.0.64 
   │  ├─ gix-pack v0.51.1 
   │  ├─ gix-path v0.10.11 
   │  ├─ gix-ref v0.44.1 
   │  ├─ gix-refspec v0.23.1
   │  │  ├─ bstr v1.10.0 
   │  │  ├─ gix-hash v0.14.2 
   │  │  ├─ gix-revision v0.27.2
   │  │  │  ├─ bstr v1.10.0 
   │  │  │  ├─ gix-date v0.8.7 
   │  │  │  ├─ gix-hash v0.14.2 
   │  │  │  ├─ gix-hashtable v0.5.2 
   │  │  │  ├─ gix-object v0.42.3 
   │  │  │  ├─ gix-revwalk v0.13.2 
   │  │  │  ├─ gix-trace v0.1.10
   │  │  │  └─ thiserror v1.0.64 
   │  │  ├─ gix-validate v0.8.5 
   │  │  ├─ smallvec v1.13.2
   │  │  └─ thiserror v1.0.64 
   │  ├─ gix-revision v0.27.2 
   │  ├─ gix-revwalk v0.13.2 
   │  ├─ gix-sec v0.10.8 
   │  ├─ gix-tempfile v14.0.2 
   │  ├─ gix-trace v0.1.10
   │  ├─ gix-traverse v0.39.2 
   │  ├─ gix-url v0.27.5
   │  │  ├─ bstr v1.10.0 
   │  │  ├─ gix-features v0.38.2 
   │  │  ├─ gix-path v0.10.11 
   │  │  ├─ home v0.5.9
   │  │  ├─ thiserror v1.0.64 
   │  │  └─ url v2.5.2
   │  │     ├─ form_urlencoded v1.2.1
   │  │     │  └─ percent-encoding v2.3.1
   │  │     ├─ idna v0.5.0
   │  │     │  ├─ unicode-bidi v0.3.17
   │  │     │  └─ unicode-normalization v0.1.24 
   │  │     └─ percent-encoding v2.3.1
   │  ├─ gix-utils v0.1.12 
   │  ├─ gix-validate v0.8.5 
   │  ├─ once_cell v1.20.2
   │  ├─ parking_lot v0.12.3 
   │  ├─ signal-hook v0.3.17 
   │  ├─ smallvec v1.13.2
   │  └─ thiserror v1.0.64 
   ├─ regex v1.11.0 
   ├─ time v0.3.36 
   └─ rustversion v1.0.18 (proc-macro)

Commit: e1c9821 (Compare with baseline commit)

@coveralls
Copy link
Copy Markdown

coveralls commented Oct 17, 2024

Pull Request Test Coverage Report for Build 11394400161

Details

  • 0 of 0 changed or added relevant lines in 0 files are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 0.0%

Totals Coverage Status
Change from base Build 11394223192: 0.0%
Covered Lines: 0
Relevant Lines: 0

💛 - Coveralls

@alerque alerque force-pushed the master branch 2 times, most recently from 21fa18a to 8cf748c Compare October 21, 2024 13:16
@alerque alerque marked this pull request as ready for review December 19, 2025 14:31
@alerque alerque requested a review from Copilot December 19, 2025 14:31
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds live-preview functionality to the Decasify Neovim plugin, allowing users to preview text case transformations before applying them. The implementation refactors the command handler to support both preview and execution modes, and extracts helper functions for better code organization.

Key changes:

  • Refactored helper functions to accept an explicit buffer parameter instead of using hardcoded 0
  • Added preview buffer support with a new replace_preview_buffer function
  • Extracted command logic into separate named functions for preview and completion

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread plugin/decasify.lua
Comment thread plugin/decasify.lua Outdated
@alerque alerque merged commit 3f04e25 into master Dec 19, 2025
26 of 27 checks passed
@alerque alerque deleted the preview branch December 19, 2025 14:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants