Expand description
§syntastica-parsers-git
Collection of tree-sitter parsers for
syntastica, fetching with git in the
build-script.
See the project overview for more information on all parser collections.
§Improving compilation speed
Due to the nature of this parser collection, compilation can take a very long time with many parsers enabled, since all parsers are cloned and built every time the build script is run. In a local development environment you can use the following environment variables to reuse files from a previous run.
§Option one: Setting a different clone directory
You can set SYNTASTICA_PARSERS_CLONE_DIR to a directory to clone the parser
repositories to, so that they only have to be built but not downloaded every
time.
§Option two: Reusing built archives
Set SYNTASTICA_PARSERS_CACHE_DIR to a directory where all built parsers will
be copied to. When a binary for a parser is already present in that directory,
it will be reused the next time the build script is run.
§Parser generation
Some parsers don’t include the generated parser.c file in their git checkouts
and instead require users to generate it themselves based on the grammer.js.
This collection supports that, but this requires you to have a working
JavaScript runtime installed on your system. By default, node is assumed, but
you can override that to bun or deno by setting the
SYNTASTICA_PARSERS_JS_RUNTIME environment variable. These parsers will only be
in the all group, so unless you use that group or one of the affected parsers
specifically, you don’t have to worry about this.
§List of included parsers
List of parsers included in the some feature
List of parsers additionally included in the most feature
List of parsers additionally included in the all feature
§Features
Every supported language has a feature with the same name as the respective public function.
Additionally the three feature groups
some,
most, and
all
are available.
some— Include parsers for the most widely known supported languages.most— Impliessome. Include parsers for most common languages.all— Impliesmost. Include parsers for all supported languages.runtime-c(enabled by default) — Use the standard tree-sitter C runtime. Seesyntastica’s WebAssembly support for more information.runtime-c2rust— Use the pure Rust tree-sitter runtime. Seesyntastica’s WebAssembly support for more information.docs— Meant to be enabled when building docs
Structs§
- Language
SetImpl - An implementation of
LanguageSetincluding all languages in the enabled feature set.
Enums§
- Lang
- An enum of every supported language in the current feature set.
Constants§
- LANGUAGES
- A list of all languages supported by the current feature set.
- LANGUAGE_
NAMES - A list of all language names supported by the current feature set.
Functions§
- asm
mostorasm - Get the parser for asm.
- bash
someorbash - Get the parser for bash.
- bibtex
allorbibtex - Get the parser for bibtex.
- c
someorc - Get the parser for c.
- c_sharp
mostorc_sharp - Get the parser for c_sharp.
- clojure
mostorclojure - Get the parser for clojure.
- cmake
mostorcmake - Get the parser for cmake.
- comment
mostorcomment - Get the parser for comment.
- cpp
someorcpp - Get the parser for cpp.
- css
someorcss - Get the parser for css.
- dart
mostordart - Get the parser for dart.
- diff
mostordiff - Get the parser for diff.
- dockerfile
allordockerfile - Get the parser for dockerfile.
- ebnf
allorebnf - Get the parser for ebnf.
- ejs
allorejs - Get the parser for ejs.
- elixir
mostorelixir - Get the parser for elixir.
- erb
allorerb - Get the parser for erb.
- fish
allorfish - Get the parser for fish.
- gleam
allorgleam - Get the parser for gleam.
- go
someorgo - Get the parser for go.
- haskell
mostorhaskell - Get the parser for haskell.
- hexdump
allorhexdump - Get the parser for hexdump.
- html
someorhtml - Get the parser for html.
- java
someorjava - Get the parser for java.
- javascript
someorjavascript - Get the parser for javascript.
- jsdoc
mostorjsdoc - Get the parser for jsdoc.
- json
someorjson - Get the parser for json.
- json5
mostorjson5 - Get the parser for json5.
- jsonc
mostorjsonc - Get the parser for jsonc.
- julia
allorjulia - Get the parser for julia.
- kotlin
someorkotlin - Get the parser for kotlin.
- lalrpop
allorlalrpop - Get the parser for lalrpop.
- latex
allorlatex - Get the parser for latex.
- llvm
( allorllvm) and non-target_family="wasm" - Get the parser for llvm. (not supported on WebAssembly targets)
- lua
someorlua - Get the parser for lua.
- luap
mostorluap - Get the parser for luap.
- make
mostormake - Get the parser for make.
- markdown
mostormarkdown - Get the parser for markdown.
- markdown_
inline mostormarkdown_inline - Get the parser for markdown_inline.
- nix
mostornix - Get the parser for nix.
- ocaml
allorocaml - Get the parser for ocaml.
- ocaml_
interface allorocaml_interface - Get the parser for ocaml_interface.
- php
mostorphp - Get the parser for php.
- php_
only mostorphp_only - Get the parser for php_only.
- printf
mostorprintf - Get the parser for printf.
- python
someorpython - Get the parser for python.
- ql
allorql - Get the parser for ql.
- regex
mostorregex - Get the parser for regex.
- ruby
mostorruby - Get the parser for ruby.
- rush
allorrush - Get the parser for rush.
- rust
someorrust - Get the parser for rust.
- scala
mostorscala - Get the parser for scala.
- scss
mostorscss - Get the parser for scss.
- sql
mostorsql - Get the parser for sql.
- swift
mostorswift - Get the parser for swift.
- toml
someortoml - Get the parser for toml.
- tsx
someortsx - Get the parser for tsx.
- typescript
someortypescript - Get the parser for typescript.
- typst
mostortypst - Get the parser for typst.
- ursa
allorursa - Get the parser for ursa.
- verilog
allorverilog - Get the parser for verilog.
- wat
allorwat - Get the parser for wat.
- yaml
someoryaml - Get the parser for yaml.
- zig
mostorzig - Get the parser for zig.