Skip to content

Commit 625dc78

Browse files
committed
Add keywords to plugins and index them in search
Add a curated "keywords" array to each plugin in info.json (e.g. exec gets "rust", pretty_yaml gets "kubernetes", biome gets "rome") and fold them into the search index so plugins surface by related terms, not just their name, description, or file extensions.
1 parent 05e8726 commit 625dc78

3 files changed

Lines changed: 163 additions & 0 deletions

File tree

homeView.tsx

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,7 @@ function pluginSearchText(plugin: PluginData) {
105105
plugin.version,
106106
plugin.description,
107107
plugin.configKey,
108+
...(plugin.keywords ?? []),
108109
...(plugin.fileExtensions ?? []),
109110
...(plugin.fileNames ?? []),
110111
];

info.json

Lines changed: 161 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,13 @@
77
"description": "TypeScript/JavaScript code formatter.",
88
"selected": true,
99
"configKey": "typescript",
10+
"keywords": [
11+
"javascript",
12+
"typescript",
13+
"node",
14+
"deno",
15+
"ecmascript"
16+
],
1017
"fileExtensions": [
1118
"ts",
1219
"tsx",
@@ -26,6 +33,10 @@
2633
"description": "JSON/JSONC code formatter.",
2734
"selected": true,
2835
"configKey": "json",
36+
"keywords": [
37+
"json",
38+
"jsonc"
39+
],
2940
"fileExtensions": [
3041
"json",
3142
"jsonc"
@@ -39,6 +50,11 @@
3950
"description": "Markdown code formatter.",
4051
"selected": true,
4152
"configKey": "markdown",
53+
"keywords": [
54+
"markdown",
55+
"commonmark",
56+
"gfm"
57+
],
4258
"fileExtensions": [
4359
"md",
4460
"mkd",
@@ -54,6 +70,10 @@
5470
"description": "TOML code formatter.",
5571
"selected": true,
5672
"configKey": "toml",
73+
"keywords": [
74+
"toml",
75+
"cargo"
76+
],
5777
"fileExtensions": [
5878
"toml"
5979
],
@@ -64,6 +84,11 @@
6484
"description": "Dockerfile code formatter.",
6585
"selected": false,
6686
"configKey": "dockerfile",
87+
"keywords": [
88+
"docker",
89+
"dockerfile",
90+
"container"
91+
],
6792
"fileExtensions": [
6893
"dockerfile"
6994
],
@@ -77,6 +102,13 @@
77102
"description": "Biome (JS/TS/JSON) wrapper plugin.",
78103
"selected": false,
79104
"configKey": "biome",
105+
"keywords": [
106+
"biome",
107+
"rome",
108+
"javascript",
109+
"typescript",
110+
"json"
111+
],
80112
"fileExtensions": [
81113
"ts",
82114
"tsx",
@@ -98,6 +130,12 @@
98130
"description": "Oxc (JS/TS) wrapper plugin.",
99131
"selected": false,
100132
"configKey": "oxc",
133+
"keywords": [
134+
"oxc",
135+
"oxlint",
136+
"javascript",
137+
"typescript"
138+
],
101139
"fileExtensions": [
102140
"ts",
103141
"tsx",
@@ -117,6 +155,11 @@
117155
"description": "Mago (PHP) wrapper plugin.",
118156
"selected": false,
119157
"configKey": "mago",
158+
"keywords": [
159+
"php",
160+
"mago",
161+
"laravel"
162+
],
120163
"fileExtensions": [
121164
"php"
122165
],
@@ -127,6 +170,12 @@
127170
"description": "Ruff (Python) wrapper plugin.",
128171
"selected": false,
129172
"configKey": "ruff",
173+
"keywords": [
174+
"python",
175+
"ruff",
176+
"black",
177+
"flake8"
178+
],
130179
"fileExtensions": [
131180
"py",
132181
"pyi"
@@ -138,6 +187,12 @@
138187
"description": "Jupyter notebook code block formatter.",
139188
"selected": false,
140189
"configKey": "jupyter",
190+
"keywords": [
191+
"jupyter",
192+
"notebook",
193+
"ipython",
194+
"python"
195+
],
141196
"fileExtensions": [
142197
"ipynb"
143198
],
@@ -148,6 +203,13 @@
148203
"description": "CSS, SCSS, Sass and Less formatter.",
149204
"selected": true,
150205
"configKey": "malva",
206+
"keywords": [
207+
"css",
208+
"scss",
209+
"sass",
210+
"less",
211+
"stylesheet"
212+
],
151213
"fileExtensions": [
152214
"css",
153215
"scss",
@@ -163,6 +225,22 @@
163225
"description": "HTML, Vue, Svelte, Astro, Angular, Jinja, Twig, Nunjucks, and Vento formatter.",
164226
"selected": true,
165227
"configKey": "markup",
228+
"keywords": [
229+
"html",
230+
"vue",
231+
"svelte",
232+
"astro",
233+
"angular",
234+
"jinja",
235+
"twig",
236+
"nunjucks",
237+
"vento",
238+
"handlebars",
239+
"mustache",
240+
"xml",
241+
"markup",
242+
"template"
243+
],
166244
"fileExtensions": [
167245
"html",
168246
"vue",
@@ -192,6 +270,12 @@
192270
"description": "YAML formatter.",
193271
"selected": true,
194272
"configKey": "yaml",
273+
"keywords": [
274+
"yaml",
275+
"kubernetes",
276+
"k8s",
277+
"config"
278+
],
195279
"fileExtensions": [
196280
"yaml",
197281
"yml"
@@ -203,6 +287,11 @@
203287
"description": "GraphQL formatter.",
204288
"selected": false,
205289
"configKey": "graphql",
290+
"keywords": [
291+
"graphql",
292+
"apollo",
293+
"schema"
294+
],
206295
"fileExtensions": [
207296
"graphql",
208297
"gql"
@@ -214,6 +303,12 @@
214303
"description": "CSS, SCSS, and Less formatter that never reinterprets your styles.",
215304
"selected": false,
216305
"configKey": "css",
306+
"keywords": [
307+
"css",
308+
"scss",
309+
"less",
310+
"stylesheet"
311+
],
217312
"fileExtensions": [
218313
"css",
219314
"scss",
@@ -228,6 +323,15 @@
228323
"description": "HTML, XML, SVG, Vue, Svelte, and Astro formatter that preserves rendering-critical whitespace.",
229324
"selected": false,
230325
"configKey": "markup",
326+
"keywords": [
327+
"html",
328+
"xml",
329+
"svg",
330+
"vue",
331+
"svelte",
332+
"astro",
333+
"markup"
334+
],
231335
"fileExtensions": [
232336
"html",
233337
"htm",
@@ -244,6 +348,14 @@
244348
"description": "Dialect-agnostic SQL formatter.",
245349
"selected": false,
246350
"configKey": "sql",
351+
"keywords": [
352+
"sql",
353+
"mysql",
354+
"postgres",
355+
"postgresql",
356+
"sqlite",
357+
"database"
358+
],
247359
"fileExtensions": [
248360
"sql"
249361
],
@@ -254,6 +366,12 @@
254366
"description": "Quarto, Pandoc, R Markdown, and Markdown formatter.",
255367
"selected": false,
256368
"configKey": "panache",
369+
"keywords": [
370+
"quarto",
371+
"pandoc",
372+
"rmarkdown",
373+
"markdown"
374+
],
257375
"fileExtensions": [
258376
"md",
259377
"qmd",
@@ -272,6 +390,14 @@
272390
"description": "Swift code formatter (SwiftFormat wrapper).",
273391
"selected": false,
274392
"configKey": "swiftformat",
393+
"keywords": [
394+
"swift",
395+
"swiftformat",
396+
"ios",
397+
"macos",
398+
"apple",
399+
"xcode"
400+
],
275401
"fileExtensions": [
276402
"swift"
277403
],
@@ -282,6 +408,18 @@
282408
"description": "Prettier wrapper plugin (consider faster dedicated plugins for JS/TS, CSS, etc.).",
283409
"selected": false,
284410
"configKey": "prettier",
411+
"keywords": [
412+
"prettier",
413+
"javascript",
414+
"typescript",
415+
"css",
416+
"html",
417+
"vue",
418+
"yaml",
419+
"graphql",
420+
"markdown",
421+
"mdx"
422+
],
285423
"fileExtensions": [
286424
"js",
287425
"jsx",
@@ -314,6 +452,15 @@
314452
"description": "C# and Visual Basic code formatter (Roslyn).",
315453
"selected": false,
316454
"configKey": "roslyn",
455+
"keywords": [
456+
"c#",
457+
"csharp",
458+
"visual basic",
459+
"vb",
460+
"dotnet",
461+
".net",
462+
"roslyn"
463+
],
317464
"fileExtensions": [
318465
"cs",
319466
"vb"
@@ -325,6 +472,20 @@
325472
"description": "Formats code using formatting CLIs installed on the host machine (rustfmt, clang-format, shfmt, etc.).",
326473
"selected": false,
327474
"configKey": "exec",
475+
"keywords": [
476+
"rust",
477+
"rustfmt",
478+
"c",
479+
"c++",
480+
"cpp",
481+
"clang",
482+
"clang-format",
483+
"shell",
484+
"bash",
485+
"shfmt",
486+
"zig",
487+
"cli"
488+
],
328489
"fileExtensions": [],
329490
"configExcludes": [],
330491
"defaultConfig": {

readInfoFile.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ export interface PluginData {
1919
// descriptive fields carried over from info.json, used to index the search
2020
description?: string;
2121
configKey?: string;
22+
keywords?: string[];
2223
fileExtensions?: string[];
2324
fileNames?: string[];
2425
// present on plugins like exec where the real extensions/commands live in

0 commit comments

Comments
 (0)