/angel-lsp

AngelScript Language Server for VSCode

Primary LanguageTypeScriptMIT LicenseMIT

AngelScript Language Server for VSCode

This is a Language Server for Visual Studio Code that offers features to make AngelScript development easier and faster.

sample.png

Introduction

While there are already AngelScript Language Server extensions available for VSCode, many of them are platform-specific. For example, there are excellent Language Servers specialized for specific environments like Unreal Angelscript and Openplanet Angelscript. Developers working in these environments are encouraged to use those options.

However, if you are looking for a general-purpose Language Server that is not dependent on a particular application, this extension might be useful for you. This extension aims to serve as a universal Language Server, independent of any specific application that integrates AngelScript.

Features

The Language Server analyzes AngelScript files within your project and offers the following features:

  • Syntax Highlighting for AngelScript
  • Autocompletion
  • Type Checking
  • Go to Definition
  • Find References
  • Symbol Renaming
  • Snippets
  • Formatter

Note: As this project is still under development, there may be bugs or incomplete support for some of these features. Future updates will continue to improve functionality.

Getting Started

  1. Install this extension from the Visual Studio Code Marketplace.

  2. Create a file named as.predefined in the root directory of your AngelScript project.

    as.predefined is a custom file used by this Language Server.

    folder_example.png

  3. In as.predefined, define your application’s types and functions using AngelScript syntax.

    When analyzing *.as files, this Language Server implicitly imports symbols defined in as.predefined.

    This allows the Language Server to recognize the custom types and functions defined by your application, enabling autocompletion and type checking.

    You can check actual examples of as.predefined below:

Unimplemented Features

The following features are currently under development:

  • Detailed AngelScript features: Support for import and property is still incomplete.
  • Hover Information: Plans to provide more descriptive symbol details on hover.
  • More User Configuration Options
  • Enhanced Type Checking: Current support for handlers and arrays is limited.
  • Code Actions: Considering features like method signature changes.
  • Debugger: While the approach is still undecided, adding a debugger is being explored.

Issues and Contributions

Bug reports and feature requests are welcome via GitHub Issues .

If you fix a small bug or add an enhancement, feel free to submit a pull request.

Additionally, if you create an as.predefined file for your application, contributing it as an example would be greatly appreciated and could be helpful to others.

License

This repository is licensed under the MIT License.