-
Notifications
You must be signed in to change notification settings - Fork 0
/
templates.odin
103 lines (93 loc) · 2.33 KB
/
templates.odin
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
package main
run_batch_pre := "@ECHO OFF\nodin run . -file -out:./bin/"
run_batch_file := "%v"
run_batch_post := ".exe -debug -vet -strict-style -show-timings"
build_batch_pre := "@ECHO OFF\nodin build . -file -out:./bin/"
build_batch_file := "%v"
build_batch_post := ".exe -debug -vet -strict-style -show-timings"
clean_batch :=
"@ECHO OFF\n" +
"del .\\*.ilk .\\*.obj .\\*.pdb .\\*.exe .\\*.dll\n" +
"del .\\build\\*.ilk .\\build\\*.obj .\\build\\*.pdb .\\build\\*.exe .\\build\\*.lib .\\build\\*.dll .\\build\\*.exp\n"
launch_json_pre :=
"{" +
"\"version\": \"0.2.0\"," +
"\"configurations\": [" +
"{" +
"\"name\": \"Odin Debug\"," +
"\"type\": \"cppvsdbg\"," +
"\"request\": \"launch\"," +
"\"program\": \""
launch_json_command := "./bin/%v.exe"
launch_json_post :=
"\"," +
"\"args\": []," +
"\"stopAtEntry\": false, " +
"\"cwd\": \"${workspaceFolder}\", " +
"\"environment\": [], " +
"\"preLaunchTask\": \"build\" " +
"}" +
"]" +
"}"
settings_json :=
"{" +
"\"editor.defaultFormatter\": \"DanielGavin.ols\"," +
"\"editor.formatOnSave\": true" +
"}"
tasks_json :=
"{" +
"\"version\": \"2.0.0\"," +
"\"tasks\": [" +
"{" +
"\"label\": \"build\"," +
"\"type\": \"shell\"," +
"\"command\": \"./build.bat\"," +
"\"group\": {" +
"\"kind\": \"build\"," +
"\"isDefault\": true" +
"}," +
"\"problemMatcher\": [\"$gcc\"]" +
"}" +
"]" +
"}"
ols_json :=
"{" +
"\"collections\": [" +
"{" +
"\"name\": \"core\"," +
"\"path\": \"C:\\\\programming\\\\odin\\\\Odin\\\\core\"" +
"}," +
"{" +
"\"name\": \"vendor\"," +
"\"path\": \"C:\\\\programming\\\\odin\\\\Odin\\\\vendor\"" +
"}" +
"]," +
"\"enable_document_symbols\": true, " +
"\"enable_semantic_tokens\": true, " +
"\"enable_inlay_hints\": true, " +
"\"enable_procedure_snippet\": true, " +
"\"enable_hover\": true, " +
"\"enable_snippets\": true, " +
"\"enable_format\": true, " +
"\"formatter\": { " +
"\"tabs\": true, " +
"\"tabs_width\": 4, " +
"\"character_width\": 80 " +
"}" +
"}"
odinfmt_json :=
"{" +
"\"$schema\": \"https://raw.githubusercontent.com/DanielGavin/ols/master/misc/odinfmt.schema.json\"," +
"\"character_width\": 80," +
"\"tabs\": true, " +
"\"tabs_width\": 4 " +
"}"
main_lines := []string {
"package main\n",
"\n",
"import \"core:fmt\"\n",
"\n",
"main :: proc() {\n",
"\tfmt.println(\"[odin-init] Hello from the otherside\")\n",
"}",
}