#parser #slint #incremental

tree-sitter-slint

slint grammar for the tree-sitter parsing library

2 unstable releases

0.1.0 Jan 17, 2023
0.0.1 Jan 17, 2023

#419 in Text editors

24 downloads per month

MIT license

1.5MB
49K SLoC

C 49K SLoC JavaScript 556 SLoC // 0.0% comments Scheme 146 SLoC // 0.0% comments Rust 32 SLoC // 0.4% comments

tree-sitter-slint

Status

Tree sitter grammar for slint targeted at neovim

This is still experimental, is missing a few features and is kind of bloated. Issues and pull requests are very welcome.

Pictures

Without Tree Sitter

With Tree Sitter

With Tree Sitter

Without Tree Sitter

Installation

Make sure you have nvim-treesitter installed and configured. Instructions are here

Just for fun

To show off the highlighting and the language features here is this picture just for fun

Just for fun


lib.rs:

This crate provides slint 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_slint::language()).expect("Error loading slint grammar");
let tree = parser.parse(code, None).unwrap();

Dependencies

~2.7–4MB
~72K SLoC