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

@rejot-dev/thalo-lsp

v0.2.4

Published

Language Server Protocol (LSP) implementation for **thalo** (Thought And Lore Language).

Readme

Thalo Language Server

Language Server Protocol (LSP) implementation for thalo (Thought And Lore Language).

Features

| Feature | Status | Description | | ------------------- | ------ | ------------------------------------------------ | | Go to Definition | ✅ | Navigate to definitions (links, entities, etc.) | | Find All References | ✅ | Find usages of links, tags, entities, and fields | | Semantic Tokens | ✅ | Syntax highlighting via LSP | | Diagnostics | ✅ | Validation errors and warnings | | Hover | ✅ | Context-aware info for all syntax elements | | Completions | ✅ | Schema-aware suggestions throughout entries |

Architecture

The language server uses @rejot-dev/thalo for parsing and semantic analysis:

┌─────────────────────────────────────────────────────────┐
│                      IDE / Editor                       │
│                   (VSCode, Neovim, etc.)                │
└─────────────────────────┬───────────────────────────────┘
                          │ LSP Protocol
┌─────────────────────────▼───────────────────────────────┐
│                    @rejot-dev/thalo-lsp                     │
│  ┌────────────────────────────────────────────────────┐ │
│  │ server.ts - LSP server lifecycle & routing         │ │
│  └────────────────────────────────────────────────────┘ │
│  ┌────────────────────────────────────────────────────┐ │
│  │ handlers/ - Request handlers                       │ │
│  │   definition.ts   - Go to definition               │ │
│  │   references.ts   - Find all references            │ │
│  │   semantic-tokens.ts - Syntax highlighting         │ │
│  │   diagnostics.ts  - Validation errors              │ │
│  │   hover.ts        - Hover information              │ │
│  │   completions/    - Autocomplete suggestions       │ │
│  │     context.ts    - Context detection              │ │
│  │     providers/    - Modular completion providers   │ │
│  └────────────────────────────────────────────────────┘ │
│  ┌────────────────────────────────────────────────────┐ │
│  │ capabilities.ts - LSP capability configuration     │ │
│  └────────────────────────────────────────────────────┘ │
└─────────────────────────┬───────────────────────────────┘
                          │
┌─────────────────────────▼───────────────────────────────┐
│                      @rejot-dev/thalo                       │
│  ┌─────────────┐ ┌─────────────┐ ┌───────────────────┐  │
│  │   parser    │ │   model     │ │     services      │  │
│  │  (parsing)  │ │ (workspace) │ │ (definition, etc) │  │
│  └─────────────┘ └─────────────┘ └───────────────────┘  │
│  ┌─────────────┐ ┌──────────────────────────────────┐   │
│  │   checker   │ │   semantic-tokens (highlighting) │   │
│  │ (diagnostics)│ └──────────────────────────────────┘  │
│  └─────────────┘                                        │
└─────────────────────────────────────────────────────────┘

Development

# Build
pnpm build

# Type check
pnpm types:check

# Run tests
pnpm test

Usage

The server communicates over stdio:

# Run the server (after building)
node dist/server.js --stdio

Integration with Editors

The server can be integrated with any editor that supports LSP:

  • VSCode: Use the @rejot-dev/thalo-vscode extension
  • Neovim: Configure with nvim-lspconfig
  • Other editors: Configure to run thalo-lsp --stdio

Feature Details

Go to Definition

Navigate to the definition of various syntax elements:

| Element | Navigates to | | ----------------------------- | ----------------------------------- | | ^link-id | Entry where the link is defined | | Entity name (create lore) | define-entity for that entity | | Metadata key (confidence:) | Field definition in entity schema | | Section header (# Claim) | Section definition in entity schema | | alter-entity entity name | Original define-entity | | actualize-synthesis ^target | define-synthesis target entry |

Find All References

Find all usages of various syntax elements across the workspace:

| Element | Finds | | ----------------------------- | ------------------------------------------- | | ^link-id | All references to that link | | #tag | All entries with that tag | | Entity name | All entries using that entity type | | Metadata key | All entries using that field | | Section header | All entries with that section | | define-entity entity name | All usages + alter-entity entries | | define-synthesis ^link-id | All references + actualize-synthesis usages |

Hover

Context-aware hover information for various syntax elements:

| Element | Information shown | | --------------------- | --------------------------------------------------------------------- | | ^link-id | Entry title, metadata, tags, and file location | | #tag | Usage count and list of entries with that tag | | Directive | Documentation with syntax and examples | | Entity name | Full schema: fields (with types), sections, and where defined | | Metadata key | Field type, required/optional, default value, and description | | Timestamp | Entry info and hint to add explicit link ID for referencing | | Type expr | Documentation for string, datetime, daterange, link, number | | Section header | Section description and required/optional status from schema | | define-synthesis | Documentation for defining synthesis operations | | actualize-synthesis | Documentation for triggering synthesis regeneration |

Completions

Context-aware completions throughout the entry lifecycle:

| Context | Trigger | Suggests | | --------------- | -------------------------- | ------------------------------------------------------------------------------ | | Empty line | Start typing | Current timestamp (2026-01-06T14:30) | | After timestamp | Space | All directives (create, update, define-entity, define-synthesis, etc.) | | After directive | Space | Entity types (lore, opinion, reference, etc.) | | After title | ^ or # | Link IDs or tags | | Metadata key | Indented line | Field names from entity schema | | Metadata value | After key: | Valid values (literals, ^self, etc.) | | Content section | # in content area | Section names from schema (Claim, Reasoning) | | Schema block | # in schema entry | # Metadata, # Sections, etc. | | Field type | After field name in schema | string, datetime, link, daterange, number | | Link reference | ^ | All link IDs from workspace | | Tag | # | Existing tags with usage counts |

Schema-aware: Metadata keys, values, and sections are pulled from entity schemas defined via define-entity.

Smart filtering:

  • Already-used metadata keys are excluded
  • Required fields/sections sorted before optional
  • Partial text filtering on all completions

Diagnostics

Real-time validation errors using the @rejot-dev/thalo checker:

  • Unresolved link references
  • Unknown entity types
  • Missing required fields/sections
  • Invalid field types
  • Duplicate link IDs

Semantic Tokens

Provides rich syntax highlighting for:

  • Timestamps
  • Directives (create, update, define-entity, alter-entity, define-synthesis, actualize-synthesis)
  • Entity types
  • Link references (with declaration modifier for definitions)
  • Tags
  • Metadata keys and values
  • Section headers

Limitations

Not Yet Implemented

  • Rename Symbol: No support for renaming link IDs, tags, or entities across files
  • Code Actions: No quick fixes or refactoring actions
  • Workspace Symbols: No symbol search across the workspace
  • Document Symbols: No outline/breadcrumb support for entry structure
  • Folding Ranges: No collapsible regions for entries or sections
  • Document Links: No clickable links in content (only ^link-id in metadata)
  • Signature Help: No parameter hints (not applicable to thalo syntax)
  • Call Hierarchy: No incoming/outgoing call navigation
  • Type Hierarchy: No type relationship navigation

Partial Support

  • Incremental Updates: Full document re-parse on each edit (no incremental parsing)
  • Large Workspaces: Performance may degrade with very large .thalo files (>10K lines)
  • Markdown Files: Only .thalo code blocks within .md files are parsed; frontmatter is ignored
  • Query Language: The sources: field in define-synthesis entries is not semantically validated
  • Synthesis Completions: No specialized completions for synthesis query syntax (where clauses, etc.)

Known Issues

  • Hover on timestamps shows entry info but timestamps are not valid link targets (use explicit ^link-id)
  • Section header completions only appear when cursor is directly after # in content area
  • Field type completions in schema entries don't suggest custom entity types for nested references