/wasm-strwidth

WASM module for text display width

Primary LanguageCMIT LicenseMIT

Wasm-strWidth

Wasm module for string display width on vim.

Used by coc.nvim.

TODO: support setcellwidths() like vim for custom width table.

API

  • setAmbw(ambiguousAsDouble: number): void

    Consider ambiguous as double width when 1

  • strWidth(text: string): number

    Return display width of text.

Build

Requires wasi and wabt.

Change the SDK part in Makefile.

Run command:

make
node index.js

LICENSE

MIT