Skip to content

tar80/snacks-source-migemo.nvim

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

snacks-source-migemo.nvim

A custom source for snacks.picker that enables Japanese live searching using Romaji via C-Migemo.

Note

This plugin is a custom extension built by modifying the original grep source code from snacks.picker.

Requirements

  • Neovim >= 0.13.0
  • C-Migemo (compiled library and dictionary files)
  • ripgrep (must be installed and available in your PATH)

Installation & Configuration

1. Register the Source

You need to initialize the plugin by passing the paths to your migemo library and dictionary, then assign it to the snacks.picker sources configuration.

local sources = require('snacks.picker.config.sources')

-- Initialize snacks-source-migemo
-- Provide the absolute paths to your C-Migemo library and dictionary.
sources.migemo = require('snacks-source-migemo').setup('/path/to/libmigemo', '/path/to/migemo-dict')

if not sources.migemo then
    error('Failed to initialize migemo.')
end

2. Configure snacks.nvim

Add the migemo source configurations inside your snacks.nvim setup call.

require('snacks').setup({
  picker = {
    sources = {
      migemo = {
        format = 'file',
        regex = true,
        show_empty = false,
        live = true,
        support_live = true,
        exclude = { 'node_modules', '.git' },
      },
    }
  }
})

Usage

You can run the custom Migemo live grep picker using the standard snacks.picker API:

:lua Snacks.picker.migemo({cwd = 'path/to/search/directory'})

About

Source for using migemo with snacks.picker

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages