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

@oh-my-pi/lsp

v1.3.3710

Published

LSP (Language Server Protocol) tool for Pi - provides code intelligence, diagnostics, refactoring, and more

Readme

@oh-my-pi/lsp

Language Server Protocol (LSP) tool for Pi - provides code intelligence, diagnostics, refactoring, and more.

Installation

omp install @oh-my-pi/lsp

How It Works

The tool auto-detects available language servers based on:

  1. Project markers (Cargo.toml, package.json, go.mod, etc.)
  2. Installed binaries (rust-analyzer, typescript-language-server, etc.)

Only detected servers are exposed. For example:

  • In a Rust project: Rust-analyzer actions appear
  • In a TypeScript project: Only standard LSP actions (no Rust-specific)
  • No project markers + no servers: Tool shows setup instructions

Actions

Standard LSP (all languages)

| Action | Description | | ------------------- | --------------------------------------------------- | | diagnostics | Get errors/warnings for files | | references | Find all references to a symbol | | definition | Go to definition of a symbol | | rename | Smart rename across codebase | | actions | List/apply code actions (refactorings, quick fixes) | | hover | Get type info and documentation | | symbols | List symbols in a file | | workspace_symbols | Search symbols across workspace | | status | Show detected/active servers |

Rust-Analyzer Specific

These only appear when rust-analyzer is detected:

| Action | Description | | ------------------ | ------------------------------- | | flycheck | Run clippy/check on workspace | | expand_macro | Expand macro at cursor position | | ssr | Structural search-replace | | runnables | List runnable tests/binaries | | related_tests | Find tests for a function | | reload_workspace | Reload Cargo.toml changes |

Supported Languages

| Language | Server | Root Markers | Install | | ------------- | ---------------------------- | ------------------------------- | ------------------------------------------------ | | Rust | rust-analyzer | Cargo.toml | rustup component add rust-analyzer | | TypeScript/JS | typescript-language-server | package.json, tsconfig.json | npm i -g typescript-language-server typescript | | Go | gopls | go.mod | go install golang.org/x/tools/gopls@latest | | Python | pylsp | pyproject.toml, setup.py | pip install python-lsp-server | | Zig | zls | build.zig | Download from zigtools/zls | | C/C++ | clangd | compile_commands.json | Package manager | | Lua | lua-language-server | .luarc.json | Download from LuaLS |

Custom Configuration

Override or add servers via ~/.pi/lsp.json or .pi/lsp.json:

{
   "rust": {
      "command": "rust-analyzer",
      "args": [],
      "fileTypes": [".rs"],
      "rootMarkers": ["Cargo.toml"],
      "initOptions": {
         "checkOnSave": { "command": "clippy", "extraArgs": ["--all-targets"] }
      }
   },
   "ocaml": {
      "command": "ocamllsp",
      "args": [],
      "fileTypes": [".ml", ".mli"],
      "rootMarkers": ["dune-project"]
   },
   "typescript": {
      "disabled": true
   }
}

Examples

# Check files for errors
lsp action=diagnostics files=["src/main.rs", "src/lib.rs"]

# Find all references
lsp action=references file="src/lib.rs" line=42 character=10

# Smart rename
lsp action=rename file="src/lib.rs" line=42 character=10 new_name="better_name" apply=true

# Get refactoring options
lsp action=actions file="src/lib.rs" line=10 character=5

# Apply a specific refactoring
lsp action=actions file="src/lib.rs" line=10 character=5 apply=0

# Run clippy (Rust only)
lsp action=flycheck

# Structural search-replace (Rust only)
lsp action=ssr pattern="unwrap()" replacement="expect(\"msg\")" apply=true