OpenTUI currently registers JavaScript, TypeScript, Markdown, Markdown Inline, and Zig unconditionally. addDefaultParsers can add or replace a parser with the same filetype, but an application cannot remove defaults it never uses. The Bun asset-loader table also statically imports every default grammar, so those WASM files remain in compiled binaries.
Would you accept an API that replaces or filters the defaults before the shared TreeSitterClient initializes? A renderer option or a setDefaultParsers function would work, provided omitted grammar assets are not statically bundled.
sentry-tui uses CodeRenderable only for Sentry stack-frame context. It needs JavaScript, TypeScript, Python, Ruby, PHP, and Go, but never Zig or Markdown; the current fixed set both omits production languages and adds avoidable binary weight. Context: billyvg/sentry-tui#93
OpenTUI currently registers JavaScript, TypeScript, Markdown, Markdown Inline, and Zig unconditionally. addDefaultParsers can add or replace a parser with the same filetype, but an application cannot remove defaults it never uses. The Bun asset-loader table also statically imports every default grammar, so those WASM files remain in compiled binaries.
Would you accept an API that replaces or filters the defaults before the shared TreeSitterClient initializes? A renderer option or a setDefaultParsers function would work, provided omitted grammar assets are not statically bundled.
sentry-tui uses CodeRenderable only for Sentry stack-frame context. It needs JavaScript, TypeScript, Python, Ruby, PHP, and Go, but never Zig or Markdown; the current fixed set both omits production languages and adds avoidable binary weight. Context: billyvg/sentry-tui#93