Omochice / tataku.vim

MIT License
4 stars 0 forks source link
denops

tataku.vim

Introduction

tataku.vim define protocol between collector-processor, processor-processor, processor-emitter.

This plugin make easily to create plugin like call web API.

Contents

Dependencies

This plugin needs:

Terms

tataku.vim has some recipes define by user.

Recipe must have three parts.

Recipe must be below format:

{
\  "collector": { "name": string, "options": dict, },
\  "processor": { "name": string, "options": dict, }[],
\  "emitter": { "name": string, "options": dict, },
\ }

"Collector" and "Emitter" can be specified only one module. But "Processor" can be specified multiply.

Each module have two keys.

Function

Variables

Operator

If set v:true to g:tataku_enable_operator, The operator mappings will be enable.

The mappings starts with <Plug>(operator-tataku-.

If you registered foo and bar into g:tataku_recipes, <Plug>(operator-tataku-foo) and <Plug>(operator-tataku-bar) will be enabled.

NOTE: If call recipe via operator, collector module is ignored and use motion/textobj instead of its.

For developer

This section explain how to create module.

When call recipe, tataku.vim import module from denops/@tataku/<module-type>/<module-name>.ts within &runtimepath.

The module must export function as default. The function must return correspoinding stream: