Skip to content

Latest commit

 

History

History
34 lines (19 loc) · 567 Bytes

Readme.md

File metadata and controls

34 lines (19 loc) · 567 Bytes

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