You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Currently the extension is not extensible on the following subject:
The search engine - hard coded ripgrep usage on the backend
The file opener and replacer - hard coded FileEditor to highlight and/or replace search matches from ripgrep.
Describe the solution you'd like
It would be good to allow third-parties to register plugin to alleviate those limitations.
An API candidate is the following:
interfaceISearchReplaceProvider{/** * Initialize the provider with the search parameters * @returns Additional exclude filters to be set on ripgrep search or null to skip calling ripgrep. */preprocess: (allsearchparameters)=>string[]|null;/** * Update/Extend the matches from ripgrep search * This could add file matches for excluded files in the preprocessor phase * or add a customized `displayAndReplace` callback on file matches */postprocess: (filematches: IFileMatch[])=>IFileMatch[];}interfaceISearchReplaceRegistry{/** * Add a provider * Options * rank: Rank of the provider (default order of registration) */add: (provider: ISearchReplaceProvider,options?: {rank: number})=>void;}/** * Interface to represent matches in a file */exportinterfaceIFileMatch{/** * path of file */path: string;/** * all matches within that file */matches: IMatch[];/** * Open and optionally replace matches in a file * ### Notes * If replace is false, only open the file and highlight to the first match * The replace action should be undoable * @param path File path * @param matches Matches within the file * @param replace Whether to replace or not * @returns the widget opened */displayAndReplace?: (path: string,matches?: SearchReplace.IMatch[],replace=false)=>Promise<Widget>;}
The text was updated successfully, but these errors were encountered:
Is your feature request related to a problem? Please describe.
Currently the extension is not extensible on the following subject:
ripgrep
usage on the backendFileEditor
to highlight and/or replace search matches from ripgrep.Describe the solution you'd like
It would be good to allow third-parties to register plugin to alleviate those limitations.
An API candidate is the following:
The text was updated successfully, but these errors were encountered: