SQF Language
This extension integrates the SQF Language into Visual Studio Code.
For more information please visit the wiki.
This is a fork of Armitxes/VSCode_SQF, updated for more recent of ArmA 3. See the latest release on Github for information on which versions are currently supported.
Supported Products
- Operation Flashpoint [OFP & OFP Elite]
- Take On Helicopters [ToH]
- Armed Assault [ArmA]
- Armed Assault 2 & Operation Arrowhead [ArmA 2 & ArmA 2: OA]
- Armed Assault 3 [ArmA 3]
- Community Based Addons [CBA]
- Enable/Disable commands from CBA via "sqf.enableCBA". Default:
disabled
- Wiki: CBA GitHub
- Contributors: bux
- ACE 3 [CBA]
- Enable/Disable commands from ACE3 via "sqf.enableACE3". Default:
disabled
- Wiki: ACE3
- Contributors: bux
Installation
VS Marketplace
- Go to the Visual Studio Marketplace or type
blackfisch.sqf-language
in the search bar of the extensions tab
- Click on
Install
Manual Installation
Use this guide if the installation over the marketplace isn't possible.
- Download the main.zip
- Navigate to your VS Code extensions folder
- Windows:
%USERPROFILE%/.vscode/extensions
- Mac/Linux:
~/.vscode/extensions
- In the extensions folder, you create a folder called
Armitxes.SQF
- Extract the master.zip inside the
Armitxes.SQF
folder
Development
If you find any problems like incorrect syntax highlighting, missing commands or functions, please don't hesitate to report them in a new GitHub Issues.
Pull Requests for updating the syntax and supported commands are welcome. However, this project is considered legacy support only and new features will not be acepted. If you want to add new features, please consider forking the project or even better: start from scratch.
Updating the commands
- Run the
updateFromWiki.py
script from devHelper
directory with Python 3. Parameter --all
or a game name (e.g. arma3
) has to be given.
This will result in two (or more) files being generated in the devHelper/output
directory.
- Copy the files from
devHelper/output
to their corresponding directories:
- copy
<game>.min.json
to shared/commands/json/
- copy
sqf.min.json
to syntaxes/
Adding new control statements
Controls statements (e.g. if
, for
), comparison statements (e.g. ==
, isEqualTo
) and a few more types of commands are defined separately to apply different syntax highlighting than to "ordinary" commands.
In order to add a new command to the list, you have follow a few steps before running the updateFromWiki.py
script.
- Edit
syntaxes/sqf.min.json
and add the command to the regex. The file is pretty large, So I'd recommend searching for an existing command within the same "class" and adding it there (i.e. isNotEqualTo
should be added where isEqualTo
is defined)
- Edit
devHelper/wiki/getCommands.py
and add the command to the invalid_commands
regex there. In this case, position does not matter.
- Now you can follow the steps described in the Updating the commands section.
Links & Downloads