irongit

A Neovim plugin enabling you to solve LeetCode problems.

docs: fix typo

kawreauthored
parent 14c1de4commit dde441fa1875a966aa65d4fd3bcdb4d5fe18098cBrowse files

5 files changed, +5 -7

+1-1README.md
@@ -244,7 +244,7 @@ Inject code before or after your solution, injected code won't be submitted or r
244244 You can also pass `before = true` to inject default imports for the language.
245245 Supported languages are `python`, `python3`, `java`
246246
247-Access default imports via `require("leetcode.config.imports)`
247+Access default imports via `require("leetcode.config.imports")`
248248
249249 ```lua
250250 injector = { ---@type table<lc.lang, lc.inject>
+1-1README.zh.md
@@ -246,7 +246,7 @@ logging = true
246246 您还可以传递 `before = true` 以注入语言的默认导入。
247247 支持的语言为 `python`、`python3`、`java`
248248
249-通过 `require("leetcode.config.imports)` 访问默认导入
249+通过 `require("leetcode.config.imports")` 访问默认导入
250250
251251 ```lua
252252 injector = { ---@type table<lc.lang, lc.inject>
+2-3lua/leetcode-ui/question.lua
@@ -69,11 +69,10 @@ function Question:path()
6969
7070 local fn = ("%s.%s%s.%s"):format(self.q.frontend_id, self.q.title_slug, alt, lang.ft)
7171 self.file = config.storage.home:joinpath(fn)
72- local existed = true
72+ local existed = self.file:exists()
7373
74- if not self.file:exists() then --
74+ if not existed then --
7575 self.file:write(self:snippet(), "w")
76- existed = false
7776 end
7877
7978 return self.file:absolute(), existed
+1-1lua/leetcode-ui/renderer/menu.lua
@@ -145,7 +145,7 @@ function Menu:remount()
145145 api.nvim_buf_delete(self.bufnr, { force = true })
146146 end
147147
148- vim.cmd.tabe()
148+ vim.cmd("$tabnew")
149149 self.bufnr = api.nvim_get_current_buf()
150150 self.winid = api.nvim_get_current_win()
151151
+0-1lua/leetcode/config/imports.lua
@@ -51,7 +51,6 @@ imports["python"] = {
5151 "from itertools import *",
5252 "from functools import *",
5353 "from operator import *",
54- "from __builtin__ import *",
5554 "import string",
5655 "import re",
5756 "import datetime",