Skip to content

Commit

Permalink
fix(findFiles): update configuration keys to use camelCase format
Browse files Browse the repository at this point in the history
  • Loading branch information
alaindresse committed Dec 1, 2024
1 parent 6967784 commit cf5d85f
Show file tree
Hide file tree
Showing 6 changed files with 20 additions and 20 deletions.
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -585,18 +585,18 @@
},
{
"order": 27,
"id": "security",
"title": "%asciidoc.findfiles.title%",
"id": "findFiles",
"title": "%asciidoc.findFiles.title%",
"properties": {
"asciidoc.findfiles.useRipgrep": {
"asciidoc.findFiles.useRipgrep": {
"type": "boolean",
"default": false,
"markdownDescription": "%asciidoc.findfiles.useRipgrep.desc%"
"markdownDescription": "%asciidoc.findFiles.useRipgrep.desc%"
},
"asciidoc.findfiles.ripgrepPath": {
"asciidoc.findFiles.ripgrepPath": {
"type": "string",
"default": "",
"markdownDescription": "%asciidoc.findfiles.ripgrepPath.desc%"
"markdownDescription": "%asciidoc.findFiles.ripgrepPath.desc%"
}
}
}
Expand Down
6 changes: 3 additions & 3 deletions package.nls.de.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"asciidoc.antora.title": "Antora",
"asciidoc.antora.enableAntoraSupport.desc": "Aktiviere [Antora](https://antora.org/) Unterstützung.",
"asciidoc.antora.showEnableAntoraPrompt.desc": "Show a prompt to enable [Antora](https://antora.org/) support when an antora.yml file is detected.",
"asciidoc.findfiles.title": "Find files",
"asciidoc.findfiles.useRipgrep.desc": "Use ripgrep to search for files in the workspace.",
"asciidoc.findfiles.ripgrepPath.desc": "External `rg` command to execute. It accepts a full path to the binary, for instance: `/path/to/rg`. If the value is empty, use ripgrep from VSCode's built-in version."
"asciidoc.findFiles.title": "Find files",
"asciidoc.findFiles.useRipgrep.desc": "Use ripgrep to search for files in the workspace.",
"asciidoc.findFiles.ripgrepPath.desc": "External `rg` command to execute. It accepts a full path to the binary, for instance: `/path/to/rg`. If the value is empty, use ripgrep from VSCode's built-in version."
}
6 changes: 3 additions & 3 deletions package.nls.fr.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"asciidoc.antora.title": "Antora",
"asciidoc.antora.enableAntoraSupport.desc": "Active le support [Antora](https://antora.org/).",
"asciidoc.antora.showEnableAntoraPrompt.desc": "Affiche une fenêtre contextuelle permettant d'activer le support [Antora](https://antora.org/) quand un fichier antora.yml est trouvé.",
"asciidoc.findfiles.title": "Find files",
"asciidoc.findfiles.useRipgrep.desc": "Use ripgrep to search for files in the workspace.",
"asciidoc.findfiles.ripgrepPath.desc": "External `rg` command to execute. It accepts a full path to the binary, for instance: `/path/to/rg`. If the value is empty, use ripgrep from VSCode's built-in version."
"asciidoc.findFiles.title": "Find files",
"asciidoc.findFiles.useRipgrep.desc": "Utiliser ripgrep pour rechercher des fichiers dans l'espace de travail.",
"asciidoc.findFiles.ripgrepPath.desc": "Commande externe `rg` à exécuter. Accepte un chemin complet vers le binaire, par exemple : `/path/to/rg`. Si la valeur est vide, utilise ripgrep de la version intégrée de VSCode."
}
6 changes: 3 additions & 3 deletions package.nls.ja.json
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@
"asciidoc.antora.title": "Antora",
"asciidoc.antora.enableAntoraSupport.desc": "[Antora](https://antora.org/)サポートを有効にします。",
"asciidoc.antora.showEnableAntoraPrompt.desc": "Show a prompt to enable [Antora](https://antora.org/) support when an antora.yml file is detected.",
"asciidoc.findfiles.title": "Find files",
"asciidoc.findfiles.useRipgrep.desc": "Use ripgrep to search for files in the workspace.",
"asciidoc.findfiles.ripgrepPath.desc": "External `rg` command to execute. It accepts a full path to the binary, for instance: `/path/to/rg`. If the value is empty, use ripgrep from VSCode's built-in version."
"asciidoc.findFiles.title": "Find files",
"asciidoc.findFiles.useRipgrep.desc": "Use ripgrep to search for files in the workspace.",
"asciidoc.findFiles.ripgrepPath.desc": "External `rg` command to execute. It accepts a full path to the binary, for instance: `/path/to/rg`. If the value is empty, use ripgrep from VSCode's built-in version."
}
6 changes: 3 additions & 3 deletions package.nls.json
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@
"asciidoc.antora.enableAntoraSupport.desc": "Enable [Antora](https://antora.org/) support.",
"asciidoc.antora.showEnableAntoraPrompt.desc": "Show a prompt to enable [Antora](https://antora.org/) support when an antora.yml file is detected.",

"asciidoc.findfiles.title": "Find files",
"asciidoc.findfiles.useRipgrep.desc": "Use ripgrep to search for files in the workspace.",
"asciidoc.findfiles.ripgrepPath.desc": "External `rg` command to execute. It accepts a full path to the binary, for instance: `/path/to/rg`. If the value is empty, use ripgrep from VSCode's built-in version."
"asciidoc.findFiles.title": "Find files",
"asciidoc.findFiles.useRipgrep.desc": "Use ripgrep to search for files in the workspace.",
"asciidoc.findFiles.ripgrepPath.desc": "External `rg` command to execute. It accepts a full path to the binary, for instance: `/path/to/rg`. If the value is empty, use ripgrep from VSCode's built-in version."
}
4 changes: 2 additions & 2 deletions src/util/findFiles.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { getWorkspaceFolders } from './workspace'
*/
export async function findFiles (glob: string): Promise<Uri[]> {
const isBrowser = ((process as any)?.browser === true)
const useRipgrep = (vscode.workspace.getConfiguration('asciidoc', null).get('registerAsciidoctorExtensions') === true)
const useRipgrep = (vscode.workspace.getConfiguration('asciidoc', null).get('findFiles.useRipgrep') === true)

if (isBrowser || !useRipgrep) {
return vscode.workspace.findFiles(glob)
Expand All @@ -25,7 +25,7 @@ export async function findFiles (glob: string): Promise<Uri[]> {
}

async function ripgrep (glob: string, rootFolder: string): Promise<string[]> {
const config = vscode.workspace.getConfiguration('asciidoc.findfiles')
const config = vscode.workspace.getConfiguration('asciidoc.findFiles')
const customPath = config.get<string>('ripgrepPath')
const rgPath = customPath || ospath.join(
vscode.env.appRoot,
Expand Down

0 comments on commit cf5d85f

Please sign in to comment.