UNPKG

@chemzqm/neovim

Version:

NodeJS client API for vim8 and neovim

28 lines (27 loc) 823 B
/// <reference types="node" /> import { Neovim } from '../api/Neovim'; import { NvimPlugin } from './NvimPlugin'; export interface IModule { new (name: string): any; _resolveFilename: (file: string, context: any) => string; _extensions: {}; _cache: { [file: string]: any; }; _compile: () => void; wrap: (content: string) => string; require: (file: string) => NodeModule; _nodeModulePaths: (filename: string) => string[]; } export declare type LoadPluginOptions = { cache?: boolean; }; export interface ISandbox { process: NodeJS.Process; module: NodeModule; require: (p: string) => any; console: { [key in keyof Console]?: Function; }; } export declare function loadPlugin(filename: string, nvim: Neovim, options?: LoadPluginOptions): NvimPlugin;