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
LanguageSet
including 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
most
orasm
- Get the parser for asm.
- bash
some
orbash
- Get the parser for bash.
- bibtex
all
orbibtex
- Get the parser for bibtex.
- c
some
orc
- Get the parser for c.
- c_sharp
most
orc_sharp
- Get the parser for c_sharp.
- clojure
most
orclojure
- Get the parser for clojure.
- cmake
most
orcmake
- Get the parser for cmake.
- comment
most
orcomment
- Get the parser for comment.
- cpp
some
orcpp
- Get the parser for cpp.
- css
some
orcss
- Get the parser for css.
- dart
most
ordart
- Get the parser for dart.
- diff
most
ordiff
- Get the parser for diff.
- dockerfile
all
ordockerfile
- Get the parser for dockerfile.
- ebnf
all
orebnf
- Get the parser for ebnf.
- ejs
all
orejs
- Get the parser for ejs.
- elixir
most
orelixir
- Get the parser for elixir.
- erb
all
orerb
- Get the parser for erb.
- fish
all
orfish
- Get the parser for fish.
- gleam
all
orgleam
- Get the parser for gleam.
- go
some
orgo
- Get the parser for go.
- haskell
most
orhaskell
- Get the parser for haskell.
- hexdump
all
orhexdump
- Get the parser for hexdump.
- html
some
orhtml
- Get the parser for html.
- java
some
orjava
- Get the parser for java.
- javascript
some
orjavascript
- Get the parser for javascript.
- jsdoc
most
orjsdoc
- Get the parser for jsdoc.
- json
some
orjson
- Get the parser for json.
- json5
most
orjson5
- Get the parser for json5.
- jsonc
most
orjsonc
- Get the parser for jsonc.
- julia
all
orjulia
- Get the parser for julia.
- kotlin
some
orkotlin
- Get the parser for kotlin.
- lalrpop
all
orlalrpop
- Get the parser for lalrpop.
- latex
all
orlatex
- Get the parser for latex.
- llvm
( all
orllvm
) and non-target_family="wasm"
- Get the parser for llvm. (not supported on WebAssembly targets)
- lua
some
orlua
- Get the parser for lua.
- luap
most
orluap
- Get the parser for luap.
- make
most
ormake
- Get the parser for make.
- markdown
most
ormarkdown
- Get the parser for markdown.
- markdown_
inline most
ormarkdown_inline
- Get the parser for markdown_inline.
- nix
most
ornix
- Get the parser for nix.
- ocaml
all
orocaml
- Get the parser for ocaml.
- ocaml_
interface all
orocaml_interface
- Get the parser for ocaml_interface.
- php
most
orphp
- Get the parser for php.
- php_
only most
orphp_only
- Get the parser for php_only.
- printf
most
orprintf
- Get the parser for printf.
- python
some
orpython
- Get the parser for python.
- ql
all
orql
- Get the parser for ql.
- regex
most
orregex
- Get the parser for regex.
- ruby
most
orruby
- Get the parser for ruby.
- rush
all
orrush
- Get the parser for rush.
- rust
some
orrust
- Get the parser for rust.
- scala
most
orscala
- Get the parser for scala.
- scss
most
orscss
- Get the parser for scss.
- sql
most
orsql
- Get the parser for sql.
- swift
most
orswift
- Get the parser for swift.
- toml
some
ortoml
- Get the parser for toml.
- tsx
some
ortsx
- Get the parser for tsx.
- typescript
some
ortypescript
- Get the parser for typescript.
- typst
most
ortypst
- Get the parser for typst.
- ursa
all
orursa
- Get the parser for ursa.
- verilog
all
orverilog
- Get the parser for verilog.
- wat
all
orwat
- Get the parser for wat.
- yaml
some
oryaml
- Get the parser for yaml.
- zig
most
orzig
- Get the parser for zig.