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

@bbfh/tree-sitter-mcfunction

v0.4.0

Published

Tree-sitter for the latest version of Minecraft mcfunction syntax

Readme

Tree-sitter for MCFunction

Tree-sitter grammar for modern Minecraft data pack function language. Supports 26.1 and earlier versions.

If you have any issues with parsing/highlighting, feel free to create an issue.

Neovim installation

Using lazy:

return {
    "bbfh-dev/tree-sitter-mcfunction",
    config = function()
        local parser_config = require("nvim-treesitter.parsers").get_parser_configs()
        parser_config.mcfunction = {
            install_info = {
                url = "https://github.com/bbfh-dev/tree-sitter-mcfunction",
                files = { "src/parser.c" },
                branch = "main",
                generate_requires_npm = false, -- stand-alone parser without npm dependencies
                requires_generate_from_grammar = false, -- folder contains pre-generated src/parser.c
                queries = "queries/mcfunction",
            },
        }

        vim.filetype.add({
            extension = {
                mcfunction = "mcfunction",
            },
        })
    end,
}

If needed, run: :TSInstall mcfunction.

Other editors

Refer to your editor's documentation on custom tree-sitter grammars.

I do not use other text editors, but I will happily accept contributions for plugins/add-ons/extensions that enable this grammar in a different editor.

Addendum

1 Macros

This grammar accepts $(macro)-s in many common places. However, some $(macro) tricks simply cannot be properly handled and can lead to errors.

2 Testing

[!IMPORTANT] Quantity ≠ quality. I used all projects I could scramble on my machine, but that does not mean that all possible syntax is covered.

Alongside tree-sitter tests, the grammar was tested on at least 19,293 files (~146,314 lines) worth of mcfunction code.

The script used can be found in this repository: test_local_files.sh. (Note: the script is sloppy, I did not intend for it to even be public)