Skip to content

v1.0.0

Choose a tag to compare

@delphinus delphinus released this 12 Apr 07:30
· 14 commits to main since this release
76e06d8

luamigemo v1.0.0

Pure Lua migemo engine for LuaJIT — romaji to regex converter for Japanese text search.

Features

  • Romaji input to regex pattern conversion matching hiragana, katakana, and kanji
  • BSD-licensed dictionary bundled — works out of the box with zero configuration
  • PCRE and Vim regex dialect support (RXOP_PCRE / RXOP_VIM)
  • No vim.* dependency in core — runs on any LuaJIT environment
  • Singleton instance with dictionary caching for efficient repeated queries
  • Predictive search with camelCase-aware query parsing
  • Full/half-width and hiragana/katakana character conversion
  • :checkhealth luamigemo support for Neovim

Install

-- lazy.nvim
{ "delphinus/luamigemo" }
# LuaRocks
luarocks install luamigemo

Usage

local migemo = require "luamigemo"
local pattern = migemo.query(nil, "kensaku", migemo.RXOP_PCRE)
-- => (?:kensaku|けんさく|ケンサク|検索|...)

Acknowledgements

Ported from oguna/jsmigemo. Dictionary data from oguna/yet-another-migemo-dict (BSD 3-Clause).