Socket
Socket
Sign inDemoInstall

@astrojs/language-server

Package Overview
Dependencies
Maintainers
4
Versions
158
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@astrojs/language-server

The Astro language server, implement the [language server protocol](https://microsoft.github.io/language-server-protocol/)


Version published
Maintainers
4
Created

What is @astrojs/language-server?

@astrojs/language-server is an npm package that provides language server capabilities for the Astro framework. It enhances the development experience by offering features like code completion, diagnostics, and more within the context of Astro projects.

What are @astrojs/language-server's main functionalities?

Code Completion

This feature provides code completion suggestions for Astro files. The example shows a request for code completion at a specific position in an Astro file.

```json
{
  "textDocument/completion": {
    "textDocument": {
      "uri": "file:///path/to/your/astro/file.astro"
    },
    "position": {
      "line": 10,
      "character": 5
    }
  }
}
```

Diagnostics

This feature provides diagnostics information for Astro files, such as errors and warnings. The example shows a diagnostic message for an unexpected token in an Astro file.

```json
{
  "textDocument/publishDiagnostics": {
    "uri": "file:///path/to/your/astro/file.astro",
    "diagnostics": [
      {
        "range": {
          "start": { "line": 5, "character": 10 },
          "end": { "line": 5, "character": 15 }
        },
        "severity": 1,
        "code": "1001",
        "source": "astro",
        "message": "Unexpected token."
      }
    ]
  }
}
```

Hover Information

This feature provides hover information for symbols in Astro files. The example shows a request for hover information at a specific position in an Astro file.

```json
{
  "textDocument/hover": {
    "textDocument": {
      "uri": "file:///path/to/your/astro/file.astro"
    },
    "position": {
      "line": 8,
      "character": 12
    }
  }
}
```

Other packages similar to @astrojs/language-server

FAQs

Package last updated on 30 May 2023

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc