Skip to content

Milly/ddu-filter-kensaku

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

38 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ddu-filter-kensaku

license:MIT Vim doc

Denops 8.0.0 or above ddu.vim 11.0.0 or above

Migemo matcher filter for ddu.vim

Migemo を利用してローマ字入力により ddu.vim のアイテムから日本語文字列をマッチングします。

単語を空白で区切って入力することで AND 検索ができます。

例: roma nihongo で「... ローマ字 ... 日本語 ...」のような文にマッチします。

ddu-filter-kensaku

Required

以下のプラグインに依存します。

Installation

  1. Deno をインストールします。
  2. vim-plug などを利用してプラグインをインストールします。
Plug 'vim-denops/denops.vim'
Plug 'Shougo/ddu.vim'
Plug 'lambdalisue/kensaku.vim'
Plug 'Milly/ddu-filter-kensaku'

Configuration

ddu.vim の設定を行います。

call ddu#custom#patch_global('sourceOptions', #{
      \  _: #{
      \    matchers: ['matcher_kensaku'],
      \  },
      \})

" Option: Enable highlight matched text
call ddu#custom#patch_global('filterParams', #{
    \  matcher_kensaku: #{
    \    highlightMatched: 'Search',
    \  },
    \})

Type-safe Configuration

ddu.vim の TypeScript 設定ファイルで型安全に設定できます。

import { BaseConfig, type ConfigArguments } from "jsr:@shougo/ddu-vim/config";
import type { MatcherKensakuParams } from "jsr:@milly/ddu-filter-matcher-kensaku/types";

export class Config extends BaseConfig {
  override async config({ contextBuilder }: ConfigArguments) {
    contextBuilder.patchGlobal({
      filterParams: {
        matcher_kensaku: {
          highlightMatched: "Special",
        } satisfies MatcherKensakuParams,
      },
    });
  }
}
call ddu#custom#load_config("path/to/your/config.ts")

About

Migemo matcher for ddu.vim

Topics

Resources

License

Stars

Watchers

Forks