Skip to content
This repository was archived by the owner on Dec 15, 2022. It is now read-only.

Commit 9757429

Browse files
authored
Merge pull request #1095 from dwelle/ripgrep-pcre2
Add pcre2 ripgrep option
2 parents 1f4836d + cfdfc01 commit 9757429

File tree

2 files changed

+8
-0
lines changed

2 files changed

+8
-0
lines changed

lib/project/results-model.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -217,6 +217,7 @@ module.exports = class ResultsModel {
217217

218218
const startTime = Date.now()
219219
const useRipgrep = atom.config.get('find-and-replace.useRipgrep')
220+
const enablePCRE2 = atom.config.get('find-and-replace.enablePCRE2')
220221

221222
this.inProgressSearchPromise = atom.workspace.scan(
222223
this.regex,
@@ -225,6 +226,7 @@ module.exports = class ResultsModel {
225226
onPathsSearched,
226227
leadingContextLineCount,
227228
ripgrep: useRipgrep,
229+
PCRE2: enablePCRE2,
228230
trailingContextLineCount
229231
},
230232
(result, error) => {

package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,12 @@
130130
"title": "Use ripgrep",
131131
"description": "Use the experimental `ripgrep` search crawler. This will make searches substantially faster on large projects."
132132
},
133+
"enablePCRE2": {
134+
"type": "boolean",
135+
"default": false,
136+
"title": "Enable PCRE2 regex engine",
137+
"description": "Enable PCRE2 regex engine (applies only to `ripgrep` search). This will enable additional regex features such as lookbehind, but may make searches slower."
138+
},
133139
"autocompleteSearches": {
134140
"type": "boolean",
135141
"default": false,

0 commit comments

Comments
 (0)