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

nlpplus-language-server

v4.3.2

Published

Language server for NLP++, the programming language for natural language processing

Readme

nlpplus-language-server

A Language Server Protocol server for NLP++, the programming language for natural language processing. It is the same server that powers the VisualText extension for VS Code, packaged so any LSP-capable editor can use it.

Features

  • Outline and breadcrumbs: @ regions, rules, and @DECL functions
  • Hover on built-in functions (with a link to the function's help page), keywords, and node accessors
  • Go to definition, find references, and rename across every pass file in the analyzer, plus concepts declared in .kbb knowledge-base files
  • Workspace symbol search
  • Completion for region markers, built-ins, keywords, rule-element modifiers, rules, concepts, and user functions
  • Signature help
  • Folding
  • Semantic highlighting
  • Diagnostics, plus a quick fix for misspelled function calls
  • Document and range formatting

Install

Requires Node.js 18 or newer.

npm install -g nlpplus-language-server

This puts nlpplus-language-server on your PATH. It speaks LSP over stdio by default. --stdio, --node-ipc, --pipe=<name> and --socket=<port> are also accepted.

Open the analyzer folder (the one that contains spec/) as your project root. The server indexes every .nlp, .pat and .kbb file under the root, so cross-pass navigation works.

Editor setup

NLP++ pass files use the extensions .nlp and .pat. Most editors don't recognize them yet, so each snippet below also registers the file type.

Neovim (0.11+)

vim.filetype.add({ extension = { nlp = "nlp", pat = "nlp" } })

vim.lsp.config("nlpplus", {
  -- npm installs a .cmd shim on Windows, and Neovim spawns it only by its full name.
  cmd = { vim.fn.has("win32") == 1 and "nlpplus-language-server.cmd" or "nlpplus-language-server", "--stdio" },
  filetypes = { "nlp" },
  root_markers = { "spec", ".git" },
})
vim.lsp.enable("nlpplus")

Helix

In languages.toml:

[language-server.nlpplus]
command = "nlpplus-language-server"
args = ["--stdio"]

[[language]]
name = "nlp"
scope = "source.nlp"
file-types = ["nlp", "pat"]
roots = ["spec"]
comment-tokens = ["#"]
block-comment-tokens = { start = "/*", end = "*/" }
indent = { tab-width = 4, unit = "\t" }
language-servers = ["nlpplus"]

Emacs (Eglot)

(define-derived-mode nlp-mode prog-mode "NLP++"
  (setq-local comment-start "# "))
(add-to-list 'auto-mode-alist '("\\.\\(nlp\\|pat\\)\\'" . nlp-mode))

(with-eval-after-load 'eglot
  (add-to-list 'eglot-server-programs
               '(nlp-mode "nlpplus-language-server" "--stdio")))

Sublime Text (LSP package)

Install the NLP++ grammar from nlpplus-tmbundle so .nlp files get the source.nlp scope. Then add this in Preferences → Package Settings → LSP → Settings:

{
  "clients": {
    "nlpplus": {
      "enabled": true,
      "command": ["nlpplus-language-server", "--stdio"],
      "selector": "source.nlp"
    }
  }
}

Other editors

Run nlpplus-language-server --stdio for files of language id nlp.

On Windows, npm installs the command as nlpplus-language-server.cmd. An editor that starts processes directly, without a shell, may need that full name.

Settings

The server asks the client for the nlp.format section through workspace/configuration. If the client doesn't provide it, the defaults below apply.

| Setting | Values | Default | |---|---|---| | nlp.format.enable | true, false | true | | nlp.format.indentStyle | "tabs", "spaces", "editor" | "tabs" | | nlp.format.tabSize | number | 4 | | nlp.format.braceStyle | "allman", "keep" | "allman" |

For example, in Neovim:

vim.lsp.config("nlpplus", {
  settings = { nlp = { format = { indentStyle = "spaces", tabSize = 2 } } },
})

Syntax highlighting

The server provides semantic tokens, which editors layer on top of a syntax grammar. Grammars for NLP++ and its knowledge-base formats are available as TextMate grammars in nlpplus-tmbundle.

Telemetry

None. The server sends no data anywhere. The VisualText extension for VS Code counts feature use anonymously, and that counting is done on the extension side, only when the extension is the client.

License

MIT. Source: github.com/VisualText/vscode-nlp (the server lives in src/server).