Skip to content

Commit 9cabd0d

Browse files
committed
feat: change config name
1 parent d5cbf25 commit 9cabd0d

4 files changed

Lines changed: 9 additions & 9 deletions

File tree

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -41,17 +41,17 @@
4141
"configuration": {
4242
"title": "Longdo Spell",
4343
"properties": {
44-
"longdo-spell-checker.apiKey": {
44+
"longdoSpellChecker.apiKey": {
4545
"type": "string",
4646
"default": "",
4747
"description": "Longdo Spell Checker Api Key"
4848
},
49-
"longdo-spell-checker.checkOnSave": {
49+
"longdoSpellChecker.checkOnSave": {
5050
"type": "boolean",
5151
"default": true,
5252
"description": "Check spelling on save"
5353
},
54-
"longdo-spell-checker.locale": {
54+
"longdoSpellChecker.locale": {
5555
"type": "string",
5656
"enum": [
5757
"Thai",
@@ -60,7 +60,7 @@
6060
"default": "Thai",
6161
"description": "Set the primary language for spell checking"
6262
},
63-
"longdo-spell-checker.language": {
63+
"longdoSpellChecker.language": {
6464
"type": "array",
6565
"default": [
6666
"Thai",

src/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ async function postProof(text: string) {
3434
throw new Error("NetworkError");
3535
}
3636

37-
const apiKey = vscode.workspace.getConfiguration("longdo-spell-checker").get("apiKey");
37+
const apiKey = vscode.workspace.getConfiguration("longdoSpellChecker").get("apiKey");
3838
if (!apiKey) {
3939
updateEmoji("$(debug-disconnect)");
4040
throw new Error("API key is not set. Please set it in the settings.");

src/language.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,18 @@ export class Language {
3333
*/
3434
public switchLanguage() {
3535
const currentLanguage =
36-
vscode.workspace.getConfiguration("longdo-spell-checker").get("locale") ?? "en";
36+
vscode.workspace.getConfiguration("longdoSpellChecker").get("locale") ?? "en";
3737
const newLanguage = currentLanguage === "en" ? "fr" : "en";
3838
vscode.workspace
39-
.getConfiguration("longdo-spell-checker")
39+
.getConfiguration("longdoSpellChecker")
4040
.update("locale", newLanguage, vscode.ConfigurationTarget.Global);
4141
}
4242

4343
/**
4444
* Returns the language of the current editor
4545
*/
4646
public getLanguage(): string {
47-
const locale = vscode.workspace.getConfiguration("longdo-spell-checker").get("locale") as string;
47+
const locale = vscode.workspace.getConfiguration("longdoSpellChecker").get("locale") as string;
4848
return locale === "Thai" ? "th" : "en";
4949
}
5050

src/text.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ export class TextProcessor {
7070
document.fileName.split(".").pop()?.toLowerCase() || "txt";
7171
const isSupportedFile = fileExtension in languageMap;
7272

73-
const config = vscode.workspace.getConfiguration("longdo-spell-checker");
73+
const config = vscode.workspace.getConfiguration("longdoSpellChecker");
7474
const languages = config.get<string[]>("language") || [];
7575
const isEnglishEnabled = languages.includes("English");
7676

0 commit comments

Comments
 (0)