本文整理汇总了TypeScript中@chemzqm/neovim.Neovim类的典型用法代码示例。如果您正苦于以下问题:TypeScript Neovim类的具体用法?TypeScript Neovim怎么用?TypeScript Neovim使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
在下文中一共展示了Neovim类的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的TypeScript代码示例。
示例1: echoMsg
function echoMsg(nvim: Neovim, msg: string, hl: string): void {
nvim.callTimer('coc#util#echo_messages', [hl, msg.split('\n')], true)
}
示例2:
beforeEach(async () => {
await helper.createDocument()
await nvim.call('feedkeys', [String.fromCharCode(27), 'in'])
})
示例3: it
it('should install extension', async () => {
await extensions.installExtensions(['coc-json', 'https://github.com/neoclide/coc-tsserver'])
let root = await nvim.call('coc#util#extension_root', [])
expect(root).toBeDefined()
})
示例4: it
it('should listen CocInstalled', () => {
nvim.emit('notification', 'VimEnter')
})
示例5: processId
public get processId(): Promise<number> {
if (!this.chanId) return null
return this.nvim.call('jobpid', this.chanId)
}
示例6: startCompletion
it('should return null when cursor line not equal option linenr', async () => {
await startCompletion()
await nvim.call('cursor', [2, 0])
let input = await completion.getResumeInput()
expect(input).toBeNull()
})
示例7: pumvisible
public async pumvisible(): Promise<boolean> {
let res = await this.nvim.call('pumvisible', []) as number
return res == 1
}
示例8: it
it('should echo multiple lines with truncate', async () => {
await workspace.echoLines(['a', 'b', 'd', 'e'], true)
let ch = await nvim.call('screenchar', [79, 1])
let s = String.fromCharCode(ch)
expect(s).toBe('a')
})
示例9: it
it('should echo lines', async () => {
await workspace.echoLines(['a', 'b'])
let ch = await nvim.call('screenchar', [79, 1])
let s = String.fromCharCode(ch)
expect(s).toBe('a')
})