Skip to main content

Overview

The completion section controls autocomplete suggestions. These options adjust snippet expansion, require insertion, and the postfix trigger character.

Options


Call snippets

When callSnippet is enabled, selecting a function in autocomplete inserts it with parameter placeholders:

Staged snippets

stagedCallSnippets enables split-stage completion for known GMod callbacks. After you accept a hook name, GLuaLS uses the expected hook signature and fills parameter names. Set false to use a generic placeholder.

Postfix completions

Postfix completions let you write a value and then trigger a structural completion after it:
Change the trigger character if @ conflicts with your code style.

Auto-require

When you accept a completion from an imported module, autoRequire inserts a require() at the top of the file:
Set autoRequireFunction to your project’s custom loader if you use one:
.gluarc.json

VS Code extension settings

You can also configure these settings in VS Code settings with the gluals.* prefix:

Example

.gluarc.json