-
Notifications
You must be signed in to change notification settings - Fork 58
Open
Description
Sort of inline with #9 to add a feature to allow users to pair custom file extensions with specific code syntax highlighting.
Right now for my code base, I see code2prompt has a lot of wrapped code in unknown syntax highlighting
```unknown
For example, maybe there's a way to tell code2prompt that *.inc extension files have bash shell scripting so when it comes across *.inc extension files code it wraps it in
```bash
Wasn't sure about how that would be done so asked ChatGPT4o 🤓
- Define a Command Line Argument for Mappings: Introduce a new command line argument, such as
--syntax-map, which takes a list of mappings. - Specify Mappings in a Clear Format: Use a simple and clear format for specifying each mapping, for example,
extension:syntax. - Handle Multiple Mappings: Allow users to specify multiple mappings separated by a comma or provide multiple
--syntax-maparguments.
code2prompt --syntax-map "inc:bash,customext:python,ext2:javascript"
Metadata
Metadata
Assignees
Labels
No labels