How to use the ActionScript and MXML language server with Sublime Text - BowlerHatLLC/vscode-as3mxml GitHub Wiki

Learn how to configure Sublime Text to add code intelligence for ActionScript and MXML using the language server included with the ActionScript & MXML language extension for Visual Studio Code.

  1. Install the LSP package for Sublime Text.

  2. Download the latest release of ActionScript & MXML for Visual Studio Code from Github. On the releases page you should find a .vsix file to download.

  3. Rename the .vsix file extension to .zip and use your favorite archive tool to extract the contents.

  4. In Sublime Text, go to the Preferences menu → Package SettingsLSPSettings. This will open the LSP package settings.

  5. In LSP.sublime-settings — User, add the configuration for the ActionScript & MXML language server:

    {
      "clients": {
        "as3mxml": {
          "enabled": true,
          "command": [
            "java",
            "-Droyalelib=/absolute/path/to/some_sdk/frameworks",
            "-Dfile.encoding=UTF8",
            "-cp",
            "/absolute/path/to/vscode-as3mxml-X.Y.Z/extension/bundled-compiler/*;/absolute/path/to/vscode-as3mxml-X.Y.Z/extension/bin/*",
            "com.as3mxml.vscode.Main"
          ],
          "languages": [
            {
              "languageId": "actionscript",
              "scopes": ["source.actionscript.2"],
              "syntaxes": ["Packages/ActionScript/ActionScript.sublime-syntax"]
            },
            {
              "languageId": "mxml",
              "scopes": ["text.xml"],
              "syntaxes": ["Packages/XML/XML.sublime-syntax"]
            }
          ]
        }
      }
    }
    

    Be sure to change /absolute/path/to/vscode-as3mxml-X.Y.Z/extension/ to the real location where you extracted the .vsix file on your computer. It must be an absolute path.

    On macOS, replace the ; character in the paths passed to the -cp option with the : character instead.

    Additionally, you must change absolute/path/to/some_sdk to the location of your ActionScript SDK (such as the Adobe AIR SDK & Compiler, Apache Royale, the classic Flex SDK, or the Feathers SDK). Be sure to keep /frameworks at the end of the path.