Skip to content

Commit 93ec8c1

Browse files
committed
[Pages] update docs.
Signed-off-by: Eric Wang <[email protected]>
1 parent b086bf7 commit 93ec8c1

File tree

2 files changed

+29
-2
lines changed

2 files changed

+29
-2
lines changed

docs/advanced.md

+22-1
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,8 @@ The local cache folder (`.lc/`) is in your home directory, e.g.
4444
problems.json # problems list
4545
1.two-sum.algorithms.json # specific problem info
4646

47+
Normally you don't need dig into the folder to manipulate those files. Use [cache command](https://skygragon.github.io/leetcode-cli/commands#cache) instead.
48+
4749
# Configuration
4850

4951
Create a JSON file named `.lcconfig` in your home directory, e.g.
@@ -54,7 +56,8 @@ Create a JSON file named `.lcconfig` in your home directory, e.g.
5456
"LANG": "java",
5557
"USE_COLOR": true,
5658
"COLOR_THEME": "default",
57-
"AUTO_LOGIN": false
59+
"AUTO_LOGIN": false,
60+
"PLUGINS": {}
5861
}
5962

6063
Here are some useful settings:
@@ -64,6 +67,24 @@ Here are some useful settings:
6467
* `ICON_THEME` to set icon them used in output.
6568
* `LANG` to set your default language used in coding.
6669
* `USE_COLOR` to enable colorful output.
70+
* `PLUGINS` to config each installed plugins, see [Plugins](#plugins).
71+
72+
*Example*
73+
74+
Config for `github.js` and `cpp.lint.js` plugins:
75+
76+
{
77+
"PLUGINS": {
78+
"github": {
79+
"repo": "https://github.com/skygragon/test",
80+
"token": "abcdefghijklmnopqrstuvwxyz"
81+
},
82+
"cpp.lint": {
83+
"bin": "~/bin/cpplibt.py",
84+
"flags": []
85+
}
86+
}
87+
}
6788

6889
# Color Theme
6990

docs/commands.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -120,7 +120,7 @@ Use keyword search and query:
120120

121121
# plugin
122122

123-
Display installed plugins. To install 3rd party plugins, please check the 'Advanced Tips'.
123+
Display installed plugins. To install 3rd party plugins, please check the [Advanced Tips](https://skygragon.github.io/leetcode-cli/advanced#plugins).
124124

125125
* `-i` to install new plugin.
126126
* `-d` to disable existing plugin.
@@ -129,6 +129,12 @@ Display installed plugins. To install 3rd party plugins, please check the 'Advan
129129

130130
*Example*
131131

132+
Install plugin.
133+
134+
$ leecode plugin -i company.js
135+
136+
List all the plugins, `` means the plugin is disabled.
137+
132138
$ leetcode plugin
133139
✔ retry default Plugin to retry last failed request if AUTO_LOGIN is on.
134140
✔ cache default Plugin to provide local cache.

0 commit comments

Comments
 (0)