Skip to main content
API module

workspace API

All 80 public APIs exported from the workspace module, with declarations, documentation, and source-backed examples.

Generated from typings/index.d.ts @ 555f5ceon

workspace

workspace.nvim

Type of pattern used by workspace folder.

Source

API signature

workspace.nvim: Neovim
Returns
Neovim
Declaration
typings/index.d.ts:10364
workspace

workspace.bufnr

Current buffer number, could be wrong since vim could not send autocmd as expected.

Deprecated will be removed in the feature.
Source

API signature

workspace.bufnr: number
Returns
number
Declaration
typings/index.d.ts:10371
workspace

workspace.document

Returns a Promise that resolves to the active buffer/document instance in Vim/Neovim.

Source

API signature

workspace.document: Promise<Document>

Example

import { workspace, ExtensionContext } from 'coc.nvim';

export async function activate(context: ExtensionContext) {
  // workspace.document returns a Promise, use await to get the active Document
  const doc = await workspace.document;
  if (doc) {
    console.log('Active document URI:', doc.uri);
    console.log('Language ID:', doc.filetype);
    console.log('Line count:', doc.lineCount);
  }
}
Returns
Promise<Document>
Declaration
typings/index.d.ts:10375
workspace

workspace.env

Environments or current (neo)vim.

Source

API signature

workspace.env: Env
Returns
Env
Declaration
typings/index.d.ts:10379
workspace

workspace.floatSupported

Float window or popup can work.

Source

API signature

workspace.floatSupported: boolean
Returns
boolean
Declaration
typings/index.d.ts:10383
workspace

workspace.cwd

Current working directory of vim.

Source

API signature

workspace.cwd: string
Returns
string
Declaration
typings/index.d.ts:10387
workspace

workspace.root

Current workspace root.

Source

API signature

workspace.root: string
Returns
string
Declaration
typings/index.d.ts:10391
workspace

workspace.rootPath

Field/Property workspace.rootPath exported by workspace.

Deprecated aliased to root.
Source

API signature

workspace.rootPath: string
Returns
string
Declaration
typings/index.d.ts:10395
workspace

workspace.isVim

Not neovim when true.

Source

API signature

workspace.isVim: boolean
Returns
boolean
Declaration
typings/index.d.ts:10399
workspace

workspace.isNvim

Is neovim when true.

Source

API signature

workspace.isNvim: boolean
Returns
boolean
Declaration
typings/index.d.ts:10403
workspace

workspace.filetypes

All filetypes of loaded documents.

Source

API signature

workspace.filetypes: ReadonlySet<string>
Returns
ReadonlySet<string>
Declaration
typings/index.d.ts:10407
workspace

workspace.languageIds

All languageIds of loaded documents.

Source

API signature

workspace.languageIds: ReadonlySet<string>
Returns
ReadonlySet<string>
Declaration
typings/index.d.ts:10411
workspace

workspace.pluginRoot

Root directory of coc.nvim

Source

API signature

workspace.pluginRoot: string
Returns
string
Declaration
typings/index.d.ts:10415
workspace

workspace.channelNames

Exists channel names.

Source

API signature

workspace.channelNames: ReadonlyArray<string>
Returns
ReadonlyArray<string>
Declaration
typings/index.d.ts:10419
workspace

workspace.documents

Loaded documents that attached.

Source

API signature

workspace.documents: ReadonlyArray<Document>
Returns
ReadonlyArray<Document>
Declaration
typings/index.d.ts:10423
workspace

workspace.textDocuments

Current document array.

Source

API signature

workspace.textDocuments: ReadonlyArray<LinesTextDocument>
Returns
ReadonlyArray<LinesTextDocument>
Declaration
typings/index.d.ts:10427
workspace

workspace.workspaceFolders

Current workspace folders.

Source

API signature

workspace.workspaceFolders: ReadonlyArray<WorkspaceFolder>
Returns
ReadonlyArray<WorkspaceFolder>
Declaration
typings/index.d.ts:10431
workspace

workspace.folderPaths

Directory paths of workspaceFolders.

Source

API signature

workspace.folderPaths: ReadonlyArray<string>
Returns
ReadonlyArray<string>
Declaration
typings/index.d.ts:10435
workspace

workspace.workspaceFolder

Current workspace folder, could be null when vim started from user's home.

Deprecated This API is deprecated.
Source

API signature

workspace.workspaceFolder: WorkspaceFolder | null
Returns
WorkspaceFolder | null
Declaration
typings/index.d.ts:10441
workspace

workspace.onDidCreateFiles

Field/Property workspace.onDidCreateFiles exported by workspace.

Source

API signature

workspace.onDidCreateFiles: Event<FileCreateEvent>
Declaration
typings/index.d.ts:10442
workspace

workspace.onDidRenameFiles

Field/Property workspace.onDidRenameFiles exported by workspace.

Source

API signature

workspace.onDidRenameFiles: Event<FileRenameEvent>
Declaration
typings/index.d.ts:10443
workspace

workspace.onDidDeleteFiles

Field/Property workspace.onDidDeleteFiles exported by workspace.

Source

API signature

workspace.onDidDeleteFiles: Event<FileDeleteEvent>
Declaration
typings/index.d.ts:10444
workspace

workspace.onDidOpenTextDocument

Event fired after document create.

Source

API signature

workspace.onDidOpenTextDocument: Event<LinesTextDocument & { bufnr: number }>
Returns
Event<LinesTextDocument & { bufnr: number }>
Declaration
typings/index.d.ts:10455
workspace

workspace.onDidCloseTextDocument

Event fired after document unload.

Source

API signature

workspace.onDidCloseTextDocument: Event<LinesTextDocument & { bufnr: number }>
Returns
Event<LinesTextDocument & { bufnr: number }>
Declaration
typings/index.d.ts:10459
workspace

workspace.onDidChangeConfiguration

Event fired on configuration change. Configuration change could by many reasons, including:

  • Changes detected from coc-settings.json.
  • Change to document that using another configuration file.
  • Configuration change by call update API of WorkspaceConfiguration.
Source

API signature

workspace.onDidChangeConfiguration: Event<ConfigurationChangeEvent>
Declaration
typings/index.d.ts:10481
workspace

workspace.onDidRuntimePathChange

Fired when vim's runtimepath change detected.

Source

API signature

workspace.onDidRuntimePathChange: Event<ReadonlyArray<string>>
Returns
Event<ReadonlyArray<string>>
Declaration
typings/index.d.ts:10486
workspace

workspace.asRelativePath

Returns a path that is relative to the workspace folder or folders.

When there are no workspace folders or when the path is not contained in them, the input is returned.

Source

API signature

workspace.asRelativePath(pathOrUri: string | Uri, includeWorkspaceFolder?: boolean): string

Parameters

ParameterTypeDescription
pathOrUristring | Uri

A path or uri. When a uri is given its fsPath is used.

includeWorkspaceFolder?boolean

When true and when the given path is contained inside a workspace folder the name of the workspace is prepended. Defaults to true when there are multiple workspace folders and false otherwise.

Returns
string

A path relative to the root or the input.

Declaration
typings/index.d.ts:10500
workspace

workspace.fixWin32unixFilepath

Returns converted unix path when the vim is built with win32unix enabled. Original fullpath is returned when the convert is not necessary. Only needed when the fullpath is passed vim directly.

Source

API signature

workspace.fixWin32unixFilepath(fullpath: string): string

Parameters

ParameterTypeDescription
fullpathstring

The filepath to fix, only windows absolute filepath is fixed.

Returns
string
Declaration
typings/index.d.ts:10508
workspace

workspace.openTextDocument

Opens a document. Will return early if this document is already open. Otherwise the document is loaded and the didOpen-event fires.

The document is denoted by an Uri. Depending on the scheme the following rules apply:

  • file-scheme: Open a file on disk (openTextDocument(Uri.file(path))). Will be rejected if the file does not exist or cannot be loaded.
  • untitled-scheme: Open a blank untitled file with associated path (openTextDocument(Uri.file(path).with({ scheme: 'untitled' }))). The language will be derived from the file name.
  • For all other schemes contributed TextDocumentContentProvider text document content providers and file system providers are consulted.

Note that the lifecycle of the returned document is owned by the editor and not by the extension. That means an onDidClose-event can occur at any time after opening it.

Source

Overloads (2)

  1. Signature 1
    workspace.openTextDocument(uri: Uri): Thenable<Document>
    uri: Uri

    Identifies the resource to open.

  2. Signature 2
    workspace.openTextDocument(fileName: string): Thenable<Document>
    fileName: string

    A name of a file on disk.

API signature

workspace.openTextDocument(uri: Uri): Thenable<Document>

Parameters

ParameterTypeDescription
uriUri

Identifies the resource to open.

Returns
Thenable<Document>

A promise that resolves to a document.

Declaration
typings/index.d.ts:10529
workspace

workspace.getDisplayWidth

Get display cell count of text on vim. Control character below 0x80 are considered as 1.

Source

API signature

workspace.getDisplayWidth(text: string, cache?: boolean): number

Parameters

ParameterTypeDescription
textstring

Text to display.

cache?boolean
Returns
number

The cells count.

Declaration
typings/index.d.ts:10547
workspace

workspace.has

Like vim's has(), but for version check only. Check patch on neovim and check nvim on vim would return false.

For example:

  • has('nvim-0.6.0')
  • has('patch-7.4.248')
Source

API signature

workspace.has(feature: string): boolean

Parameters

ParameterType
featurestring
Returns
boolean
Declaration
typings/index.d.ts:10557
workspace

workspace.registerAutocmd

Register autocmd on vim.

Note: avoid request autocmd when possible since vim could be blocked forever when request triggered during request.

Source

API signature

workspace.registerAutocmd(autocmd: Autocmd, disposables?: Disposable[]): Disposable

Parameters

ParameterType
autocmdAutocmd
disposables?Disposable[]
Returns
Disposable
Declaration
typings/index.d.ts:10565
workspace

workspace.watchOption

Watch for vim's global option change.

Source

API signature

workspace.watchOption(key: string, callback: (oldValue: any, newValue: any) => Thenable<void> | void, disposables?: Disposable[]): void

Parameters

ParameterType
keystring
callback(oldValue: any, newValue: any) => Thenable<void> | void
disposables?Disposable[]
Returns
void
Declaration
typings/index.d.ts:10570
workspace

workspace.watchGlobal

Watch for vim's global variable change, works on neovim only.

Source

API signature

workspace.watchGlobal(key: string, callback?: (oldValue: any, newValue: any) => Thenable<void> | void, disposables?: Disposable[]): void

Parameters

ParameterType
keystring
callback?(oldValue: any, newValue: any) => Thenable<void> | void
disposables?Disposable[]
Returns
void
Declaration
typings/index.d.ts:10575
workspace

workspace.findUp

Findup from filename or filenames from current filepath or root.

Source

API signature

workspace.findUp(filename: string | string[]): Promise<string | null>

Parameters

ParameterType
filenamestring | string[]
Returns
Promise<string | null>

fullpath of file or null when not found.

Declaration
typings/index.d.ts:10587
workspace

workspace.getWatchmanPath

Get possible watchman binary path.

Source

API signature

workspace.getWatchmanPath(): string | null
Returns
string | null
Declaration
typings/index.d.ts:10592
workspace

workspace.getConfiguration

Retrieve scoped user or workspace settings from coc-settings.json.

Source

API signature

workspace.getConfiguration(section?: string, scope?: ConfigurationScope): WorkspaceConfiguration

Example

import { workspace } from 'coc.nvim';

export function activate() {
  const config = workspace.getConfiguration('myextension');
  const isEnabled = config.get<boolean>('enable', true);
  console.log('Feature enabled:', isEnabled);
}

Parameters

ParameterType
section?string
scope?ConfigurationScope
Declaration
typings/index.d.ts:10597
workspace

workspace.resolveJSONSchema

Resolve internal json schema, uri should starts with vscode://

Source

API signature

workspace.resolveJSONSchema(uri: string): any

Parameters

ParameterType
uristring
Returns
any
Declaration
typings/index.d.ts:10602
workspace

workspace.getDocument

Get created document by uri or bufnr.

Source

API signature

workspace.getDocument(uri: number | string): Document | null | undefined

Parameters

ParameterType
urinumber | string
Returns
Document | null | undefined
Declaration
typings/index.d.ts:10606
workspace

workspace.applyEdit

Applies workspace file edits across open and unopened files using coc.nvim buffer handling.

Source

API signature

workspace.applyEdit(edit: WorkspaceEdit, metadata?: WorkspaceEditMetadata): Promise<boolean>

Example

import { workspace, WorkspaceEdit } from 'coc.nvim';

export async function activate() {
  const edit: WorkspaceEdit = {
    changes: {
      'file:///path/to/file.ts': [
        {
          range: { start: { line: 0, character: 0 }, end: { line: 0, character: 5 } },
          newText: 'const'
        }
      ]
    }
  };
  await workspace.applyEdit(edit);
}

Parameters

ParameterType
editWorkspaceEdit
metadata?WorkspaceEditMetadata
Returns
Promise<boolean>
Declaration
typings/index.d.ts:10611
workspace

workspace.getQuickfixItem

Convert location to quickfix item.

Source

API signature

workspace.getQuickfixItem(loc: Location | LocationLink, text?: string, type?: string, module?: string): Promise<QuickfixItem>

Parameters

ParameterType
locLocation | LocationLink
text?string
type?string
module?string
Returns
Promise<QuickfixItem>
Declaration
typings/index.d.ts:10616
workspace

workspace.getQuickfixList

Convert locations to quickfix list.

Source

API signature

workspace.getQuickfixList(locations: Location[]): Promise<ReadonlyArray<QuickfixItem>>

Parameters

ParameterType
locationsLocation[]
Returns
Promise<ReadonlyArray<QuickfixItem>>
Declaration
typings/index.d.ts:10621
workspace

workspace.showLocations

Populate locations to UI.

Source

API signature

workspace.showLocations(locations: Location[]): Promise<void>

Parameters

ParameterType
locationsLocation[]
Returns
Promise<void>
Declaration
typings/index.d.ts:10626
workspace

workspace.getLine

Get content of line by uri and line.

Source

API signature

workspace.getLine(uri: string, line: number): Promise<string>

Parameters

ParameterType
uristring
linenumber
Returns
Promise<string>
Declaration
typings/index.d.ts:10631
workspace

workspace.getWorkspaceFolder

Get WorkspaceFolder of uri

Source

API signature

workspace.getWorkspaceFolder(uri: string | Uri): WorkspaceFolder | undefined

Parameters

ParameterType
uristring | Uri
Returns
WorkspaceFolder | undefined
Declaration
typings/index.d.ts:10636
workspace

workspace.readFile

Get content from buffer or file by uri.

Source

API signature

workspace.readFile(uri: string): Promise<string>

Parameters

ParameterType
uristring
Returns
Promise<string>
Declaration
typings/index.d.ts:10641
workspace

workspace.getCurrentState

Get current document and position.

Source

API signature

workspace.getCurrentState(): Promise<EditerState>
Returns
Promise<EditerState>
Declaration
typings/index.d.ts:10646
workspace

workspace.getFormatOptions

Get format options of uri or current buffer.

Source

API signature

workspace.getFormatOptions(uri?: string): Promise<FormattingOptions>

Parameters

ParameterType
uri?string
Returns
Promise<FormattingOptions>
Declaration
typings/index.d.ts:10651
workspace

workspace.jumpTo

Jump to location.

Source

API signature

workspace.jumpTo(uri: string | Uri, position?: Position | null, openCommand?: string): Promise<void>

Parameters

ParameterType
uristring | Uri
position?Position | null
openCommand?string
Returns
Promise<void>
Declaration
typings/index.d.ts:10656
workspace

workspace.createFile

Create a file in vim and disk

Source

API signature

workspace.createFile(filepath: string, opts?: CreateFileOptions): Promise<void>

Parameters

ParameterType
filepathstring
opts?CreateFileOptions
Returns
Promise<void>
Declaration
typings/index.d.ts:10661
workspace

workspace.loadFile

Load uri as document, buffer would be invisible if not loaded.

Source

API signature

workspace.loadFile(uri: string, cmd?: string): Promise<Document>

Parameters

ParameterTypeDescription
uristring

Uri of the document.

cmd?string

Open command used to load the resource, e.g. edit, tabe or drop.

Returns
Promise<Document>
Declaration
typings/index.d.ts:10669
workspace

workspace.loadFiles

Load the files that not loaded

Source

API signature

workspace.loadFiles(uris: string[]): Promise<(Document | undefined)[]>

Parameters

ParameterType
urisstring[]
Returns
Promise<(Document | undefined)[]>
Declaration
typings/index.d.ts:10674
workspace

workspace.renameFile

Rename file in vim and disk

Source

API signature

workspace.renameFile(oldPath: string, newPath: string, opts?: RenameFileOptions): Promise<void>

Parameters

ParameterType
oldPathstring
newPathstring
opts?RenameFileOptions
Returns
Promise<void>
Declaration
typings/index.d.ts:10679
workspace

workspace.deleteFile

Delete file from vim and disk.

Source

API signature

workspace.deleteFile(filepath: string, opts?: DeleteFileOptions): Promise<void>

Parameters

ParameterType
filepathstring
opts?DeleteFileOptions
Returns
Promise<void>
Declaration
typings/index.d.ts:10684
workspace

workspace.openResource

Open resource by uri

Source

API signature

workspace.openResource(uri: string): Promise<void>

Parameters

ParameterType
uristring
Returns
Promise<void>
Declaration
typings/index.d.ts:10689
workspace

workspace.resolveModule

Resolve full path of module from yarn or npm global directory.

Source

API signature

workspace.resolveModule(name: string): Promise<string>

Parameters

ParameterType
namestring
Returns
Promise<string>
Declaration
typings/index.d.ts:10694
workspace

workspace.runCommand

Run nodejs command

Source

API signature

workspace.runCommand(cmd: string, cwd?: string, timeout?: number): Promise<string>

Parameters

ParameterType
cmdstring
cwd?string
timeout?number
Returns
Promise<string>
Declaration
typings/index.d.ts:10699
workspace

workspace.expand

Expand filepath with ~ and/or environment placeholders

Source

API signature

workspace.expand(filepath: string): string

Parameters

ParameterType
filepathstring
Returns
string
Declaration
typings/index.d.ts:10704
workspace

workspace.callAsync

Call a function by use notifications, useful for functions like |input| that could block vim.

Source

API signature

workspace.callAsync<T>(method: string, args: any[]): Promise<T>

Parameters

ParameterType
methodstring
argsany[]
Returns
Promise<T>
Declaration
typings/index.d.ts:10709
workspace

workspace.registerKeymap

Register unique global key-mapping with <Plug>(coc-{key}) as lhs. 'noremap' is always used, Throw error when {key} already exists.

Source

API signature

workspace.registerKeymap(modes: MapMode[], key: string, fn: () => ProviderResult<any>, opts?: KeymapOption): Disposable

Parameters

ParameterTypeDescription
modesMapMode[]

Array of map mode short-name.

keystring

Unique name, should only use alphabetical characters and '-'.

fn() => ProviderResult<any>

Callback function.

opts?KeymapOption

Optional option.

Returns
Disposable
Declaration
typings/index.d.ts:10726
workspace

workspace.registerExprKeymap

Register expr mapping global or local to buffer.

Unlike :map, space in {lhs} is accepted as part of the {lhs}, keycodes are replaced are usual. 'noremap' and map arguments <silent>, <nowait> are always used.

Source

API signature

workspace.registerExprKeymap(mode: MapMode, rhs: string, fn: () => ProviderResult<string>, buffer?: number | boolean, cancel?: boolean): Disposable

Parameters

ParameterTypeDescription
modeMapMode

Mode short-name.

rhsstring

rhs of key-mapping.

fn() => ProviderResult<string>

callback function.

buffer?number | boolean

Buffer number or current buffer by use true or 0, default to false.

cancel?boolean

Cancel pupop menu before invoke callback, insert mode only, define to true.

Returns
Disposable
Declaration
typings/index.d.ts:10742
workspace

workspace.registerInsertKeymap

Register a dynamic insert-mode mapping.

The callback runs at the mapping's execution point and returns literal text and special keys to execute in order. Use option.arglist to pass current editor state without making nested editor requests. The callback must not change text, switch windows, or run :normal while the expression mapping is being evaluated.

Vim cannot guarantee ordering for channel-backed expression results during batched :normal or macro input.

Source

API signature

workspace.registerInsertKeymap(key: string, fn: (...args: any[]) => ProviderResult<InsertKeymapResult>, option?: InsertKeymapOption): Disposable

Parameters

ParameterTypeDescription
keystring

lhs of the insert-mode mapping.

fn(...args: any[]) => ProviderResult<InsertKeymapResult>

callback receiving evaluated arglist values and returning ordered text/key parts.

option?InsertKeymapOption

Mapping options.

Returns
Disposable
Declaration
typings/index.d.ts:10760
workspace

workspace.registerLocalKeymap

Register local keymap with callback.

Unlike :map, space in {lhs} is accepted as part of the {lhs}, keycodes are replaced are usual. 'noremap' and map arguments <nowait> are always used.

Source

API signature

workspace.registerLocalKeymap(bufnr: number, mode: 'n' | 'i' | 'v' | 's' | 'x', lhs: string, fn: () => ProviderResult<any>, opts?: KeymapOption | boolean): Disposable

Parameters

ParameterTypeDescription
bufnrnumber

buffer number, use 0 for current buffer.

mode'n' | 'i' | 'v' | 's' | 'x'

mode short-name.

lhsstring

lhs of key-mapping.

fn() => ProviderResult<any>

callback function.

opts?KeymapOption | boolean

Optional option, when it's boolean value, indicate use notification or not.

Returns
Disposable
Declaration
typings/index.d.ts:10776
workspace

workspace.registerBufferSync

Register for buffer sync objects, created sync object should be disposable and provide optional event handlers:

  • onChange called on onDidChangeTextDocument event.
  • onTextChange called on line change event from vim.
  • onVisible called on WindowVisible event.

The document is always attached and not command line buffer.

Source

API signature

workspace.registerBufferSync<T extends BufferSyncItem>(create: (doc: Document) => T | undefined): BufferSync<T>

Parameters

ParameterTypeDescription
create(doc: Document) => T | undefined

Called for each attached document and on document create.

Returns
BufferSync<T>

Disposable

Declaration
typings/index.d.ts:10791
workspace

workspace.createFuzzyMatch

Create a FuzzyMatch instance using wasm module. The FuzzyMatch does the same match algorithm as vim's :h matchfuzzypos()

Source

API signature

workspace.createFuzzyMatch(): FuzzyMatch
Returns
FuzzyMatch
Declaration
typings/index.d.ts:10797
workspace

workspace.computeWordRanges

Compute word ranges of opened document in specified range.

Source

API signature

workspace.computeWordRanges(uri: string | number, range: Range, token?: CancellationToken): Promise<{ [word: string]: Range[] } | null>

Parameters

ParameterTypeDescription
uristring | number

Uri of resource

rangeRange

Range of resource

token?CancellationToken
Returns
Promise<{ [word: string]: Range[] } | null>

| null>}

Declaration
typings/index.d.ts:10807
workspace

workspace.createFileSystemWatcher

Create a FileSystemWatcher instance, when watchman doesn't exist, the returned FileSystemWatcher can still be used, but not work at all.

Source

API signature

workspace.createFileSystemWatcher(globPattern: GlobPattern, ignoreCreate?: boolean, ignoreChange?: boolean, ignoreDelete?: boolean): FileSystemWatcher

Parameters

ParameterType
globPatternGlobPattern
ignoreCreate?boolean
ignoreChange?boolean
ignoreDelete?boolean
Declaration
typings/index.d.ts:10812
workspace

workspace.findFiles

Find files across all workspace folders in the workspace.

Source

API signature

workspace.findFiles(include: GlobPattern, exclude?: GlobPattern | null, maxResults?: number, token?: CancellationToken): Thenable<Uri[]>

Example

findFiles('**​/*.js', '**​/node_modules/**', 10)

Parameters

ParameterTypeDescription
includeGlobPattern

A glob pattern that defines the files to search for. The glob pattern will be matched against the file paths of resulting matches relative to their workspace. Use a relative pattern to restrict the search results to a workspace folder.

exclude?GlobPattern | null

A glob pattern that defines files and folders to exclude. The glob pattern will be matched against the file paths of resulting matches relative to their workspace. When undefined ornull, no excludes will apply.

maxResults?number

An upper-bound for the result.

token?CancellationToken

A token that can be used to signal cancellation to the underlying search engine.

Returns
Thenable<Uri[]>

A thenable that resolves to an array of resource identifiers. Will return no results if no workspace folders are opened.

Declaration
typings/index.d.ts:10830
workspace

workspace.createMru

Create persistence Mru instance.

Source

API signature

workspace.createMru(name: string): Mru

Parameters

ParameterType
namestring
Returns
Mru
Declaration
typings/index.d.ts:10835
workspace

workspace.createTask

Create Task instance that runs in (neo)vim, no shell.

Source

API signature

workspace.createTask(id: string): Task

Parameters

ParameterTypeDescription
idstring

Unique id string, like TSC

Returns
Task
Declaration
typings/index.d.ts:10842
workspace

workspace.createDatabase

Create DB instance at extension root.

Source

API signature

workspace.createDatabase(name: string): JsonDB

Parameters

ParameterType
namestring
Returns
JsonDB
Declaration
typings/index.d.ts:10847