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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@torpor/language-server

v1.0.4

Published

A language server for Torpor, for use in any editor

Readme

@torpor/language-server

A language server for Torpor (GitHub), for use in any editor that speaks the Language Server Protocol.

It provides type checking and diagnostics, auto-completion, hover information, go to definition and more for .torp files. Syntax highlighting is handled by each editor (see below).

Usage

The torpor-lsp binary is installed with the package and defaults to stdio:

torpor-lsp --stdio

The transport can also be set explicitly with --node-ipc or --socket={number} (VS Code uses --node-ipc).

The server reads the project's tsconfig.json, and resolves imports against the project's node_modules, so it works best inside a Torpor project that has @torpor/view installed.

It also uses the project's own TypeScript for the language service when one is installed (resolved from the opened file, like Node would), so that diagnostics match the user's build. If the project does not have TypeScript, or the installed version is not compatible, it falls back to the version bundled with this package.

Editors

VS Code

Use the Torpor extension, which bundles this server -- see packages/vscode.

Neovim

With the built-in LSP API (Neovim 0.11+):

vim.lsp.config.torpor = {
	cmd = { "torpor-lsp", "--stdio" },
	filetypes = { "torpor" },
}
vim.lsp.enable("torpor")

For syntax highlighting, a tree-sitter grammar is needed -- the @torpor/textmate grammar can be used with a TextMate plugin (e.g. nvim-treesitter's tmLanguage support) in the meantime.

Helix

In languages.toml:

[[language]]
name = "torpor"
scope = "source.torp"
file-types = ["torp"]
language-servers = ["torpor-lsp"]

[language-server.torpor-lsp]
command = "torpor-lsp"

OpenCode

In opencode.json:

{
	"lsp": {
		"torpor": {
			"command": ["torpor-lsp", "--stdio"],
			"extensions": [".torp"]
		}
	}
}

Zed

Not yet supported -- Zed requires an extension package (which registers the language, grammar and server). See the follow-up notes in the repository.

Development

This package is part of the Torpor pnpm workspace:

  • @torpor/view (workspace:^) provides the compiler used to transform .torp files into TypeScript
  • TypeScript is kept as an external dependency -- the language server reads TypeScript's lib/*.d.ts files from disk at runtime (via @typescript/vfs)
pnpm build			# build dist/ (tsdown via vp pack)
pnpm build:watch	# rebuild on change
pnpm check			# typecheck and lint
pnpm test			# run the tests