File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 1
1
local config = require (" leetcode.config" )
2
2
3
- --- @class lc
3
+ --- @class lc.LeetCode
4
4
local leetcode = {}
5
5
6
6
local function should_start ()
@@ -52,6 +52,10 @@ local function setup_cmds()
52
52
end
53
53
54
54
local function start ()
55
+ local path = require (" plenary.path" )
56
+ config .home = path :new (config .user .directory ) --- @diagnostic disable-line
57
+ config .home :mkdir ()
58
+
55
59
setup_highlights ()
56
60
setup_cmds ()
57
61
Original file line number Diff line number Diff line change @@ -9,6 +9,7 @@ local config = {
9
9
domain = " https://leetcode.com" ,
10
10
debug = false ,
11
11
lang = " cpp" ,
12
+ home = {}, --- @type Path
12
13
}
13
14
14
15
--- @class lc.UserAuth
@@ -22,16 +23,11 @@ config.auth = {}
22
23
---
23
24
--- @param cfg lc.UserConfig Configurations to be merged.
24
25
function config .apply (cfg )
25
- local path = require (" plenary.path" )
26
-
27
26
config .user = vim .tbl_deep_extend (" force" , config .default , cfg )
28
27
29
- config .debug = config .user .debug or false
28
+ config .debug = config .user .debug or false --- @diagnostic disable-line
30
29
config .domain = " https://leetcode." .. config .user .domain
31
30
config .lang = config .user .lang
32
- --- @type Path
33
- config .home = path :new (config .user .directory )
34
- config .home :mkdir ()
35
31
end
36
32
37
33
return config
You can’t perform that action at this time.
0 commit comments