Source: Roblox Creator Hub · CC BY 4.0 · View source · Code samples: MIT Imported 2026-10-03. Formatting adapted for this site.
CompletionItemKind
Describes the semantic category of an item returned by the Luau Language Server Protocol (LSP) autocomplete provider. Roblox Studio's script editor uses this value to select the icon shown next to each completion item and to apply autocomplete scoring and filtering logic.
This enum mirrors the LSP CompletionItemKind specification (values 1–25). Plugins that register an autocomplete callback via ScriptEditorService:RegisterAutocompleteCallback() may set the kind field on each CompletionItem to one of these values to hint how their suggestion should be presented.
Items
| Name | Value | Description |
|---|---|---|
| Text | 1 | Indicates the completion item represents a plain text suggestion. |
| Method | 2 | Indicates the completion item represents a method on a class or object. |
| Function | 3 | Indicates the completion item represents a function. |
| Constructor | 4 | Indicates the completion item represents a constructor. |
| Field | 5 | Indicates the completion item represents a field within a record or struct. |
| Variable | 6 | Indicates the completion item represents a variable binding. |
| Class | 7 | Indicates the completion item represents a class or type definition. |
| Interface | 8 | Indicates the completion item represents an interface type. |
| Module | 9 | Indicates the completion item represents a module. |
| Property | 10 | Indicates the completion item represents a property on a class or object. |
| Unit | 11 | Indicates the completion item represents a unit of measurement or a module-level value. |
| Value | 12 | Indicates the completion item represents a value expression. |
| Enum | 13 | Indicates the completion item represents an enum type. |
| Keyword | 14 | Indicates the completion item represents a language keyword. |
| Snippet | 15 | Indicates the completion item represents an insertable code snippet with tab stops. |
| Color | 16 | Indicates the completion item represents a color value. |
| File | 17 | Indicates the completion item represents a file reference. |
| Reference | 18 | Indicates the completion item represents a reference to another symbol. |
| Folder | 19 | Indicates the completion item represents a folder or directory. |
| EnumMember | 20 | Indicates the completion item represents an individual enum member value. |
| Constant | 21 | Indicates the completion item represents a constant value. |
| Struct | 22 | Indicates the completion item represents a struct or table type. |
| Event | 23 | Indicates the completion item represents an event. |
| Operator | 24 | Indicates the completion item represents an operator. |
| TypeParameter | 25 | Indicates the completion item represents a generic type parameter. |
Text
Indicates the completion item represents a plain text suggestion.
| Field | Value |
|---|---|
| value | 1 |
Method
Indicates the completion item represents a method on a class or object.
| Field | Value |
|---|---|
| value | 2 |
Function
Indicates the completion item represents a function.
| Field | Value |
|---|---|
| value | 3 |
Constructor
Indicates the completion item represents a constructor.
| Field | Value |
|---|---|
| value | 4 |
Field
Indicates the completion item represents a field within a record or struct.
| Field | Value |
|---|---|
| value | 5 |
Variable
Indicates the completion item represents a variable binding.
| Field | Value |
|---|---|
| value | 6 |
Class
Indicates the completion item represents a class or type definition.
| Field | Value |
|---|---|
| value | 7 |
Interface
Indicates the completion item represents an interface type.
| Field | Value |
|---|---|
| value | 8 |
Module
Indicates the completion item represents a module.
| Field | Value |
|---|---|
| value | 9 |
Property
Indicates the completion item represents a property on a class or object.
| Field | Value |
|---|---|
| value | 10 |
Unit
Indicates the completion item represents a unit of measurement or a module-level value.
| Field | Value |
|---|---|
| value | 11 |
Value
Indicates the completion item represents a value expression.
| Field | Value |
|---|---|
| value | 12 |
Enum
Indicates the completion item represents an enum type.
| Field | Value |
|---|---|
| value | 13 |
Keyword
Indicates the completion item represents a language keyword.
| Field | Value |
|---|---|
| value | 14 |
Snippet
Indicates the completion item represents an insertable code snippet with tab stops.
| Field | Value |
|---|---|
| value | 15 |
Color
Indicates the completion item represents a color value.
| Field | Value |
|---|---|
| value | 16 |
File
Indicates the completion item represents a file reference.
| Field | Value |
|---|---|
| value | 17 |
Reference
Indicates the completion item represents a reference to another symbol.
| Field | Value |
|---|---|
| value | 18 |
Folder
Indicates the completion item represents a folder or directory.
| Field | Value |
|---|---|
| value | 19 |
EnumMember
Indicates the completion item represents an individual enum member value.
| Field | Value |
|---|---|
| value | 20 |
Constant
Indicates the completion item represents a constant value.
| Field | Value |
|---|---|
| value | 21 |
Struct
Indicates the completion item represents a struct or table type.
| Field | Value |
|---|---|
| value | 22 |
Event
Indicates the completion item represents an event.
| Field | Value |
|---|---|
| value | 23 |
Operator
Indicates the completion item represents an operator.
| Field | Value |
|---|---|
| value | 24 |
TypeParameter
Indicates the completion item represents a generic type parameter.
| Field | Value |
|---|---|
| value | 25 |