Skip to content

[Feature]: Allow additional filetype->language mappings #77

Description

@coandco

Problem or motivation

I have a large PHP codebase where most of the files are of the pattern foo.class.inc. The EXTRA_EXTENSIONS env var allows indexing additional extensions as plaintext, but as far as I can tell there isn't anything that lets you treat an extension as belonging to a particular language.

Proposed solution

The flexible way to do this would be to have some kind of a LANGUAGE_MAP_OVERRIDE env var that lets you map extensions to languages (i.e. something like LANGUAGE_MAP_OVERRIDE=.inc:php,.foo:bar to map .inc to php and .foo to bar). If we don't want to go that route, just adding .inc to the supported PHP extensions would solve my immediate problem.

Alternatives considered

Setting EXTRA_EXTENSIONS currently allows .inc files to be indexed, but loses most of the language-aware benefits of doing so (call graph, semantic chunking, etc).

Area

Indexing

Additional context

No response

Checklist

  • I have searched existing issues and this hasn't been requested before

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions