本文整理匯總了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')
})