Skip to content

Hexacker/edge-language-server

Repository files navigation

Edge Language Server

This is a language server for the Edge templating engine, used by the AdonisJS framework.

Note

This language server was built just for fun, the code quality is not guaranteed. I'm rebuilding it from scratch to achieve a high-quality implementation of all EdgeJS features, alongside with HTML tags autocompletion.

Features

  • Completions: Provides completions for directives, helpers, and variables.
  • Hover: Provides hover information for directives and interpolations.
  • Definitions: Provides definitions for @include and @component directives.
  • Validation: Validates the syntax of Edge templates.

Installation

npm install --ignore-scripts

Note: The --ignore-scripts flag is required to prevent build errors with the tree-sitter-edge package.

Usage

npm run build
npm run start

Development

npm run dev

Tree-sitter Parser

This language server uses a tree-sitter parser for Edge templates. The parser is available as a separate npm package called tree-sitter-edge.

The language server will automatically use the published tree-sitter-edge npm package if it's available in your dependencies. If not, it will fall back to using a local WASM file.

To use the published npm package, simply add it to your dependencies:

npm install tree-sitter-edge --ignore-scripts

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published