elm-oracle


Ⅰ. 插件描述

Query for information about values in elm source files.

Ⅱ. 基本信息

创建日期:  2015-07-06
使用用户:  1
Github星:  150
插件作者:  ElmCast

Ⅲ. 安装方法

使用Vundle管理器安装

在你的.vimrc下添加:
Plugin 'elmcast/elm-oracle'
… 然后在Vim中运行以下命令:
:source %
:PluginInstall

对于Vundle版本 < 0.10.2,请用上面的Bundle替换Plugin。

使用NeoBundle管理器安装

在你的.vimrc下添加:
NeoBundle 'elmcast/elm-oracle'
… 然后在Vim中运行以下命令:
:source %
:NeoBundleInstall

使用VimPlug管理器安装

在你的.vimrc下添加:
Plug 'elmcast/elm-oracle'
… 然后在Vim中运行以下命令:
:source %
:PlugInstall

使用Pathogen管理器安装

在终端中运行以下命令:
cd ~/.vim/bundle
git clone https://github.com/elmcast/elm-oracle

Ⅳ. 文档说明

# elm-oracle

Elm Oracle intends to be a standalone program that can be used by all editor plugins to query information about a project's source code.

Installation

You need node to install and run elm-oracle.

npm install -g elm-oracle

Usage

elm-oracle FILE query
  Query for information about a token in an Elm file.

Available options:
  -h,--help                    Show this help text.

The return value will be a json array of json objects with information for each value that starts with the query string.

elm-oracle Main.elm Signal.message might return:

[
    {
        "name": "message",
        "fullName": "Signal.message",
        "href": "http://package.elm-lang.org/packages/elm-lang/core/latest/Signal#message",
        "signature": "Address a -> a -> Message",
        "comment": "Create a message that may be sent to a `Mailbox` at a later time.\n\nMost importantly, this lets us create APIs that can send values to ports\n*without* allowing people to run arbitrary tasks."
    }
]

Whereas elm-oracle Main.elm Signal.m might include Signal.mailbox, Signal.map, etc.

If elm-oracle encounters errors, it will return a json array or json objects like:

[{"error": "You did not supply a source file or query."}]

Projects that use elm-oracle

添加新评论