/src/utils/embedded/providers/rg.ts

https://github.com/fabiospampinato/vscode-todo-plus · TypeScript · 26 lines · 11 code · 12 blank · 3 comment · 0 complexity · 48811c491f7ff7b5e5299b6499ab8a0a MD5 · raw file

  1. /* IMPORT */
  2. import * as execa from 'execa';
  3. import Config from '../../../config';
  4. import AG from './ag';
  5. /* RG */ // ripgrep //URL: https://github.com/BurntSushi/ripgrep
  6. class RG extends AG {
  7. static bin = 'rg';
  8. execa ( filePaths ) {
  9. const config = Config.get ();
  10. return execa ( RG.bin, ['--color', 'never', '--with-filename', '--pretty', ...config.embedded.providers.rg.args, config.embedded.providers.rg.regex, ...filePaths] );
  11. }
  12. }
  13. /* EXPORT */
  14. export default RG;