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
description: Glossary of terms used in the Lingua Franca documentation.
4
+
---
5
+
6
+
# Glossary
7
+
8
+
Glossary of terms used in the Lingua Franca (LF) documentation.
9
+
10
+
### LF File
11
+
A source file with the `.lf` extension, representing a Lingua Franca (LF) program.
12
+
13
+
### Package
14
+
A collection of LF source files and directories, along with a `Lingo.toml` manifest file that defines the package configuration. Every package must include an `src/` directory containing the LF source files.
15
+
The **package root** is the top-level directory where both the `Lingo.toml` file and the `src/` directory reside, serving as the main directory for the package.
16
+
17
+
### Project
18
+
Another term for a [package](#package).
19
+
20
+
### Library File
21
+
An LF file containing one or more reactors intended for reuse, designed to be imported into multiple LF files.
22
+
23
+
### Package Manager
24
+
A software tool that automates the installation, configuration, and management of packages. In the LF ecosystem, the `lingo` package manager is used to manage LF packages and dependencies.
Copy file name to clipboardExpand all lines: docs/tools/code-extension.mdx
+32-32Lines changed: 32 additions & 32 deletions
Original file line number
Diff line number
Diff line change
@@ -14,9 +14,23 @@ The Lingua Franca extension for Visual Studio Code (VS Code) provides syntax-dir
14
14
15
15
### Creating a New Package
16
16
17
-
You can create a new LF package either manually by creating an LF file or by using the [Lingo Package Manager](https://github.com/lf-lang/lingo).
17
+
You can create a new LF [package](../glossary/glossary.mdx#package) either manually by creating an LF file or by using the [Lingo Package Manager](https://github.com/lf-lang/lingo).
18
18
19
-
#### Option 1: Manually Create an LF File
19
+
#### Option 1: Create an LF Package Using the Lingo Package Manager
20
+
1. After [installing the Lingo Package Manager](https://www.lf-lang.org/docs/installation#lingo), create an empty directory with the desired name for your LF package.
21
+
2. Open the folder in VS Code.
22
+
3. Open the terminal in this folder and run the <kbd>lingo init</kbd> command.
23
+
24
+
This will set up a new LF package with the following structure:
25
+
26
+
```
27
+
├── .
28
+
│ ├── src/
29
+
│ │ └── Main.lf
30
+
└── └── Lingo.toml # Configuration file for current package
31
+
```
32
+
33
+
#### Option 2: Manually Create an [LF File](../glossary/glossary.mdx#lf-file)
20
34
1. Go to <kbd>File > New File...</kbd> and select `New Lingua Franca File`.
21
35
2. Save the file in a directory called `src` to ensure that generated code is placed in a parallel `src-gen` directory. For example, if your file is called `Foo.lf`, the directory structure after building will look like this:
22
36
@@ -33,20 +47,6 @@ You can create a new LF package either manually by creating an LF file or by usi
33
47
34
48
If you manually create the `Lingo.toml` file, place it adjacent to the `src` folder in the root directory of the package. This file serves as a configuration for the package, allowing you to specify the package name, version, and other metadata, including any dependencies you want to install.
35
49
36
-
#### Option 2: Create an LF Package Using the Lingo Package Manager
37
-
1. After installing and configuring the Lingo Package Manager, create an empty folder with the desired name for the LF package.
38
-
2. Open the folder in VS Code.
39
-
3. Open the terminal in this folder and run the <kbd>lingo init</kbd> command.
40
-
41
-
This will set up a new LF package with the following structure:
42
-
43
-
```
44
-
├── .
45
-
│ ├── src/
46
-
│ │ └── Main.lf
47
-
└── └── Lingo.toml # Configuration file for current package
48
-
```
49
-
50
50
### Opening an Existing LF package
51
51
52
52
To open an existing LF package in VS Code, select the root directory of your Lingua Franca package as your workspace.
@@ -58,7 +58,7 @@ The correct structure of the LF package should look like this:
│ │ ├── lfc_include/ # Directory for storing reusable reactors
61
-
│ │ └── └── installed_library/
61
+
│ │ └── └── installed_package/
62
62
│ ├── include/
63
63
│ ├── src/
64
64
│ │ ├── lib/ # Directory for storing reusable reactors
@@ -96,30 +96,30 @@ The **Lingua Franca Package Explorer** can be accessed by clicking on the **LF i
96
96
└── └── Source Files
97
97
```
98
98
99
-
-[**Installed Packages**](#installed-packages): Lists libraries installed via the Lingo Package Manager, located in the `./build/lfc_include` directory (if any).
99
+
-[**Installed Packages**](#installed-packages): Lists packages installed via the Lingo Package Manager, located in the `./build/lfc_include` directory (if any).
100
100
101
-
-[**Local Libraries**](#local-libraries): Displays locally defined libraries (e.g., reusable reactors), located in the `./src/lib` directory.
101
+
-[**Local Libraries**](#local-libraries): Displays locally defined [library files](../glossary/glossary.mdx#library-file) (e.g., reusable reactors), located in the `./src/lib` directory.
102
102
103
103
-[**Source Files**](#source-files): Contains the LF source files created by the developer, located in the `./src/` directory.
104
104
105
105
The **Source Files** section is always present as it reflects the main LF files in the package. However, the **Installed Packages** and **Local Libraries** sections appear only if the respective directories and files exist in the workspace.
106
106
107
-
Hovering over the **LF Package** item reveals a terminal icon. Clicking this icon opens a terminal window at the package's root directory, allowing you to execute commands directly within that directory.
107
+
Hovering over the **\<Package Name\>** item reveals a terminal icon. Clicking this icon opens a terminal window at the package's root directory, allowing you to execute commands directly within that directory.
108
108
109
109
#### Installed Packages
110
110
111
-
The **Installed Packages** section lists libraries installed using the [Lingo Package Manager](https://github.com/lf-lang/lingo). Developers can use the Lingo Package Manager to retrieve and install LF programs from repositories such as the [Lingua Franca Community Organization](https://github.com/LF-Community).
111
+
The **Installed Packages** section lists packages installed using the [Lingo Package Manager](https://github.com/lf-lang/lingo). Developers can use the Lingo Package Manager to retrieve and install LF programs from repositories such as the [Lingua Franca Community Organization](https://github.com/LF-Community).
112
112
113
-
To install libraries:
114
-
1. Configure the `Lingo.toml` file with the desired libraries.
113
+
To install packages:
114
+
1. Configure the `Lingo.toml` file with the desired package.
115
115
2. Run <kbd>lingo build</kbd> in the terminal from the current directory to download the specified dependencies.
116
116
117
-
Once the libraries are installed, they will appear in the `./build/lfc_include/` directory. The **Installed Packages** section will then be structured as follows:
117
+
Once the packages are installed, they will appear in the `./build/lfc_include/` directory. The **Installed Packages** section will then be structured as follows:
118
118
119
119
```
120
-
├── LF Package
120
+
├── <Package Name>
121
121
│ ├── Installed Packages
122
-
│ │ ├── installed_library/
122
+
│ │ ├── installed_package/
123
123
│ │ │ ├── File_1.lf
124
124
│ │ │ │ ├── Rusable_Reactor_1.lf
125
125
│ │ │ │ ├── Rusable_Reactor_2.lf
@@ -130,17 +130,17 @@ Once the libraries are installed, they will appear in the `./build/lfc_include/`
130
130
```
131
131
132
132
In this structure:
133
-
-**LF Package**: Represents the root folder of the main package.
134
-
-**installed_library**: Represents each library listed in `Lingo.toml`, which contains one or more LF programs featuring reusable reactors.
133
+
-**\<Package Name\>**: Represents the root folder of the main package.
134
+
-**installed_package**: Represents each package listed in `Lingo.toml`, which contains one or more LF projects featuring reusable reactors.
135
135
136
-
The image below shows a visual representation of the **Installed Packages** section. The **project** icon indicates the LF Package folder (e.g., `AudioClassification`), while the **root-folder** icon represents the downloaded libraries (e.g., the `edgeai`library in the example). The **code file** icon denotes an LF program within a library, and the **bracket** icon represents individual reactors inside the LF program.
136
+
The image below shows a visual representation of the **Installed Packages** section. The **project** icon indicates the LF Package folder (e.g., `AudioClassification`), while the **root-folder** icon represents the downloaded package (e.g., the `edgeai`package in the example). The **code file** icon denotes an LF program within a package, and the **bracket** icon represents individual reactors inside the LF program.
The hierarchy categorizes tree items into the following types:
141
141
142
-
1.**`library-root`**: Refers to the root folder of each downloaded library.
143
-
2.**`file`**: Represents an LF program within the library.
142
+
1.**`package-root`**: Refers to the root folder of each downloaded package.
143
+
2.**`file`**: Represents an LF program within the package.
144
144
3.**`reactor`**: Refers to individual reactors within the LF program.
145
145
146
146
When focusing on the **Installed Packages** section, an `edit` command becomes available. Clicking it opens the `Lingo.toml` file in the editor for configuration changes. The following actions are available for items in the **Installed Packages** section:
@@ -206,7 +206,7 @@ The **Source Files** section lists all LF programs in the `./src/` directory. Th
0 commit comments