Skip to content

kolen/tree-sitter-slim

Repository files navigation

tree-sitter-slim

Slim template grammar for tree-sitter.

Alpha-stage, parses most cases, but syntax tree structure isn't stabilized yet, prone to changes.

Limitations

Slim is highly configurable and some of configuration parameters change syntax. Tree-sitter does not support dynamically generated syntax, so this grammar is not configurable. It should work for default settings and some subset of customized settings.

  • tabsize: always 4, should work with other values if you don't mix spaces and tabs in the same file
  • encoding: always utf-8 (some unicode features don't work yet)
  • shortcut: some of shortcuts work TODO: describe
  • code_attr_delims: only default is supported, () [] {}
  • attr_list_delims: only default is supported, () [] {}
  • enable_engines: TODO
  • disable_engines: TODO
  • splat_prefix: only default is supported, *

Grammar references