2 stable releases

new 3.6.0 Jun 13, 2025
3.5.1 Jun 13, 2025

#2900 in Parser implementations

Download history 88/week @ 2025-06-07

92 downloads per month

MIT license

480KB
17K SLoC

C 17K SLoC JavaScript 116 SLoC // 0.0% comments Scheme 52 SLoC // 0.0% comments Rust 35 SLoC // 0.4% comments

This crate provides fish language support for the tree-sitter parsing library.

Typically, you will use the language function to add this language to a tree-sitter Parser, and then use the parser to parse some code:

let code = "";
let mut parser = tree_sitter::Parser::new();
parser.set_language(tree_sitter_fish::language()).expect("Error loading fish grammar");
let tree = parser.parse(code, None).unwrap();

tree-sitter-fish

Fish grammar for tree-sitter.

Development

Install the dependencies:

npm install

Run the tests:

npm run test

Run the build and tests in watch mode:

npm run test:watch

Test parser against fish-shell /share fish files:

npm run test:examples

References

Dependencies

~2.8–4.5MB
~80K SLoC