Skip to content
Version 1.0.0

Set up autocompletion

Turn it on, turn it off, assign it a model, and know what to expect from Next Edit depending on the model.

This page covers the case where suggestions do not appear as you type, appear too often, or come from a model that is too slow.

The autocompletion model is served by the inference engine in your perimeter and reached through the gateway, like any other model: the workstation only knows the gateway address (security white paper V3, section 3.3).

Check this first: when it fails, nothing is reported.

The autocomplete role is not among the roles assigned by default. A model declared without roles serves chat, summarization, editing and apply, not autocompletion. With no model carrying this role, the feature stays inactive: no suggestion, no message, no log entry.

name: Local Config
version: 1.0.0
models:
- name: Autocomplétion
provider: openai
model: any
apiBase: https://passerelle.interne:6001/completion-rapide/v1
apiKey: sk-lemniscate-<clé>
roles:
- autocomplete

The actual model is the one the endpoint points to on the gateway; the value of model is ignored. A small, fast open-weights model suits this better than a large one: the suggestion has to arrive before you finish typing. If several models carry the role, the first one declared is used.

The extension’s status bar item opens a menu listing the models with the autocomplete role and lets you switch without editing the file again. An empty list confirms the diagnosis above.

The lemniscate.enableTabAutocomplete setting is true by default. The Toggle Autocomplete Enabled command, on Ctrl+K Ctrl+A (Cmd+K Cmd+A on macOS), flips it and updates the setting.

To turn it off from the configuration, model by model:

name: Local Config
version: 1.0.0
models:
- name: Autocomplétion
provider: openai
model: any
apiBase: https://passerelle.interne:6001/completion-rapide/v1
apiKey: sk-lemniscate-<clé>
roles:
- autocomplete
autocompleteOptions:
disable: true

Autocompletion turns itself off in some files, with no setting involved: ~/.lemniscate/config.json, .prompt files, and anything excluded by a .lemniscateignore, whether global or specific to the repository.

With lemniscate.pauseTabAutocompleteOnBattery set to true (false by default), unplugging from mains power pauses suggestions and plugging back in restores them. This paused state is not remembered across restarts.

The options go on the model, in autocompleteOptions. There is no tabAutocompleteOptions block at the root of workstation.yaml.

name: Local Config
version: 1.0.0
models:
- name: Autocomplétion
provider: openai
model: any
apiBase: https://passerelle.interne:6001/completion-rapide/v1
apiKey: sk-lemniscate-<clé>
roles:
- autocomplete
autocompleteOptions:
debounceDelay: 500
maxPromptTokens: 2048
modelTimeout: 300
onlyMyCode: false
OptionDefaultEffect
debounceDelay350milliseconds of inactivity before querying the model
modelTimeout150milliseconds allowed to the model before giving up
maxPromptTokens1024size of the context sent
useCachetruereuses a suggestion already computed at the same spot
onlyMyCodetruelimits context snippets to code from the repository

A slow model, or a loaded inference engine, calls for raising modelTimeout: at 150 milliseconds, the suggestion is dropped before it arrives, which looks like inactive autocompletion.

The lemniscate.enableNextEdit setting is true by default, and the feature runs with any autocompletion model. There is no list of allowed models.

Suggestion quality varies from one model to another. A model trained to predict the next edit, such as the instinct open-weights family, receives a request tailored to it. Any other model receives a generic request that describes the task in plain language: the feature works, and the suggestions may be off target.

On a model that has not been trained for this task, a notification warns once per model per session that suggestion quality comes from the model and not from the feature. It offers two actions: Disable Next Edit and Select different model.

A model can declare the capability in its configuration:

name: Local Config
version: 1.0.0
models:
- name: Autocomplétion
provider: openai
model: any
apiBase: https://passerelle.interne:6001/completion-rapide/v1
apiKey: sk-lemniscate-<clé>
roles:
- autocomplete
capabilities:
- next_edit

Watch out for the side effect. As soon as a capabilities list is present, it replaces the default behavior. Writing capabilities: [tool_use] on a model disables Next Edit for that model; this is the only way to disable it from the configuration. If you declare capabilities, list all of them. In that case, the notification reports that the list omits next_edit.

When a suggestion is shown, Tab accepts it and Échap hides it. These shortcuts apply only in that case.

The full list of extension settings is in VS Code extension.