@codingame/monaco-vscode-search-service-override 36.2.6 → 37.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +2 -2
- package/vscode/src/vs/workbench/contrib/search/browser/quickTextSearch/textSearchQuickAccess.js +8 -8
- package/vscode/src/vs/workbench/contrib/search/browser/replaceService.js +2 -2
- package/vscode/src/vs/workbench/contrib/search/browser/search.common.contribution.js +120 -3
- package/vscode/src/vs/workbench/contrib/search/browser/search.contribution.js +38 -203
- package/vscode/src/vs/workbench/contrib/search/browser/searchAccessibilityHelp.js +55 -55
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsCopy.js +4 -4
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsFind.js +12 -12
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsNav.js +17 -17
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsRemoveReplace.js +4 -4
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsSymbol.js +3 -3
- package/vscode/src/vs/workbench/contrib/search/browser/searchActionsTextQuickAccess.js +1 -1
- package/vscode/src/vs/workbench/contrib/search/browser/searchQuickAccess.contribution.js +4 -4
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditor.contribution.js +28 -28
- package/vscode/src/vs/workbench/contrib/searchEditor/browser/searchEditor.js +18 -13
- package/vscode/src/vs/workbench/services/search/browser/searchService.js +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@codingame/monaco-vscode-search-service-override",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "37.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "VSCode public API plugged on the monaco editor - search service-override",
|
|
6
6
|
"keywords": [],
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
},
|
|
16
16
|
"type": "module",
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@codingame/monaco-vscode-api": "
|
|
18
|
+
"@codingame/monaco-vscode-api": "37.0.0"
|
|
19
19
|
},
|
|
20
20
|
"main": "index.js",
|
|
21
21
|
"module": "index.js",
|
package/vscode/src/vs/workbench/contrib/search/browser/quickTextSearch/textSearchQuickAccess.js
CHANGED
|
@@ -96,7 +96,7 @@ let TextSearchQuickAccess = class TextSearchQuickAccess extends PickerQuickAcces
|
|
|
96
96
|
picker.buttons = [{
|
|
97
97
|
location: QuickInputButtonLocation.Inline,
|
|
98
98
|
iconClass: ThemeIcon.asClassName(Codicon.goToSearch),
|
|
99
|
-
tooltip: ( localize(
|
|
99
|
+
tooltip: ( localize(15622, "Open in Search View"))
|
|
100
100
|
}];
|
|
101
101
|
this.editorViewState.reset();
|
|
102
102
|
disposables.add(picker.onDidTriggerButton(async () => {
|
|
@@ -193,7 +193,7 @@ let TextSearchQuickAccess = class TextSearchQuickAccess extends PickerQuickAcces
|
|
|
193
193
|
this.searchModel = this._instantiationService.createInstance(SearchModelImpl);
|
|
194
194
|
this.searchModel.location = SearchModelLocation.QUICK_ACCESS;
|
|
195
195
|
const viewer = viewlet?.getControl();
|
|
196
|
-
if (currentElem) {
|
|
196
|
+
if (currentElem && viewer && viewer.hasNode(currentElem)) {
|
|
197
197
|
viewer.setFocus([currentElem], getSelectionKeyboardEvent());
|
|
198
198
|
viewer.setSelection([currentElem], getSelectionKeyboardEvent());
|
|
199
199
|
viewer.reveal(currentElem);
|
|
@@ -220,7 +220,7 @@ let TextSearchQuickAccess = class TextSearchQuickAccess extends PickerQuickAcces
|
|
|
220
220
|
type: "separator"
|
|
221
221
|
});
|
|
222
222
|
picks.push({
|
|
223
|
-
label: ( localize(
|
|
223
|
+
label: ( localize(15623, "See More Files")),
|
|
224
224
|
iconClass: ThemeIcon.asClassName(searchDetailsIcon),
|
|
225
225
|
accept: async () => {
|
|
226
226
|
await this.moveToSearchViewlet(matches[limit]);
|
|
@@ -239,7 +239,7 @@ let TextSearchQuickAccess = class TextSearchQuickAccess extends PickerQuickAcces
|
|
|
239
239
|
description,
|
|
240
240
|
buttons: [{
|
|
241
241
|
iconClass: ThemeIcon.asClassName(searchOpenInFileIcon),
|
|
242
|
-
tooltip: ( localize(
|
|
242
|
+
tooltip: ( localize(15624, "Open File"))
|
|
243
243
|
}],
|
|
244
244
|
trigger: async () => {
|
|
245
245
|
await this.handleAccept(iFileInstanceMatch, {});
|
|
@@ -251,7 +251,7 @@ let TextSearchQuickAccess = class TextSearchQuickAccess extends PickerQuickAcces
|
|
|
251
251
|
const element = results[matchIndex];
|
|
252
252
|
if (matchIndex === MAX_RESULTS_PER_FILE) {
|
|
253
253
|
picks.push({
|
|
254
|
-
label: ( localize(
|
|
254
|
+
label: ( localize(15625, "More")),
|
|
255
255
|
iconClass: ThemeIcon.asClassName(searchDetailsIcon),
|
|
256
256
|
accept: async () => {
|
|
257
257
|
await this.moveToSearchViewlet(element);
|
|
@@ -272,7 +272,7 @@ let TextSearchQuickAccess = class TextSearchQuickAccess extends PickerQuickAcces
|
|
|
272
272
|
},
|
|
273
273
|
buttons: [{
|
|
274
274
|
iconClass: ThemeIcon.asClassName(searchActivityBarIcon),
|
|
275
|
-
tooltip: ( localize(
|
|
275
|
+
tooltip: ( localize(15626, "Open in Search View"))
|
|
276
276
|
}],
|
|
277
277
|
ariaLabel: `Match at location ${element.range().startLineNumber}:${element.range().startColumn} - ${previewText}`,
|
|
278
278
|
accept: async (keyMods, event) => {
|
|
@@ -310,7 +310,7 @@ let TextSearchQuickAccess = class TextSearchQuickAccess extends PickerQuickAcces
|
|
|
310
310
|
if (contentPattern === "") {
|
|
311
311
|
this.searchModel.searchResult.clear();
|
|
312
312
|
return [{
|
|
313
|
-
label: ( localize(
|
|
313
|
+
label: ( localize(15627, "Enter a term to search for across your files."))
|
|
314
314
|
}];
|
|
315
315
|
}
|
|
316
316
|
const conditionalTokenCts = disposables.add(( new CancellationTokenSource()));
|
|
@@ -334,7 +334,7 @@ let TextSearchQuickAccess = class TextSearchQuickAccess extends PickerQuickAcces
|
|
|
334
334
|
return {
|
|
335
335
|
picks: syncResult,
|
|
336
336
|
additionalPicks: allMatches.asyncResults.then(asyncResults => (asyncResults.length + syncResult.length === 0) ? [{
|
|
337
|
-
label: ( localize(
|
|
337
|
+
label: ( localize(15628, "No matching results"))
|
|
338
338
|
}] : this._getPicksFromMatches(asyncResults, MAX_FILES_SHOWN - matches.length)).then(picks => {
|
|
339
339
|
if (picks.length > 0) {
|
|
340
340
|
this.searchModel.searchResult.toggleHighlights(true);
|
|
@@ -112,7 +112,7 @@ let ReplaceService = class ReplaceService {
|
|
|
112
112
|
ReplaceService_1 = this;
|
|
113
113
|
}
|
|
114
114
|
static {
|
|
115
|
-
this.REPLACE_SAVE_SOURCE = SaveSourceRegistry.registerSource("searchReplace.source", ( localize(
|
|
115
|
+
this.REPLACE_SAVE_SOURCE = SaveSourceRegistry.registerSource("searchReplace.source", ( localize(15629, "Search and Replace")));
|
|
116
116
|
}
|
|
117
117
|
constructor(
|
|
118
118
|
textFileService,
|
|
@@ -166,7 +166,7 @@ let ReplaceService = class ReplaceService {
|
|
|
166
166
|
modified: {
|
|
167
167
|
resource: toReplaceResource(fileMatch.resource)
|
|
168
168
|
},
|
|
169
|
-
label: ( localize(
|
|
169
|
+
label: ( localize(15630, "{0} ↔ {1} (Replace Preview)", fileMatch.name(), fileMatch.name())),
|
|
170
170
|
description: this.labelService.getUriLabel(dirname(fileMatch.resource), {
|
|
171
171
|
relative: true
|
|
172
172
|
}),
|
|
@@ -1,28 +1,145 @@
|
|
|
1
1
|
|
|
2
2
|
import { localize } from '@codingame/monaco-vscode-api/vscode/vs/nls';
|
|
3
3
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/extensions';
|
|
4
|
-
import { Extensions } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
4
|
+
import { Extensions, ConfigurationScope } from '@codingame/monaco-vscode-api/vscode/vs/platform/configuration/common/configurationRegistry';
|
|
5
5
|
import { Registry } from '@codingame/monaco-vscode-api/vscode/vs/platform/registry/common/platform';
|
|
6
6
|
import { registerContributions } from './replaceContributions.js';
|
|
7
7
|
import '@codingame/monaco-vscode-api/vscode/vs/platform/instantiation/common/instantiation';
|
|
8
8
|
import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/search/browser/notebookSearch/notebookSearchService';
|
|
9
9
|
import '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/search/common/searchHistoryService';
|
|
10
10
|
import { searchConfigurationNode } from '@codingame/monaco-vscode-api/vscode/vs/workbench/contrib/search/common/search';
|
|
11
|
+
import { SearchSortOrder, DEFAULT_MAX_SEARCH_RESULTS, SEARCH_EXCLUDE_CONFIG } from '@codingame/monaco-vscode-api/vscode/vs/workbench/services/search/common/search';
|
|
11
12
|
|
|
12
13
|
registerContributions();
|
|
13
14
|
( Registry.as(Extensions.Configuration)).registerConfiguration({
|
|
14
15
|
...searchConfigurationNode,
|
|
15
16
|
properties: {
|
|
17
|
+
[SEARCH_EXCLUDE_CONFIG]: {
|
|
18
|
+
type: "object",
|
|
19
|
+
markdownDescription: ( localize(
|
|
20
|
+
15631,
|
|
21
|
+
"Configure [glob patterns](https://code.visualstudio.com/docs/editor/codebasics#_advanced-search-options) for excluding files and folders in fulltext searches and file search in quick open. To exclude files from the recently opened list in quick open, patterns must be absolute (for example `**/node_modules/**`). Inherits all glob patterns from the `#files.exclude#` setting."
|
|
22
|
+
)),
|
|
23
|
+
default: {
|
|
24
|
+
"**/node_modules": true,
|
|
25
|
+
"**/bower_components": true,
|
|
26
|
+
"**/*.code-search": true
|
|
27
|
+
},
|
|
28
|
+
additionalProperties: {
|
|
29
|
+
anyOf: [{
|
|
30
|
+
type: "boolean",
|
|
31
|
+
description: ( localize(
|
|
32
|
+
15632,
|
|
33
|
+
"The glob pattern to match file paths against. Set to true or false to enable or disable the pattern."
|
|
34
|
+
))
|
|
35
|
+
}, {
|
|
36
|
+
type: "object",
|
|
37
|
+
properties: {
|
|
38
|
+
when: {
|
|
39
|
+
type: "string",
|
|
40
|
+
pattern: "\\w*\\$\\(basename\\)\\w*",
|
|
41
|
+
default: "$(basename).ext",
|
|
42
|
+
markdownDescription: ( localize(
|
|
43
|
+
15633,
|
|
44
|
+
"Additional check on the siblings of a matching file. Use \\$(basename) as variable for the matching file name."
|
|
45
|
+
))
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
}]
|
|
49
|
+
},
|
|
50
|
+
scope: ConfigurationScope.RESOURCE
|
|
51
|
+
},
|
|
52
|
+
"search.useIgnoreFiles": {
|
|
53
|
+
type: "boolean",
|
|
54
|
+
markdownDescription: ( localize(
|
|
55
|
+
15634,
|
|
56
|
+
"Controls whether to use `.gitignore` and `.ignore` files when searching for files."
|
|
57
|
+
)),
|
|
58
|
+
default: true,
|
|
59
|
+
scope: ConfigurationScope.RESOURCE
|
|
60
|
+
},
|
|
61
|
+
"search.useGlobalIgnoreFiles": {
|
|
62
|
+
type: "boolean",
|
|
63
|
+
markdownDescription: ( localize(
|
|
64
|
+
15635,
|
|
65
|
+
"Controls whether to use your global gitignore file (for example, from `$HOME/.config/git/ignore`) when searching for files. Requires {0} to be enabled.",
|
|
66
|
+
"`#search.useIgnoreFiles#`"
|
|
67
|
+
)),
|
|
68
|
+
default: false,
|
|
69
|
+
scope: ConfigurationScope.RESOURCE
|
|
70
|
+
},
|
|
71
|
+
"search.useParentIgnoreFiles": {
|
|
72
|
+
type: "boolean",
|
|
73
|
+
markdownDescription: ( localize(
|
|
74
|
+
15636,
|
|
75
|
+
"Controls whether to use `.gitignore` and `.ignore` files in parent directories when searching for files. Requires {0} to be enabled.",
|
|
76
|
+
"`#search.useIgnoreFiles#`"
|
|
77
|
+
)),
|
|
78
|
+
default: false,
|
|
79
|
+
scope: ConfigurationScope.RESOURCE
|
|
80
|
+
},
|
|
81
|
+
"search.ripgrep.maxThreads": {
|
|
82
|
+
type: "number",
|
|
83
|
+
description: ( localize(
|
|
84
|
+
15637,
|
|
85
|
+
"Number of threads to use for searching. When set to 0, the engine automatically determines this value."
|
|
86
|
+
)),
|
|
87
|
+
default: 0
|
|
88
|
+
},
|
|
89
|
+
"search.followSymlinks": {
|
|
90
|
+
type: "boolean",
|
|
91
|
+
description: ( localize(15638, "Controls whether to follow symlinks while searching.")),
|
|
92
|
+
default: true
|
|
93
|
+
},
|
|
94
|
+
"search.smartCase": {
|
|
95
|
+
type: "boolean",
|
|
96
|
+
description: ( localize(
|
|
97
|
+
15639,
|
|
98
|
+
"Search case-insensitively if the pattern is all lowercase, otherwise, search case-sensitively."
|
|
99
|
+
)),
|
|
100
|
+
default: false
|
|
101
|
+
},
|
|
102
|
+
"search.maxResults": {
|
|
103
|
+
type: ["number", "null"],
|
|
104
|
+
default: DEFAULT_MAX_SEARCH_RESULTS,
|
|
105
|
+
markdownDescription: ( localize(
|
|
106
|
+
15640,
|
|
107
|
+
"Controls the maximum number of search results, this can be set to `null` (empty) to return unlimited results."
|
|
108
|
+
))
|
|
109
|
+
},
|
|
110
|
+
"search.sortOrder": {
|
|
111
|
+
type: "string",
|
|
112
|
+
enum: [
|
|
113
|
+
SearchSortOrder.Default,
|
|
114
|
+
SearchSortOrder.FileNames,
|
|
115
|
+
SearchSortOrder.Type,
|
|
116
|
+
SearchSortOrder.Modified,
|
|
117
|
+
SearchSortOrder.CountDescending,
|
|
118
|
+
SearchSortOrder.CountAscending
|
|
119
|
+
],
|
|
120
|
+
default: SearchSortOrder.Default,
|
|
121
|
+
enumDescriptions: [( localize(
|
|
122
|
+
15641,
|
|
123
|
+
"Results are sorted by folder and file names, in alphabetical order."
|
|
124
|
+
)), ( localize(
|
|
125
|
+
15642,
|
|
126
|
+
"Results are sorted by file names ignoring folder order, in alphabetical order."
|
|
127
|
+
)), ( localize(15643, "Results are sorted by file extensions, in alphabetical order.")), ( localize(
|
|
128
|
+
15644,
|
|
129
|
+
"Results are sorted by file last modified date, in descending order."
|
|
130
|
+
)), ( localize(15645, "Results are sorted by count per file, in descending order.")), ( localize(15646, "Results are sorted by count per file, in ascending order."))],
|
|
131
|
+
description: ( localize(15647, "Controls sorting order of search results."))
|
|
132
|
+
},
|
|
16
133
|
"search.searchOnType": {
|
|
17
134
|
type: "boolean",
|
|
18
135
|
default: true,
|
|
19
|
-
description: ( localize(
|
|
136
|
+
description: ( localize(15648, "Search all files as you type."))
|
|
20
137
|
},
|
|
21
138
|
"search.searchOnTypeDebouncePeriod": {
|
|
22
139
|
type: "number",
|
|
23
140
|
default: 300,
|
|
24
141
|
markdownDescription: ( localize(
|
|
25
|
-
|
|
142
|
+
15649,
|
|
26
143
|
"When {0} is enabled, controls the timeout in milliseconds between a character being typed and the search starting. Has no effect when {0} is disabled.",
|
|
27
144
|
"`#search.searchOnType#`"
|
|
28
145
|
))
|