Skip to main content

Crate reovim_module_treesitter_bash

Crate reovim_module_treesitter_bash 

Source
Expand description

Bash syntax highlighting module for reovim.

Provides Bash language support for syntax highlighting using tree-sitter-bash and the reovim-driver-syntax-treesitter driver.

§Architecture

reovim-driver-syntax           (trait definitions + SyntaxFactoryStore)
        ^
        |
reovim-driver-syntax-treesitter  (generic tree-sitter driver)
        ^
        |
reovim-module-treesitter-bash    (THIS CRATE - Module + Bash grammar)

§Example

use reovim_module_treesitter_bash::BashSyntaxFactory;
use reovim_driver_syntax::SyntaxDriverFactory;

let factory = BashSyntaxFactory::new();
let mut driver = factory.create("bash").expect("Bash is supported");

driver.parse("#!/bin/bash\necho \"hello\"");
let highlights = driver.highlights(0..100);

assert!(!highlights.is_empty());

Structs§

BashSyntaxFactory
Factory for creating Bash syntax drivers.
TreesitterBashModule
Treesitter Bash syntax module.