@@ -3,42 +3,50 @@ local tag = require("rust.builder.tag")
3
3
local raw = require (" rust.builder.raw" )
4
4
5
5
return {
6
- [not OSX and not CURSES and ' cl' or ' ml' ] = {
7
- -- Open this module for editing: `Alt/⌘-L` `M`
8
- s =
9
- function () io .open_file (_USERHOME .. ' /modules/rust/snippets.lua' ) end
10
- },
11
-
12
- [' s\n ' ] = function ()
13
- buffer :line_end ()
14
- buffer :add_text (' ;' )
15
- buffer :new_line ()
16
- end ,
17
-
18
- [' a\n ' ] = function ()
19
- buffer :line_end ()
20
- buffer :new_line ()
21
- buffer :add_text (" /// " );
22
- end ,
23
-
24
- [' cB' ] = function ()
25
- local project_name , project_path = raw .get_project_name ()
26
-
27
- if project_path then
28
- local tmp = raw .build (project_path )
29
-
30
- api .build (project_name , project_path , tmp )
31
- tag .build (project_name , project_path , tmp )
32
- os.remove (tmp )
33
-
34
- api .add_apitag (project_name , project_path )
6
+ [not OSX and not CURSES and ' cl' or ' ml' ] =
7
+ {
8
+ -- Open this module for editing: `Alt/⌘-L` `M`
9
+ s =
10
+ function () io .open_file (_USERHOME .. ' /modules/rust/snippets.lua' ) end
11
+ }
12
+ ,
13
+
14
+ [' s\n ' ] =
15
+ function ()
16
+ buffer :line_end ()
17
+ buffer :add_text (' ;' )
18
+ buffer :new_line ()
35
19
end
20
+ ,
36
21
37
- if io.open (' ../Cargo.toml' ) ~= nil then
38
- textadept .run .compile ()
39
- return
22
+ [' a\n ' ] =
23
+ function ()
24
+ buffer :line_end ()
25
+ buffer :new_line ()
26
+ buffer :add_text (" /// " );
40
27
end
28
+ ,
41
29
42
- return textadept .run .build ()
43
- end ,
30
+ [' cB' ] =
31
+ function ()
32
+ local project_name , project_path = raw .get_project_name ()
33
+
34
+ if project_path then
35
+ local tmp = raw .build (project_path )
36
+
37
+ api .build (project_name , project_path , tmp )
38
+ tag .build (project_name , project_path , tmp )
39
+ os.remove (tmp )
40
+
41
+ api .add_apitag (project_name , project_path )
42
+ end
43
+
44
+ if io.open (' ../Cargo.toml' ) ~= nil then
45
+ textadept .run .compile ()
46
+ return
47
+ end
48
+
49
+ return textadept .run .build ()
50
+ end
51
+ ,
44
52
}
0 commit comments