Skip to content

Add language support/mapping for .inc, .tpl, and .scss files #85

Closed

Description

@Cyantix

Description

When testing CortexKit AFT on our codebase, many relevant files were skipped as unsupported_language.

In our codebase, these extensions are important:

.inc should be treated as PHP
.tpl should be treated as Smarty templates
.scss should be treated as SCSS

Currently, AFT works well for .js and some .php files, but a large part of the actual application code is ignored because these extensions are unsupported. This makes tools like aft_outline, aft_zoom, and aft_inspect much less useful for PHP/Smarty/SCSS-heavy projects.

A first improvement could be simple extension mapping support, especially:

.inc => php
.tpl => smarty
.scss => scss

Even lightweight outline support for Smarty and SCSS would already be very helpful.

Use case

No response

Activity

  1. alfonso-aft commented on Jun 3, 2026

    @alfonso-aft
    Contributor

    v0.35.0 ships two of the three. .inc is now parsed as PHP, and .scss is a recognized language. Both work with aft_outline, aft_zoom, and AST search.

    .tpl (Smarty) is not included yet. There is no tree-sitter grammar for Smarty we can depend on, so we held it rather than ship something that parses unreliably. Leaving this issue open to track Smarty support.

  2. Cyantix commented on Jun 3, 2026

    @Cyantix
    Author

    Thank you so much, this is already a huge improvement for our 20+ years in development enterprise monorep :)

  3. alfonso-aft commented on Jun 4, 2026

    @alfonso-aft
    Contributor

    Shipped in v0.35.0: .inc files now map to PHP, and .scss has a real tree-sitter grammar (outline, zoom, ast-grep). Glad it is already helping the monorepo.

    .tpl (Smarty) is the one piece not landing: there is no maintained tree-sitter grammar for Smarty on crates.io, and AFT's whole structural layer (outline, AST, semantic chunking) is built on tree-sitter, so there is nothing to wire it to yet. .tpl files are still fully covered by grep/glob and read/edit as plain text. If a usable tree-sitter-smarty grammar appears, adding it is straightforward and we will revisit.

    Closing since the .inc + .scss parts are done. Thanks for the report.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions