Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,9 @@ Thanks for [@yihong0618](https://github.com/yihong0618) provided a workaround wh
## Settings

| Setting Name | Description | Default Value |
| --------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------ |
| --------------------------------- |---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| ------------------ |
| `leetcode.hideSolved` | Specify to hide the solved problems or not | `false` |
| `leetcode.defaultLanguage` | Specify the default language used to solve the problem. Supported languages are: `bash`, `c`, `cpp`, `csharp`, `golang`, `java`, `javascript`, `kotlin`, `mysql`, `php`, `python`,`python3`,`ruby`,`rust`, `scala`, `swift`, `typescript` | `N/A` |
| `leetcode.defaultLanguage` | Specify the default language used to solve the problem. Supported languages are: `bash`, `c`, `cpp`, `csharp`, `golang`, `java`, `javascript`, `kotlin`, `mysql`, `postgresql`, `php`, `python`,`python3`,`ruby`,`rust`, `scala`, `swift`, `typescript` | `N/A` |
| `leetcode.useWsl` | Specify whether to use WSL or not | `false` |
| `leetcode.endpoint` | Specify the active endpoint. Supported endpoints are: `leetcode`, `leetcode-cn` | `leetcode` |
| `leetcode.workspaceFolder` | Specify the path of the workspace folder to store the problem files. | `""` |
Expand Down
13 changes: 13 additions & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -311,6 +311,7 @@
"javascript",
"kotlin",
"mysql",
"postgresql",
"php",
"python",
"python3",
Expand Down Expand Up @@ -535,6 +536,18 @@
},
"minProperties": 1
},
"postgresql": {
"type": "object",
"properties": {
"folder": {
"type": "string"
},
"filename": {
"type": "string"
}
},
"minProperties": 1
},
"php": {
"type": "object",
"properties": {
Expand Down
2 changes: 2 additions & 0 deletions src/shared.ts
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ export const languages: string[] = [
"javascript",
"kotlin",
"mysql",
"postgresql",
"php",
"python",
"python3",
Expand All @@ -49,6 +50,7 @@ export const langExt: Map<string, string> = new Map([
["javascript", "js"],
["kotlin", "kt"],
["mysql", "sql"],
["postgresql", "sql"],
["php", "php"],
["python", "py"],
["python3", "py"],
Expand Down
10 changes: 7 additions & 3 deletions src/webview/markdownEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,15 @@ class MarkdownEngine implements vscode.Disposable {
highlight: (code: string, lang?: string): string => {
switch (lang && lang.toLowerCase()) {
case "mysql":
lang = "sql"; break;
case "postgresql":
lang = "sql";
break;
case "json5":
lang = "json"; break;
lang = "json";
break;
case "python3":
lang = "python"; break;
lang = "python";
break;
}
if (lang && hljs.getLanguage(lang)) {
try {
Expand Down