-
Notifications
You must be signed in to change notification settings - Fork 9
Expand file tree
/
Copy pathpackage.json
More file actions
317 lines (317 loc) · 10.8 KB
/
package.json
File metadata and controls
317 lines (317 loc) · 10.8 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
{
"name": "periscope",
"displayName": "Periscope",
"description": "ripgrep workspace search with file peek",
"keywords": [
"rg",
"ripgrep",
"search",
"telescope",
"peek",
"grep",
"file search",
"workspace search",
"search in files",
"search in folder",
"search in file",
"search preview"
],
"version": "1.16.1",
"publisher": "JoshMu",
"icon": "assets/icon.png",
"repository": {
"type": "git",
"url": "https://github.com/joshmu/periscope"
},
"engines": {
"vscode": "^1.88.0"
},
"categories": [
"Other"
],
"activationEvents": [],
"main": "./out/extension.js",
"contributes": {
"commands": [
{
"command": "periscope.search",
"title": "Periscope: Search"
},
{
"command": "periscope.searchCurrentFile",
"title": "Periscope: Search Current File"
},
{
"command": "periscope.openInHorizontalSplit",
"title": "Periscope: Open Result in Horizontal Split",
"enablement": "periscopeActive"
},
{
"command": "periscope.resumeSearch",
"title": "Periscope: Resume Search"
},
{
"command": "periscope.resumeSearchCurrentFile",
"title": "Periscope: Resume Search (Current File)"
},
{
"command": "periscope.searchFiles",
"title": "Periscope: Search Files"
},
{
"command": "periscope.searchBuffers",
"title": "Periscope: Search Buffers"
}
],
"configuration": {
"title": "Periscope",
"properties": {
"periscope.rgOptions": {
"type": "array",
"default": [
"--smart-case",
"--sortr path"
],
"items": {
"type": "string"
},
"description": "Additional options to pass to the 'rg' command, you can view all options in your terminal via 'rg --help'."
},
"periscope.rgPath": {
"type": "string",
"description": "Override the path to the 'rg' command, eg: '/usr/local/bin/rg'. If not specified the @vscode/ripgrep package will be used."
},
"periscope.rgGlobExcludes": {
"type": "array",
"default": [],
"items": {
"type": "string"
},
"description": "Additional glob paths to exclude from the 'rg' search, eg: '**/dist/**'."
},
"periscope.addSrcPaths": {
"type": "array",
"default": [],
"items": {
"type": "string"
},
"description": "Additional source paths to include in the rg search. You may want to add this as a workspace specific setting."
},
"periscope.rgMenuActions": {
"type": "array",
"default": [],
"items": {
"type": "object",
"properties": {
"label": {
"type": "string",
"description": "The label of the menu item to display in the menu."
},
"value": {
"type": "string",
"description": "The value of ripgrep options you would like to include."
}
},
"required": [
"value"
]
},
"description": "Create menu items which can be selected prior to any query, these items will be added to the ripgrep command to generate the results. Eg: Add `{ label: \"JS/TS\", value: \"--type-add 'jsts:*.{js|ts|tsx|jsx}' -t jsts\" },` as a menu option to only show js & ts files in the results."
},
"periscope.rgQueryParams": {
"type": "array",
"default": [
{
"param": "-t $1",
"regex": "^(.+) -t ?(\\w+)$"
}
],
"items": {
"type": "object",
"properties": {
"param": {
"type": "string",
"description": "The rg params to translate to (e.g -t $1, -g '$1')."
},
"regex": {
"type": "string",
"description": "The regex to match the query and capture the value to pass to the rg param (e.g `^(.+) -t ?(\\w+)$`)"
}
},
"required": [
"param",
"regex"
]
},
"description": "Match ripgrep parameters from the input query directly. E.g: `{ param: \"-t $1\", regex: \"^(.+) -t ?(\\w+)$\" },` will translate the query `hello -t rust` to `rg 'hello' -t rust`"
},
"periscope.startFolderDisplayIndex": {
"type": "number",
"default": 0,
"description": "The folder index to display in the results before truncating with '...'."
},
"periscope.startFolderDisplayDepth": {
"type": "number",
"default": 1,
"description": "The folder depth to display in the results before truncating with '...'."
},
"periscope.endFolderDisplayDepth": {
"type": "number",
"default": 4,
"description": "The folder depth to display in the results after truncating with '...'."
},
"periscope.showWorkspaceFolderInFilePath": {
"type": "boolean",
"default": true,
"description": "Include workspace folder name in the folder depth display."
},
"periscope.alwaysShowRgMenuActions": {
"type": "boolean",
"default": false,
"description": "If true, then open rg menu actions every time the search is invoked."
},
"periscope.rgQueryParamsShowTitle": {
"type": "boolean",
"default": true,
"description": "If true, when a ripgrep parameter match from the list in `rgQueryParams`, the quick pick will show the matched result as a preview in the title bar."
},
"periscope.showPreviousResultsWhenNoMatches": {
"type": "boolean",
"default": false,
"description": "If true, when there are no matches for the current query, the previous results will still be shown."
},
"periscope.gotoRgMenuActionsPrefix": {
"type": "string",
"default": "<<",
"description": "If the query starts with this prefix, then open rg menu actions."
},
"periscope.enableGotoNativeSearch": {
"type": "boolean",
"default": true,
"description": "If true, then swap to native vscode search if the custom suffix is entered using the current query."
},
"periscope.gotoNativeSearchSuffix": {
"type": "string",
"default": ">>",
"description": "If the query ends with this suffix, then swap to the native search with the query applied."
},
"periscope.peekBorderColor": {
"type": [
"string",
"null"
],
"default": null,
"description": "Color of the peek border. If not set, uses the editor's find match highlight border color. ('white', '#FFF', 'rgb(255,255,255)', 'rgba(255,255,255,0.5)')"
},
"periscope.peekBorderWidth": {
"type": "string",
"default": "2px",
"description": "Width of the peek border"
},
"periscope.peekBorderStyle": {
"type": "string",
"enum": [
"solid",
"dashed",
"inset",
"double",
"groove",
"outset",
"ridge"
],
"default": "solid",
"description": "Style of the peek border"
},
"periscope.peekMatchColor": {
"type": [
"string",
"null"
],
"default": null,
"description": "Color used to highlight matching text in preview. If not set, uses the editor's find match highlight color. ('white', '#FFF', 'rgb(255,255,255)', 'rgba(255,255,255,0.5)')"
},
"periscope.peekMatchBorderColor": {
"type": [
"string",
"null"
],
"default": null,
"description": "Border color for highlighted matching text. If not set, uses a slightly darker version of the highlight color."
},
"periscope.peekMatchBorderWidth": {
"type": "string",
"default": "1px",
"description": "Border width for highlighted matching text"
},
"periscope.peekMatchBorderStyle": {
"type": "string",
"enum": [
"solid",
"dashed",
"inset",
"double",
"groove",
"outset",
"ridge"
],
"default": "solid",
"description": "Border style for highlighted matching text"
},
"periscope.showLineNumbers": {
"type": "boolean",
"default": true,
"description": "Show the line number of each match alongside the file path in results."
}
}
}
},
"scripts": {
"vscode:prepublish": "npm run compile",
"compile": "tsc -p ./ && node scripts/postCompile.js",
"watch": "tsc -watch -p ./",
"dev": "npm run compile && code --new-window --extensionDevelopmentPath=\"$PWD\"",
"pretest": "npm run compile",
"lint": "eslint src --ext ts && prettier --check .",
"lint:fix": "eslint src --ext ts --fix && prettier --write .",
"test": "npm run lint && node ./out/test/runTest.js",
"test:single": "npm run compile && MOCHA_GREP=\"$npm_config_grep\" node ./out/test/runTest.js",
"test:file": "npm run compile && TEST_FILE=\"$npm_config_file\" node ./out/test/runTest.js",
"test:watch": "npm run compile && TEST_FILE=\"$npm_config_file\" MOCHA_GREP=\"$npm_config_grep\" nodemon --watch src --watch test --ext ts --exec \"npm run compile && node ./out/test/runTest.js\"",
"test:no-lint": "node ./out/test/runTest.js",
"prepare": "husky"
},
"dependencies": {
"@vscode/ripgrep": "^1.15.9"
},
"devDependencies": {
"@semantic-release/changelog": "^6.0.3",
"@semantic-release/git": "^10.0.1",
"@types/glob": "^8.1.0",
"@types/mocha": "^10.0.1",
"@types/mock-fs": "^4.13.4",
"@types/node": "16.x",
"@types/sinon": "^17.0.3",
"@types/vscode": "^1.88.0",
"@typescript-eslint/eslint-plugin": "^5.53.0",
"@typescript-eslint/parser": "^5.53.0",
"@vscode/test-electron": "^2.2.3",
"eslint": "^8.34.0",
"eslint-config-airbnb-base": "^15.0.0",
"eslint-config-prettier": "^9.1.0",
"eslint-plugin-import": "^2.29.1",
"glob": "^8.1.0",
"husky": "^9.0.11",
"lint-staged": "^15.2.2",
"mocha": "^10.2.0",
"mock-fs": "^5.4.1",
"prettier": "3.2.5",
"semantic-release": "^23.0.8",
"sinon": "^19.0.2",
"typescript": "^5.5.4"
},
"lint-staged": {
"**/*": "prettier --write --ignore-unknown",
"src/**/*": "eslint --fix"
},
"license": "SEE LICENSE IN LICENSE.txt"
}