npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2025 – Pkg Stats / Ryan Hefner

@herb-tools/language-server

v0.8.3

Published

Herb HTML+ERB Language Tools and Language Server Protocol integration.

Readme

Herb Language Server

Package: @herb-tools/language-server


Language Server Protocol integration for HTML-aware ERB parsing using the Herb Parser.

Herb Language Server in action

Installation

Visual Studio Code

Install the Herb LSP extension from the Visual Studio Marketplace.

Cursor (Open VSX Registry)

Install the Herb LSP extension from the Open VSX Registry.

Zed

The Herb Language Server is part of the official Ruby extension for Zed. Just install the Ruby extension in Zed and you should be good to go.

Read more in the documentation.

Neovim (using nvim-lspconfig)

After installing the Herb Language Server (see below), add herb_ls to your Neovim config (requires nvim 0.11+):

require('lspconfig')
vim.lsp.enable('herb_ls')

Sublime Text (using Sublime LSP)

After installing the Herb Language Server (see below) and Sublime LSP, update the preferences for the LSP package:

// LSP.sublime-settings
{
  "clients": {
    "herb": {
      "enabled": true,
      "command": [
        "herb-language-server",
        "--stdio"
      ],
      "selector": "text.html.ruby | text.html.rails",
      "settings": {
        "languageServerHerb.linter": {
          "enabled": true,
          "excludedRules": ["parser-no-errors"]
        }
      },
      "initializationOptions": {
        "enabledFeatures": {
          "diagnostics": true,
        },
        "experimentalFeaturesEnabled": true
      }
    }
  },
}

Manual Installation

You can use the language server in any editor that supports the Language Server Protocol.

NPM (Global)
npm install -g @herb-tools/language-server
Yarn (Global)
yarn global add @herb-tools/language-server
Preview Releases

Want to try unreleased features? Use pkg.pr.new to run the language server from any commit or PR:

npx https://pkg.pr.new/@herb-tools/language-server@{commit} --stdio

Replace {commit} with a commit SHA (e.g., 0d2eabe) or branch name (e.g., main). Find available previews at pkg.pr.new/~/marcoroth/herb.

Run
herb-language-server --stdio
Usage
Usage: herb-language-server [options]

Options:

  --stdio          use stdio
  --node-ipc       use node-ipc
  --socket=<port>  use socket
NPX

Alternatively you can also run the language server directly with npx without installing anything:

npx @herb-tools/language-server --stdio

Configuration

The language server can be configured using a .herb-lsp/config.json file in your project root. This file is automatically created when the language server starts if it doesn't exist.

Formatter Configuration

You can configure formatting behavior by adding a formatter section to your config:

{
  "version": "0.3.1",
  "createdAt": "2025-06-29T00:00:00.000Z",
  "updatedAt": "2025-06-29T00:00:00.000Z",
  "options": {
    "formatter": {
      "enabled": true,
      "indentWidth": 2,
      "maxLineLength": 80
    }
  }
}

formatter Options

  • enabled (boolean): Enable or disable formatting for this project. Defaults to false.
  • indentWidth (number): Number of spaces for each indentation level. Defaults to 2.
  • maxLineLength (number): Maximum line length before wrapping. Defaults to 80.

Note: VS Code users can also control formatting globally through the languageServerHerb.formatter.enabled setting in VS Code preferences. Formatting is currently in Beta and disabled by default.