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

tree-sitter-javadoc

v0.2.4

Published

Parser for Javadoc documentation comments

Readme

tree-sitter-javadoc

Javadoc grammar for tree-sitter

About

Features:

  • Complete old-school HTML (/**)
  • Basic new-school Markdown (///) support
  • Highlight queries, especially for those important/pesky @see and @link references
  • @nospell set for javadocs syntax regions, so you don't have to turn spellcheck off anymore
  • Injection queries for @snippet, @value
  • Support for custom inline and block doclet tags
  • Tested on heaps of java code, popular open source codebases
  • Not perfect, but javadocs parsing is a dirty business

Neovim Installation (for use in your editor)

Install nvim-treesitter, then from neovim:

:TSInstall java javadoc html css printf comment

It is recommended to install at least these parsers for treesitter support of java code.

Bindings Installation (for development)

Bindings are published to pypi, npm, and crates.io as tree-sitter-javadoc. Wasm and source code artifacts are published to GitHub releases

Customize

You can customize highlighting by creating custom query files in ~/.config/nvim/queries/:

Example customization: conventions-based highlighting

This ;; extends the default queries, and adds additional queries based on standard coding conventions. Many treesitter parsers do this, including java, but neovim is trying to move away from it. If you use an LSP with semantic token support, you don't need this. Otherwise, it might be useful to you.

~/.config/nvim/queries/javadoc/highlights.scm:

;; extends

; Capitalized methods in javadoc references are treated as constructors.
(((method
    (identifier) @constructor)
    (#lua-match? @constructor "^[A-Z]")))

; Screaming-case members are treated as constants.
((member
  (identifier) @constant)
  (#lua-match? @constant "^[A-Z_][A-Z0-9_]+$"))

; Camel-case members are treated as types.
((member
  (identifier) @type)
  (#lua-match? @type "^[A-Z].*[a-z]"))

Example customization: disable HTML and markdown highlighting

The default highlighting incorporates highlighting of HTML and markdown tags via their respective parsers. For a more minimal approach with just highlighting of block and inline tags, you can override the injections.

~/.config/nvim/queries/javadoc/injections.scm:

; overriding with an empty query file to disable injections

Screenshot of highlights

Syntax highlighting screenshot