Skip to main content

Crate editor_core_treesitter

Crate editor_core_treesitter 

Source
Expand description

editor-core-treesitter - Tree-sitter integration for editor-core.

This crate provides an offline incremental parsing pipeline that can produce:

  • highlight intervals (a style layer)
  • fold regions (derived folding)

Output is expressed as editor_core::ProcessingEdit values, so it composes with other derived state producers like LSP or .sublime-syntax.

Structs§

TreeSitterConfig
File-based Tree-sitter configuration for one language.
TreeSitterIndenter
A small Tree-sitter powered indenter driven by an indents.scm query.
TreeSitterIndenterConfig
Configuration for TreeSitterIndenter.
TreeSitterProcessor
An incremental Tree-sitter based document processor.
TreeSitterProcessorConfig
Configuration for TreeSitterProcessor.
TreeSitterRegistry
Combined Tree-sitter registry used by the UI layer and FFI boundary.

Enums§

TreeSitterError
Errors produced by TreeSitterProcessor.
TreeSitterLanguage
Language source for a Tree-sitter processor.
TreeSitterLoadError
Errors produced when loading Tree-sitter WASM and query files from disk.
TreeSitterRegistryError
Errors produced when parsing/validating a Tree-sitter registry.
TreeSitterUpdateMode
How the processor updated its parse tree for the last process() call.

Functions§

load_indenter_config_from_config
Load a TreeSitterIndenterConfig from a file-based TreeSitterConfig, if available.
load_processor_config_from_config
Load a TreeSitterProcessorConfig from a file-based TreeSitterConfig.

Type Aliases§

TreeSitterConfigMap
Mapping from Tree-sitter language_id (e.g. "rust") to its on-disk configuration.
TreeSitterExtensionMap
Mapping from file extension (without .) to Tree-sitter language_id.