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 🙏

© 2024 – Pkg Stats / Ryan Hefner

tree-sitter-haxe

v0.13.0

Published

A tree sitter parser for haxe.

Downloads

70

Readme

A tree sitter parser for haxe.

I've only testing this using nvim-treesitter.

If you are getting an error on loading parser after 0.11.x, check config below and ensure you are including "src/scanner.c" in file list for config.

Use

Install nvim-treesitter.
Clone this repo, and run tree-sitter generate (you may have to install globally).
Once generated, copy the queries to the nvim-treesitter folder

cp queries/* ~/.vim/BUNDLERPATH/nvim-treesitter/queries/haxe

For example if you're using lazy.nvim run:

cp queries/* ~/.local/share/nvim/lazy/nvim-treesitter/queries/haxe

You may have to create the haxe folder.

Add these snippets to your treesitter config or anywhere in your init.lua:

This enables and ensures the parser is installed, and that highlight is enabled.

local configs = require "nvim-treesitter.configs"
configs.setup {
  ensure_installed = { "haxe" }, -- Install the Haxe parser
  highlight = {
    enable = true,              -- false will disable the whole extension
    additional_vim_regex_highlighting = false,
  },
}
local parser_config = require "nvim-treesitter.parsers".get_parser_configs()
parser_config.haxe = {
  install_info = {
    url = "https://github.com/vantreeseba/tree-sitter-haxe",
    files = {"src/parser.c", "src/scanner.c"},
    -- optional entries:
    branch = "main",
  },
  filetype = "haxe",
}

Open nvim, and run TSInstallFromGrammer haxe

This should get you running.

I still don't get highlighting...

You might have to add the haxe filetype for neovim to be able to associate the grammar to your files. To do this create the appropriate file with:

touch ~/.nvim/filetype.lua

And add the following content:

vim.filetype.add({
  extension = {
    hx = 'haxe',
  },
})

What it looks like / does so far (the color scheme is of course customizeable through the highlights / etc in vim).

image