neovim-client
Version:
Neovim client library
134 lines (132 loc) • 9.61 kB
TypeScript
export default function attach(writer: NodeJS.WritableStream, reader: NodeJS.ReadableStream, cb: (err: Error, nvim: Nvim) => void): void;
export interface Nvim extends NodeJS.EventEmitter {
quit(): void;
bufLineCount(buffer: (err: Error, res: number) => void, cb: (err: Error, res: number) => void): void;
bufGetLines(buffer: number, start: number, end: boolean, strict_indexing: (err: Error, res: Array<string>) => void, cb: (err: Error, res: Array<string>) => void): void;
bufSetLines(buffer: number, start: number, end: boolean, strict_indexing: Array<string>, replacement: (err: Error) => void, cb: (err: Error) => void): void;
bufGetVar(buffer: string, name: (err: Error, res: Object) => void, cb: (err: Error, res: Object) => void): void;
bufSetVar(buffer: string, name: Object, value: (err: Error, res: Object) => void, cb: (err: Error, res: Object) => void): void;
bufDelVar(buffer: string, name: (err: Error, res: Object) => void, cb: (err: Error, res: Object) => void): void;
bufGetOption(buffer: string, name: (err: Error, res: Object) => void, cb: (err: Error, res: Object) => void): void;
bufSetOption(buffer: string, name: Object, value: (err: Error) => void, cb: (err: Error) => void): void;
bufGetNumber(buffer: (err: Error, res: number) => void, cb: (err: Error, res: number) => void): void;
bufGetName(buffer: (err: Error, res: string) => void, cb: (err: Error, res: string) => void): void;
bufSetName(buffer: string, name: (err: Error) => void, cb: (err: Error) => void): void;
bufIsValid(buffer: (err: Error, res: boolean) => void, cb: (err: Error, res: boolean) => void): void;
bufGetMark(buffer: string, name: (err: Error, res: Array<number>) => void, cb: (err: Error, res: Array<number>) => void): void;
bufAddHighlight(buffer: number, src_id: string, hl_group: number, line: number, col_start: number, col_end: (err: Error, res: number) => void, cb: (err: Error, res: number) => void): void;
bufClearHighlight(buffer: number, src_id: number, line_start: number, line_end: (err: Error) => void, cb: (err: Error) => void): void;
tabpageGetWindows(tabpage: (err: Error, res: Array<Window>) => void, cb: (err: Error, res: Array<Window>) => void): void;
tabpageGetVar(tabpage: string, name: (err: Error, res: Object) => void, cb: (err: Error, res: Object) => void): void;
tabpageSetVar(tabpage: string, name: Object, value: (err: Error, res: Object) => void, cb: (err: Error, res: Object) => void): void;
tabpageDelVar(tabpage: string, name: (err: Error, res: Object) => void, cb: (err: Error, res: Object) => void): void;
tabpageGetWindow(tabpage: (err: Error, res: Window) => void, cb: (err: Error, res: Window) => void): void;
tabpageIsValid(tabpage: (err: Error, res: boolean) => void, cb: (err: Error, res: boolean) => void): void;
uiAttach(width: number, height: number, enable_rgb: boolean, cb: (err: Error) => void): void;
uiDetach(cb: (err: Error) => void): void;
uiTryResize(width: number, height: number, cb: (err: Error) => void): void;
uiSetOption(name: Object, value: (err: Error) => void, cb: (err: Error) => void): void;
command(str: string, cb: (err: Error) => void): void;
feedkeys(keys: string, mode: string, escape_csi: boolean, cb: (err: Error) => void): void;
input(keys: string, cb: (err: Error, res: number) => void): void;
replaceTermcodes(str: string, from_part: boolean, do_lt: boolean, special: boolean, cb: (err: Error, res: string) => void): void;
commandOutput(str: string, cb: (err: Error, res: string) => void): void;
eval(str: string, cb: (err: Error, res: Object) => void): void;
callFunction(fname: string, args: Array<any>, cb: (err: Error, res: Object) => void): void;
strwidth(str: string, cb: (err: Error, res: number) => void): void;
listRuntimePaths(cb: (err: Error, res: Array<string>) => void): void;
changeDirectory(dir: string, cb: (err: Error) => void): void;
getCurrentLine(cb: (err: Error, res: string) => void): void;
setCurrentLine(line: string, cb: (err: Error) => void): void;
delCurrentLine(cb: (err: Error) => void): void;
getVar(name: string, cb: (err: Error, res: Object) => void): void;
setVar(name: string, value: Object, cb: (err: Error, res: Object) => void): void;
delVar(name: string, cb: (err: Error, res: Object) => void): void;
getVvar(name: string, cb: (err: Error, res: Object) => void): void;
getOption(name: string, cb: (err: Error, res: Object) => void): void;
setOption(name: string, value: Object, cb: (err: Error) => void): void;
outWrite(str: string, cb: (err: Error) => void): void;
errWrite(str: string, cb: (err: Error) => void): void;
reportError(str: string, cb: (err: Error) => void): void;
getBuffers(cb: (err: Error, res: Array<Buffer>) => void): void;
getCurrentBuffer(cb: (err: Error, res: Buffer) => void): void;
setCurrentBuffer(buffer: Buffer, cb: (err: Error) => void): void;
getWindows(cb: (err: Error, res: Array<Window>) => void): void;
getCurrentWindow(cb: (err: Error, res: Window) => void): void;
setCurrentWindow(window: Window, cb: (err: Error) => void): void;
getTabpages(cb: (err: Error, res: Array<Tabpage>) => void): void;
getCurrentTabpage(cb: (err: Error, res: Tabpage) => void): void;
setCurrentTabpage(tabpage: Tabpage, cb: (err: Error) => void): void;
subscribe(event: string, cb: (err: Error) => void): void;
unsubscribe(event: string, cb: (err: Error) => void): void;
nameToColor(name: string, cb: (err: Error, res: number) => void): void;
getColorMap(cb: (err: Error, res: {}) => void): void;
getApiInfo(cb: (err: Error, res: Array<any>) => void): void;
winGetBuffer(window: (err: Error, res: Buffer) => void, cb: (err: Error, res: Buffer) => void): void;
winGetCursor(window: (err: Error, res: Array<number>) => void, cb: (err: Error, res: Array<number>) => void): void;
winSetCursor(window: Array<number>, pos: (err: Error) => void, cb: (err: Error) => void): void;
winGetHeight(window: (err: Error, res: number) => void, cb: (err: Error, res: number) => void): void;
winSetHeight(window: number, height: (err: Error) => void, cb: (err: Error) => void): void;
winGetWidth(window: (err: Error, res: number) => void, cb: (err: Error, res: number) => void): void;
winSetWidth(window: number, width: (err: Error) => void, cb: (err: Error) => void): void;
winGetVar(window: string, name: (err: Error, res: Object) => void, cb: (err: Error, res: Object) => void): void;
winSetVar(window: string, name: Object, value: (err: Error, res: Object) => void, cb: (err: Error, res: Object) => void): void;
winDelVar(window: string, name: (err: Error, res: Object) => void, cb: (err: Error, res: Object) => void): void;
winGetOption(window: string, name: (err: Error, res: Object) => void, cb: (err: Error, res: Object) => void): void;
winSetOption(window: string, name: Object, value: (err: Error) => void, cb: (err: Error) => void): void;
winGetPosition(window: (err: Error, res: Array<number>) => void, cb: (err: Error, res: Array<number>) => void): void;
winGetTabpage(window: (err: Error, res: Tabpage) => void, cb: (err: Error, res: Tabpage) => void): void;
winIsValid(window: (err: Error, res: boolean) => void, cb: (err: Error, res: boolean) => void): void;
equals(rhs: Nvim): boolean;
}
export interface Buffer {
getLine(index: Buffer, cb: number): void;
setLine(index: Buffer, line: number, cb: string): void;
delLine(index: Buffer, cb: number): void;
getLineSlice(start: Buffer, end: number, include_start: number, include_end: boolean, cb: boolean): void;
setLineSlice(start: Buffer, end: number, include_start: number, include_end: boolean, replacement: boolean, cb: Array<string>): void;
insert(lnum: Buffer, lines: number, cb: Array<string>): void;
lineCount(cb: Buffer): void;
getLines(start: Buffer, end: number, strict_indexing: number, cb: boolean): void;
setLines(start: Buffer, end: number, strict_indexing: number, replacement: boolean, cb: Array<string>): void;
getVar(name: Buffer, cb: string): void;
setVar(name: Buffer, value: string, cb: Object): void;
delVar(name: Buffer, cb: string): void;
getOption(name: Buffer, cb: string): void;
setOption(name: Buffer, value: string, cb: Object): void;
getNumber(cb: Buffer): void;
getName(cb: Buffer): void;
setName(name: Buffer, cb: string): void;
isValid(cb: Buffer): void;
getMark(name: Buffer, cb: string): void;
addHighlight(src_id: Buffer, hl_group: number, line: string, col_start: number, col_end: number, cb: number): void;
clearHighlight(src_id: Buffer, line_start: number, line_end: number, cb: number): void;
equals(rhs: Buffer): boolean;
}
export interface Window {
getBuffer(cb: Window): void;
getCursor(cb: Window): void;
setCursor(pos: Window, cb: Array<number>): void;
getHeight(cb: Window): void;
setHeight(height: Window, cb: number): void;
getWidth(cb: Window): void;
setWidth(width: Window, cb: number): void;
getVar(name: Window, cb: string): void;
setVar(name: Window, value: string, cb: Object): void;
delVar(name: Window, cb: string): void;
getOption(name: Window, cb: string): void;
setOption(name: Window, value: string, cb: Object): void;
getPosition(cb: Window): void;
getTabpage(cb: Window): void;
isValid(cb: Window): void;
equals(rhs: Window): boolean;
}
export interface Tabpage {
getWindows(cb: Tabpage): void;
getVar(name: Tabpage, cb: string): void;
setVar(name: Tabpage, value: string, cb: Object): void;
delVar(name: Tabpage, cb: string): void;
getWindow(cb: Tabpage): void;
isValid(cb: Tabpage): void;
equals(rhs: Tabpage): boolean;
}