Skip to content

Commit

Permalink
docs: add more details to readme
Browse files Browse the repository at this point in the history
  • Loading branch information
mrcjkb committed Mar 11, 2024
1 parent f73ffb5 commit 3a60174
Showing 1 changed file with 23 additions and 2 deletions.
25 changes: 23 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,15 @@
>
> This is early WIP!
A luarocks build backend for tree-sitter parsers that require npm
or that need to be generated using the tree-sitter CLI
A luarocks build backend for tree-sitter parsers.

The resulting parser libraries are installed to
`<luarocks-install-tree>/lib/lua/<lua-version>/parser`.

> [!IMPORTANT]
>
> The installed parsers are *not* lua modules, but they
> can be added to the `package.cpath`.
## Example rockspec

Expand Down Expand Up @@ -51,3 +58,17 @@ build = {

}
```

> [!TIP]
>
> You can find more examples in the [fixtures](./fixtures) directory.
## Usage with Neovim

Neovim searches for tree-sitter parsers in a `parser` directory
on the runtimepath (`:h rtp`).

Parsers installed with luarocks-build-treesitter-parser can be found
by creating a symlink to the `parser` directory in the install location
on the Neovim runtimepath.

0 comments on commit 3a60174

Please sign in to comment.