-
-
Notifications
You must be signed in to change notification settings - Fork 135
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
add option to select default language #22
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for working on this. Looks great. Comments below.
Additionally, please add a line or two in the README.md, in the Tips section, on how you can use this setting to make your favourite language as default!
package.json
Outdated
"title": "Default Language for new problems", | ||
"type": "string", | ||
"default": "", | ||
"enum": ["", "C", "C++", "Python", "Rust"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it's possible to be more explicit than ""
- "None"
can be better.
companionHandler.js
Outdated
const defaultLanguage = preferences().get("defaultLanguage"); | ||
let selectLanguage; | ||
if(defaultLanguage != "") { | ||
selectLanguage = new Promise( (resolve) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Instead of using this useless promise, you can move both the logics within a single promise, and then do the clecking logic defaultLanguage != "" ...
inside this single promise. This can also help eliminate the variable selectLanguage
.
package.json
Outdated
"title": "Default Language for new problems", | ||
"type": "string", | ||
"default": "", | ||
"enum": ["", "C", "C++", "Python", "Rust"], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Add a description - what this setting does.
Merged. Thanks! |
No description provided.