irongit

A Neovim plugin enabling you to solve LeetCode problems.

docs(readme): `translator`

kawreauthored
parent bc9db82commit 020184dc30fb9272799592974468101570052e3bBrowse files

3 files changed, +25 -25

+10-14README.md
@@ -80,6 +80,7 @@ To see full configuration types see [template.lua](./lua/leetcode/config/templat
8080
8181 cn = { -- leetcode.cn
8282 enabled = false, ---@type boolean
83+ translator = true, ---@type boolean
8384 translate_problems = true, ---@type boolean
8485 },
8586
@@ -96,28 +97,28 @@ To see full configuration types see [template.lua](./lua/leetcode/config/templat
9697 console = {
9798 open_on_runcode = true, ---@type boolean
9899
99- dir = "row", ---@type "col" | "row"
100+ dir = "row", ---@type lc.direction
100101
101- size = {
102- width = "90%", ---@type string | integer
103- height = "75%", ---@type string | integer
102+ size = { ---@type lc.size
103+ width = "90%",
104+ height = "75%",
104105 },
105106
106107 result = {
107- size = "60%", ---@type string | integer
108+ size = "60%", ---@type lc.size
108109 },
109110
110111 testcase = {
111112 virt_text = true, ---@type boolean
112113
113- size = "40%", ---@type string | integer
114+ size = "40%", ---@type lc.size
114115 },
115116 },
116117
117118 description = {
118- position = "left", ---@type "top" | "right" | "bottom" | "left"
119+ position = "left", ---@type lc.position
119120
120- width = "40%", ---@type string | integer
121+ width = "40%", ---@type lc.size
121122 },
122123
123124 hooks = {
@@ -160,6 +161,7 @@ Use [leetcode.cn] instead of [leetcode.com][leetcode]
160161 ```lua
161162 cn = { -- leetcode.cn
162163 enabled = false, ---@type boolean
164+ translator = true, ---@type boolean
163165 translate_problems = true, ---@type boolean
164166 },
165167 ```
@@ -263,12 +265,6 @@ Meaning that to launch [leetcode.nvim] you **have** to pass
263265 nvim leetcode.nvim
264266 ```
265267
266-### Pop-ups
267-
268-🚨 _Do **not**_ close [leetcode.nvim] pop-ups with `:q` 🚨
269-
270-There are **two** shortcuts specifically designed for closing them which are `q` and `Esc`.
271-
272268 ### Sign In
273269
274270 It is **required** to be **signed-in** to use [leetcode.nvim]
+14-10README.zh.md
@@ -84,6 +84,7 @@ https://github.com/kawre/leetcode.nvim/assets/69250723/309088c9-4ff7-4dff-ab61-a
8484
8585 cn = { -- leetcode.cn
8686 enabled = false, ---@type boolean
87+ translator = true, ---@type boolean
8788 translate_problems = true, ---@type boolean
8889 },
8990
@@ -100,28 +101,28 @@ https://github.com/kawre/leetcode.nvim/assets/69250723/309088c9-4ff7-4dff-ab61-a
100101 console = {
101102 open_on_runcode = true, ---@type boolean
102103
103- dir = "row", ---@type "col" | "row"
104+ dir = "row", ---@type lc.direction
104105
105- size = {
106- width = "90%", ---@type string | integer
107- height = "75%", ---@type string | integer
106+ size = { ---@type lc.size
107+ width = "90%",
108+ height = "75%",
108109 },
109110
110111 result = {
111- size = "60%", ---@type string | integer
112+ size = "60%", ---@type lc.size
112113 },
113114
114115 testcase = {
115116 virt_text = true, ---@type boolean
116117
117- size = "40%", ---@type string | integer
118+ size = "40%", ---@type lc.size
118119 },
119120 },
120121
121122 description = {
122- position = "left", ---@type "top" | "right" | "bottom" | "left"
123+ position = "left", ---@type lc.position
123124
124- width = "40%", ---@type string | integer
125+ width = "40%", ---@type lc.size
125126 },
126127
127128 hooks = {
@@ -162,8 +163,11 @@ lang = "cpp"
162163 将 [leetcode.com][leetcode] 替换为 [leetcode.cn]
163164
164165 ```lua
165----@type lc.domain
166-domain = "com" -- 目前仅支持 "com"
166+cn = { -- leetcode.cn
167+ enabled = false, ---@type boolean
168+ translator = true, ---@type boolean
169+ translate_problems = true, ---@type boolean
170+},
167171 ```
168172
169173 ### directory
+1-1lua/leetcode/config/template.lua
@@ -47,8 +47,8 @@ local M = {
4747
4848 cn = { -- leetcode.cn
4949 enabled = false, ---@type boolean
50- translate_problems = true, ---@type boolean
5150 translator = true, ---@type boolean
51+ translate_problems = true, ---@type boolean
5252 },
5353
5454 ---@type string