neoclide / wasm-strwidth

WASM module for text display width

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

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

About

WASM module for text display width

License:MIT License


Languages

Language:C 93.0%Language:JavaScript 4.3%Language:Makefile 2.6%