Skip to content

Add PHP language support #156

Description

@quinncomendant

Problem

  • No syntax highlighting for PHP files
  • lumen draft on .php files generates commit messages such as fix(html): ... instead of fix(php): ....

Expected Behavior

  • Files ending in .php should be detected as PHP.
  • Syntax highlighting and context lines should use PHP parsing.
  • Commit message scopes should reflect PHP changes (fix(php): ...).

Why

I'm finding Lumen extremely useful, but most of my projects are PHP. It would be great to ahve native support!

Proposed Solution

I'm not very familiar with rust, but the general shape for this fix should be something like:

  • Add PHP support using tree_sitter_php.
  • Register .php in the language detection and highlighting config (src/command/diff/highlight/config.rs).
  • Test/verify that lumen draft generates scoped commit messages for PHP files and that syntax highlighting works correctly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions