File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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" ,
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" ,
Original file line number Diff line number Diff 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." ) ;
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments