Skip to content
| Marketplace
Sign in
Visual Studio Code>Programming Languages>Angelscript - Language Server for AngelscriptNew to Visual Studio Code? Get it now.
Angelscript - Language Server for Angelscript

Angelscript - Language Server for Angelscript

Gaftherman

|
63 installs
| (1) | Free
High-performance AngelScript language support powered by Tree-sitter C++.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Angelscript for VS Code

English | Español

Marketplace Visual Studio Marketplace Installs License: MIT XERJ Corpus Hub contributor

Angelscript adds support for .as files to VS Code.

Games and applications that embed AngelScript use it to run plugin and mod code. The extension shows documentation on hover, suggests completions, and flags errors as you edit.

The C++20 language server uses Tree-Sitter to parse scripts and index their symbols.

Hover documentation on a method call

Hover over a method call to see its documentation.

AngelScript file icon AngelScript predefined file icon
.as
script
.as.predefined
host API stub

Installation

Install from the Visual Studio Code Marketplace or search for Angelscript by Gaftherman in Extensions (Ctrl+Shift+X). You can also press Ctrl+P, paste ext install Gaftherman.angelscript-gaftherman, and press Enter.

To install a VSIX, press Ctrl+Shift+P, run Extensions: Install from VSIX..., and select angelscript.vsix from the latest release.

Try it in 30 seconds

Open a folder in VS Code, create hello.as, and paste the code below. The extension checks your code as you edit, shows documentation on hover, suggests completions, and underlines errors.

class Calculator {
    /// Doubles a number.
    int twice(int number) { return number * 2; }
}
void Run() {
    Calculator calc;
    calc.twice(21);
}

Hover over twice in calc.twice(21) to see its signature and doc comment. Type calc. to see member suggestions. Change the original call to calc.twcie(21) to see the editor underline the error.

The extension does not run scripts. AngelScript scripts run inside a host application such as a game. See Debugger to run and debug scripts in a host.

Downloads

Each release has these files:

File Use it for
angelscript.vsix VS Code. It bundles the server for every supported platform.
angel_lsp-<version>-<platform>.zip or .tar.gz Other editors (Neovim, Helix, Zed, Emacs). Each archive holds the angel_lsp server for one platform.
SHA256SUMS Checksums of every file above.

Platforms: windows-x64, windows-x86, linux-x64, linux-x86, macos-x64, macos-arm64. Put angel_lsp on your PATH and start it with no arguments; it speaks the Language Server Protocol over stdio and applies to .as files.

AI agents: the MCP server is a separate project, angelscript-mcp. angel_lsp --mcp is deprecated.

Features

Modules

Setting a module entry point and a module folder from the Explorer, then reading the active modules in the status bar

Right-click a script or a folder in the Explorer to define a module.

A host often runs several sets of scripts as separate modules. Tell the language server which files belong to which module:

  • Right-click a .as file in the Explorer and choose Set as Module Entry Point. The file is the compilation entry point of the module.
  • Right-click a folder and choose Set as Module Folder. Every script under the folder belongs to the module.
  • Both ask for a module name and write angelscript.modules to your settings, so you can also edit them by hand.

The language status item, the {} icon next to the language name in the status bar, shows the server state, the active host stubs, the active module and the engine rules file. Click the module entry, or run Switch Active Module, to check one module at a time or all of them.

Switching the active module while the Problems panel lists the errors of every file in the module

The Problems panel lists the errors of every file in a module, open or not.

Defining a module checks all of its files, not only the ones you have open. Run Switch Active Module to isolate one module, or to go back to all of them: the Problems panel follows.

Host stubs

Selecting two predefined stubs removes the unresolved add-on call error and shows its documentation

Select several predefined stubs and the add-on API resolves.

A host often ships its API as more than one predefined stub, for example the core API and an add-on. Select Predefined Stubs ticks the stubs to load together, Select Predefined Stub picks a single one, and the language status item shows how many are active.

Hover

Hover

See a symbol's signature and documentation.

Autocomplete

Autocomplete

Type after a dot to see matching members.

Signature help

Signature help

See which parameter you are filling in as you type a call.

Diagnostics

Diagnostics

See warnings such as unused variables in the editor.

Go to Definition

Go to Definition

Jump from a name to its definition.

Find All References

Find All References

List the places where a symbol is used.

Rename

Rename

Change a script symbol's name and update its uses.

Code actions

Code actions

Open the lightbulb to see fixes and refactorings.

Formatting

Formatting

Format the whole script or just the selected lines.

Format on save: VS Code's editor.formatOnSave uses the server's document formatter. To enable it for .as files only, add to settings.json:

"[angelscript]": {
  "editor.formatOnSave": true
}

Inlay hints

Inlay hints

See parameter names beside call arguments.

Code lens

Code lens

See the reference count above a declaration.

Outline

Outline

Browse the current script's classes, functions, and other symbols.

Semantic highlighting

Semantic highlighting

See parameters and fields colored by what they represent.

Host API

Host API

Get completion for the types and functions declared in your stub.

Engine rules

Engine rules

See your team's custom checks in the editor.

Engine options

Engine options

Match the checks to the language options your host uses.

Supported LSP features
Category Feature What it does
✏️ Editing Completion Suggests symbols and members as you type.
Hover Shows signatures and documentation on hover.
Signature help Shows signatures and highlights the active parameter.
Rename Renames a symbol and updates its uses.
Inlay hints Shows inline parameter names and inferred types.
Code actions Offers quick fixes and refactorings.
Document and range formatting Formats the entire script or selected lines.
Folding ranges Folds classes, functions and blocks.
Selection ranges Expands and shrinks the selection by syntax.
🧭 Navigation Definition, declaration, and type definition Jumps to declarations, definitions, or type definitions.
References Finds where a symbol is used.
Document and workspace symbols Lists symbols in a file or workspace.
Implementation Jumps to the implementations of a method or interface.
Document highlight Highlights every use of the symbol under the cursor.
Document links Makes #include paths clickable, and reports includes that do not resolve.
🔎 Analysis Semantic tokens Highlights symbols by their role in code.
Push and pull diagnostics Reports issues automatically or on request.
Inactive code Dims the code inside a #if block the preprocessor drops.

Host API stubs (.as.predefined)

In AngelScript, the host application registers its C++ API so your scripts can call its functions and use its types. AngelLSP loads .as.predefined stubs that describe those declarations for completion, hover, and diagnostics.

Host Stub Notes
Sven Co-op Sven Co-op - Gaftherman Recommended. Actively maintained for Sven Co-op 5.26+ API bindings, with const-correct declarations, ref qualifiers, and math and engine structs.
Sven Co-op Sven Co-op - Sashi0034 Legacy. Kept for older projects. Its bindings are outdated for current engine releases.
Trackmania Nations Forever Trackmania Nations Forever - Sashi0034 Compatible. Includes bindings for CGameCtnApp and MwFastBuffer.
OpenSiv3D OpenSiv3D - Sashi0034 Compatible. Includes bindings for Vec2, ColorF, and Circle.

In .vscode/settings.json, set "angelscript.predefined.active": "${workspaceFolder}/path/to/stub.as.predefined" or use "all" to load every discovered stub. The default is "", which selects the first stub in path order. You can also run AngelScript: Select Predefined Stub or open the AngelScript IntelliSense status item to choose one.

Example .as.predefined file

A stub declares a class and its methods for the editor.

Engine rules

Save angelscript.rules.json in the project root. Use the Engine Rules Guide to configure your project's checks. AngelScript 2.39.0, the latest release, is the supported engine version. If your host embeds another release, declare it with the engine section ({"engine": {"version": "2.36.1"}}) and the server reports engine properties that release does not have. The engine repository lists which official releases it builds and tests against.

Engine options

Use angelscript.engine.* in VS Code to match your host's language options. For example, set angelscript.engine.foreachSupport to false if your host disables foreach.

Commands

Run them from the Command Palette (Ctrl+Shift+P), or from the menu that opens when you click the AngelScript status item.

Command What it does
AngelScript Status Menu Opens a quick menu with the actions below.
Switch Active Module Isolates one module, or goes back to all modules.
Rescan Workspace Re-indexes the modules and include paths.
Select Predefined Stub / Select Predefined Stubs Enables or disables .as.predefined files.
Configure Host Rules & Predefined API... A wizard for the engine rules and the predefined stubs.
Ignore Unused Symbol (Mark as Entry Point / Callback) Stops the unused warning for a function the host calls.
Format Predefined Stub Formats a .as.predefined file. Also in its Explorer and editor menus.
Set as Module Entry Point / Set as Module Folder Defines a module. Only in the Explorer menu: see Modules.
Clear Local Session Overrides Discards the module and stub choices kept for this session.
Restart Server Restarts the language server.
Show Server Log / Open Logs Folder Shows the server output, or opens the folder with the log files.
Report Issue Opens a bug report with your versions, the log and an anonymized sample already filled in.

Debugger

Debugging lives in its own projects, so any host can use it. angelscript-dap is the debugger, the example project shows a complete host and VS Code setup, and the AngelScript CLI runs and debugs scripts from the terminal with angelscript --dap-port 9002 script.as.

Add an attach or launch configuration of type angelscript to launch.json, set breakpoints in your .as files and press F5.

VS Code attached to a script running in Command Prompt

Building from source

cmake -B server/build -S server -DCMAKE_BUILD_TYPE=Release
cmake --build server/build --config Release
ctest --test-dir server/build -C Release --output-on-failure
cd client && npm install && npm run compile && npm run bundle

Documentation

  • Detailed Guide — workspace examples, predefined files, engine options, and commands.
  • Configuration Guide — settings and editor examples.
  • Engine Rules Guide — custom checks and shared engine settings.
  • CHANGELOG.md — release history and changes.

Roadmap

  • Close the code audit and pass the quality gates on the architecture refactor branch.
  • Keep diagnostics in step with the official AngelScript compiler.
  • Support more hosts through .as.predefined stubs.

Progress is recorded in CHANGELOG.md.

Support

Bug reports and feature requests are welcome via GitHub Issues. When the server fails, run AngelScript: Report Issue (or press Report Issue in the error message). It opens the issue form with your versions, the log and a small anonymized sample of your code already filled in, so you can review everything before it is sent.

If you fix a small bug or add an enhancement, feel free to submit a pull request. CONTRIBUTING.md explains how to build and check a change. If you create an .as.predefined file for your application, contributing it as an example would be greatly appreciated.

Related

Project Use
angelscript-cli Run, check and debug scripts from the terminal
angelscript-mcp MCP server so AI agents check and navigate scripts
angelscript-agent-kit Skill and one-step installs for Claude Code, Codex, Gemini CLI and Antigravity
angelscript-dap Debugger core
angelscript-debugger-example A host that shows how to use the debugger
angelscript-jit Optional JIT compiler
angelscript-engine Support for older AngelScript releases
tree-sitter-angelscript Tree-sitter grammar the language server uses

Similar projects

Other AngelScript tools exist. If this one does not fit your project, we openly recommend trying them:

  • sashi0034/angel-lsp: another AngelScript language server for VS Code, with an IntelliJ implementation. Its examples include host stubs.

Credits

Angelscript for VS Code is built on the work of these projects. Their licenses are reproduced in THIRD_PARTY_NOTICES.md.

Project License Use
Relrin/tree-sitter-angelscript BSD-3-Clause Base of the AngelScript grammar. This project keeps a fork.
AngelScript by Andreas Jönsson zlib The language itself. Its compiler is the test oracle for diagnostics.
tree-sitter MIT Incremental parsing.
tree-sitter-doxygen MIT Documentation comments.
lsp-framework MIT Language Server Protocol library.
nlohmann/json MIT JSON.
spdlog MIT Logging.
unordered_dense MIT Hash containers.
doctest MIT Test framework.

License

This repository is licensed under the MIT License.

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
  • Your Privacy Choices
  • Consumer Health Privacy
© 2026 Microsoft