Skip to content

feat: Configurable file extensions#51

Open
echobt wants to merge 1 commit intomainfrom
fix/issue-160
Open

feat: Configurable file extensions#51
echobt wants to merge 1 commit intomainfrom
fix/issue-160

Conversation

@echobt
Copy link
Copy Markdown
Contributor

@echobt echobt commented Jan 20, 2026

Description

This PR addresses issue #160 by making the list of indexed file extensions configurable instead of hardcoded.

Changes

  • Added extensions field to Config struct in src/config.rs
  • Updated Indexer, ServerIndexer, and FileWatcher to use the configured extensions list
  • Added new CLI command group vgrep extensions:
    • vgrep extensions list: Show currently configured extensions
    • vgrep extensions add <ext>: Add a new extension to index
    • vgrep extensions remove <ext>: Remove an extension

Testing

  • Verified that extensions add .custom allows indexing of .custom files
  • Verified that extensions remove .custom removes it from the list
  • Verified that default extensions are preserved
  • Ran existing tests successfully

This change moves the hardcoded file extension list to the configuration file, allowing users to add or remove extensions dynamically.

Changes:
- Added  field to  struct
- Updated  and  to use configured extensions
- Updated  to respect configured extensions
- Added  CLI command to list, add, and remove extensions
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant