# Theming SQF command scopes Engine commands still use the established `support.function.sqf` family, so existing themes keep working unchanged. The grammar now adds deeper arity-based sub-scopes: | Scope | Meaning | | --- | --- | | `support.function.sqf.nular` | Commands that take no arguments, e.g. `player`, `configFile` | | `support.function.sqf.unary` | Commands documented with one argument, e.g. `toJSON`, `getPylonMagazines` | | `support.function.sqf.binary` | Commands documented with two arguments, e.g. `setPylonLoadout`, `getOrDefault` | | `support.function.sqf.overloaded` | Commands with multiple documented arities, e.g. `action`, `params` | | `support.function.sqf` | Legacy commands retained for compatibility, e.g. `allSites` | The new scopes are nested under `support.function.sqf` on purpose: a theme selector for `support.function` or even the exact old `support.function.sqf` still matches them because TextMate scope selectors are dot-boundary prefix-based. To get visual separation, add more specific rules to your theme. ## Sublime Text `.sublime-color-scheme` Add these entries to the theme's `rules` array: ```json { "rules": [ { "scope": "support.function.sqf.nular", "foreground": "#56B6C2" }, { "scope": "support.function.sqf.unary", "foreground": "#E5C07B" }, { "scope": "support.function.sqf.binary", "foreground": "#61AFEF" }, { "scope": "support.function.sqf.overloaded", "foreground": "#C678DD" }, { "scope": "support.function.sqf", "foreground": "#ABB2BF" }, { "scope": "entity.name.function.sqf", "foreground": "#98C379" }, { "scope": "variable.language.sqf", "foreground": "#D19A66" }, { "scope": "keyword.operator", "foreground": "#ABB2BF" } ] } ``` The colors above are examples (roughly One Dark). Pick values that contrast with your background. ## `.tmTheme` For an XML theme, add equivalent entries to the `settings` array: ```xml scope support.function.sqf.unary settings foreground #E5C07B ``` Add one entry per scope you want to distinguish. ## Notes - The arity comes from the HEMTT command reference. A command with multiple documented call shapes is `overloaded` rather than being duplicated across multiple scopes. - `entity.name.function.sqf` is used for user/mod functions such as `TAG_fnc_name` and `BIS_fnc_name`. - `variable.language.sqf` covers magic variables such as `_this`, `_x`, and `_exception`; `variable.other.sqf` covers ordinary locals such as `_pylons`. - Keep a base `support.function` rule in your theme as a fallback for legacy commands and for themes/grammars that do not use the sub-scopes.