You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+20-3
Original file line number
Diff line number
Diff line change
@@ -26,7 +26,7 @@ Currently Lithia is an early proof of concept. Basic language features exist, bu
26
26
-[x] Creating a custom language server
27
27
-[x] ... with diagnostics
28
28
-[x] ... with syntax highlighting
29
-
-[] ... with auto completion _proof of concept_
29
+
-[x] ... with auto completion _basic_
30
30
-[ ] ... with highlights
31
31
-[ ] ... with refactorings
32
32
-[ ] ... with formatter
@@ -264,9 +264,26 @@ As shown, a common use case is to pass the module itself instead of multiple wit
264
264
265
265
### Module resolution
266
266
267
-
Lithia will search for a folder containing source files at the following locations:
267
+
To create your own package of modules, you can create a `Potfile`. Every module defined by the package is a directory next to the Potfile, with `.lithia` files in it.
268
+
269
+
Though there are a few special cases:
270
+
271
+
- the `cmd`-folder is typically used for individual files rather than a module. You execute them with `$ lithia cmd/<file>`.
272
+
- the `src`-folder represents the `root` of the package.
273
+
- if the `src`-folder is missing, the package `root` is next to the Potfile.
274
+
275
+
```
276
+
.
277
+
├── Potfile
278
+
├── cmd
279
+
│ ├── main.lithia
280
+
│ └── test.lithia
281
+
└── src
282
+
└── greet.lithia
283
+
```
284
+
285
+
If there aren't any matching local modules, Lithia will search for a package containing source files at the following locations:
268
286
269
-
- when executing a file, relative to it
270
287
- when in REPL, inside the current working directory
0 commit comments