Liking cljdoc? Tell your friends :D

dots.vscode.snippet-string

A snippet string is a template which allows to insert text and to control the editor cursor when insertion happens.

A snippet can define tab stops and placeholders with $1, $2 and ${3:foo}. $0 defines the final tab stop, it defaults to the end of the snippet. Variables are defined with $name and ${name:default value}. Also see the full snippet syntax.

A snippet string is a template which allows to insert text
and to control the editor cursor when insertion happens.

A snippet can define tab stops and placeholders with `$1`, `$2`
and `${3:foo}`. `$0` defines the final tab stop, it defaults to
the end of the snippet. Variables are defined with `$name` and
`${name:default value}`. Also see
[the full snippet syntax](https://code.visualstudio.com/docs/editor/userdefinedsnippets#_create-your-own-snippets).
raw docstring

append-choicecljs

(append-choice snippet-string values)
(append-choice snippet-string values number)

Builder-function that appends a choice (${1|a,b,c|}) to the {@linkcode SnippetString.value value} of this snippet string.

Parameters:

  • values: readonly string[] - The values for choices - the array of strings
  • number: number | undefined - The number of this tabstop, defaults to an auto-increment value starting at 1.

Returns: SnippetString - This snippet string.

Builder-function that appends a choice (`${1|a,b,c|}`) to
the {@linkcode SnippetString.value value} of this snippet string.

**Parameters:**
- `values`: `readonly string[]` - The values for choices - the array of strings
- `number`: `number | undefined` - The number of this tabstop, defaults to an auto-increment
value starting at 1.

**Returns:** `SnippetString` - This snippet string.
sourceraw docstring

append-placeholdercljs

(append-placeholder snippet-string value)
(append-placeholder snippet-string value number)

Builder-function that appends a placeholder (${1:value}) to the {@linkcode SnippetString.value value} of this snippet string.

Parameters:

  • value: string | ((snippet: SnippetString) => any) - The value of this placeholder - either a string or a function with which a nested snippet can be created.
  • number: number | undefined - The number of this tabstop, defaults to an auto-increment value starting at 1.

Returns: SnippetString - This snippet string.

Builder-function that appends a placeholder (`${1:value}`) to
the {@linkcode SnippetString.value value} of this snippet string.

**Parameters:**
- `value`: `string | ((snippet: SnippetString) => any)` - The value of this placeholder - either a string or a function
with which a nested snippet can be created.
- `number`: `number | undefined` - The number of this tabstop, defaults to an auto-increment
value starting at 1.

**Returns:** `SnippetString` - This snippet string.
sourceraw docstring

append-tabstopcljs

(append-tabstop snippet-string)
(append-tabstop snippet-string number)

Builder-function that appends a tabstop ($1, $2 etc) to the {@linkcode SnippetString.value value} of this snippet string.

Parameters:

  • number: number | undefined - The number of this tabstop, defaults to an auto-increment value starting at 1.

Returns: SnippetString - This snippet string.

Builder-function that appends a tabstop (`$1`, `$2` etc) to
the {@linkcode SnippetString.value value} of this snippet string.

**Parameters:**
- `number`: `number | undefined` - The number of this tabstop, defaults to an auto-increment
value starting at 1.

**Returns:** `SnippetString` - This snippet string.
sourceraw docstring

append-textcljs

(append-text snippet-string string)

Builder-function that appends the given string to the {@linkcode SnippetString.value value} of this snippet string.

Parameters:

  • string: string - A value to append 'as given'. The string will be escaped.

Returns: SnippetString - This snippet string.

Builder-function that appends the given string to
the {@linkcode SnippetString.value value} of this snippet string.

**Parameters:**
- `string`: `string` - A value to append 'as given'. The string will be escaped.

**Returns:** `SnippetString` - This snippet string.
sourceraw docstring

append-variablecljs

(append-variable snippet-string name default-value)

Builder-function that appends a variable (${VAR}) to the {@linkcode SnippetString.value value} of this snippet string.

Parameters:

  • name: string - The name of the variable - excluding the $.
  • default-value: string | ((snippet: SnippetString) => any) - The default value which is used when the variable name cannot be resolved - either a string or a function with which a nested snippet can be created.

Returns: SnippetString - This snippet string.

Builder-function that appends a variable (`${VAR}`) to
the {@linkcode SnippetString.value value} of this snippet string.

**Parameters:**
- `name`: `string` - The name of the variable - excluding the `$`.
- `default-value`: `string | ((snippet: SnippetString) => any)` - The default value which is used when the variable name cannot
be resolved - either a string or a function with which a nested snippet can be created.

**Returns:** `SnippetString` - This snippet string.
sourceraw docstring

set-value!cljs

(set-value! snippet-string value)

The snippet string.

The snippet string.
sourceraw docstring

valuecljs

(value snippet-string)

The snippet string.

The snippet string.
sourceraw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close