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

@koppajs/koppajs-language-server

v0.1.2

Published

Language Server Protocol adapter for KoppaJS language tooling.

Readme


Purpose

@koppajs/koppajs-language-server exposes KoppaJS semantic editor features through the Language Server Protocol. It is a thin adapter over @koppajs/koppajs-language-core, not the owner of parsing, diagnostics rules, or editor-specific UX.


Repository Classification

  • Type: standalone package
  • Runtime responsibility: host a Node-based LSP server for .kpa analysis
  • Build-time responsibility: compile TypeScript, emit declarations, and run repository quality gates
  • UI surface: none
  • Maturity: pre-1.0, intentionally narrow

Ownership Boundaries

This repository owns:

  • LSP capability declaration
  • request and notification wiring
  • mapping between KoppaJS language-core data and LSP types
  • workspace-root collection/update and watched-file invalidation handoff

This repository does not own:

  • .kpa parsing or semantic analysis
  • editor activation, snippets, or UI behavior
  • CLI diagnostics
  • package publication/versioning for @koppajs/koppajs-language-core

Public Contract

The public surface is intentionally small:

  • consumers run the compiled dist/server.js module as an LSP server process
  • the server supports completions, diagnostics, hover, definition, references, prepare rename, rename, quick fixes, document symbols, and workspace symbols
  • diagnostics are emitted as warnings with source koppa-diagnostics
  • only quick-fix code actions are advertised
  • workspace roots are derived only from file: workspace URIs
  • when the client supports dynamic watched-file registration, the server registers .kpa, JS/TS, and tsconfig.json/jsconfig.json watchers
  • file-based workspace-folder changes update the active roots and refresh open document diagnostics
  • watched-file invalidation conservatively refreshes open-document diagnostics
  • non-file watched changes are ignored

This package does not expose a stable library API beyond the executable server module path.


Usage

Example vscode-languageclient wiring:

import { createRequire } from 'node:module';
import { LanguageClient, TransportKind } from 'vscode-languageclient/node';

const require = createRequire(import.meta.url);
const serverModule = require.resolve('@koppajs/koppajs-language-server');

const client = new LanguageClient(
  'koppajsLanguageServer',
  'KoppaJS Language Server',
  {
    run: { module: serverModule, transport: TransportKind.ipc },
    debug: { module: serverModule, transport: TransportKind.ipc },
  },
  {
    documentSelector: [{ language: 'kpa', scheme: 'file' }],
  },
);

await client.start();

Local Development

The repository consumes the published @koppajs/koppajs-language-core@^0.1.4 package directly from npm.

Requirements:

  • Node.js >= 22
  • npm >= 10

Maintainer default:

  • .nvmrc pins Node.js 22 for local work
  • .npmrc enforces engine compatibility during install

CI validates the repository on Node.js 22 and Node.js 24.

Common commands:

  • npm run check:docs
  • npm run check:meta
  • npm run format
  • npm run format:check
  • npm run lint
  • npm run typecheck
  • npm run build
  • npm test
  • npm run release:check
  • npm run validate

Compatibility policy:


Ecosystem Fit

This package sits between the editor client and the shared language semantics:

  • @koppajs/koppajs-language-core owns parsing, diagnostics, symbol extraction, and semantic analysis, including workspace component discovery through explicit Core.take(...) registrations and the canonical .kpa component contract shared with @koppajs/koppajs-core and @koppajs/koppajs-vite-plugin
  • @koppajs/koppajs-language-server exposes that shared truth over LSP
  • editor clients such as koppajs-vscode-extension should remain thin adapters on top of this package

Architecture & Governance

Project intent, contributor rules, and documentation contracts live in the local repo meta layer:

The file-shape contract for README.md, CHANGELOG.md, CODE_OF_CONDUCT.md, and CONTRIBUTING.md is defined in docs/specs/repository-documentation-contract.md.

Run the local document guard before committing:

npm run check:docs
npm run check:meta

Community & Contribution

Issues and pull requests are welcome:

https://github.com/koppajs/koppajs-language-server/issues

Contributor workflow details live in CONTRIBUTING.md.

Community expectations live in CODE_OF_CONDUCT.md.


License

Apache License 2.0 — © 2026 KoppaJS, Bastian Bensch