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
+39-40Lines changed: 39 additions & 40 deletions
Original file line number
Diff line number
Diff line change
@@ -137,11 +137,33 @@ Here are some links that will help you get familiar with the VS Code extension f
137
137
138
138
### Configuration
139
139
140
-
You can configure the extension via the `.vscode/settings.json` workspace settings file or the [multi-root workspace file](https://code.visualstudio.com/docs/editor/multi-root-workspaces).
141
-
More information about settings and the different ways that can be used to specify them can be found [here](doc/settings.md).
140
+
[ALS settings](doc/settings.md) can be specified in various ways. For example:
141
+
142
+
- A `.als.json` file at the root of the workspace.
143
+
- A global user configuration file `$HOME/.config/als/config.json`
144
+
- The `.vscode/settings.json` VS Code workspace settings file.
145
+
- A [multi-root VS Code workspace file](https://code.visualstudio.com/docs/editor/multi-root-workspaces)
146
+
- The User or Remote or other VS Code [scopes of of settings](https://code.visualstudio.com/docs/configure/settings#_settings-precedence)
147
+
148
+
The `.als.json` file is the preferred method of defining workspace-specific settings because it applies in any IDE or editor that uses ALS. More information about configuration files can be found [here](doc/settings.md).
142
149
143
150
Here is an example config file that sets the project file to use and the scenario variables, as well as other useful settings (charset, whether we should show file diagnostics etc.):
144
151
152
+
```json
153
+
{
154
+
"projectFile": "gnatcov.gpr",
155
+
"scenarioVariables": {
156
+
"BINUTILS_BUILD_DIR": "/null",
157
+
"BINUTILS_SRC_DIR": "/null"
158
+
},
159
+
"defaultCharset": "utf-8",
160
+
"adaFileDiagnostics": false,
161
+
"renameInComments": false
162
+
}
163
+
```
164
+
165
+
Alternatively, the ALS can be configured in the VS Code settings UI or in the JSON settings files. For example:
166
+
145
167
```json
146
168
{
147
169
"ada.projectFile": "gnatcov.gpr",
@@ -450,6 +472,8 @@ configure the Ada Language Server with `:CocConfig`:
450
472
}
451
473
```
452
474
475
+
Alternatively to the above settings section, workspace-specific [ALS Settings](doc/settings.md) such as the `projectFile` can be provided in a `.als.json` file at the root of the workspace.
476
+
453
477
### Integration with vim-lsp
454
478
455
479
If you want to integrate the Ada Language Server into vim, you can use the
@@ -464,13 +488,12 @@ if executable('ada_language_server')
Copy file name to clipboardExpand all lines: doc/settings.md
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@
4
4
5
5
The ALS loads configuration settings from different sources. All configuration sources are loaded in the following order:
6
6
7
-
1. A global user configuration file `$XDG_CONFIG_HOME/als/config.json`, if it exists.
7
+
1. A global user configuration file `$XDG_CONFIG_HOME/als/config.json`, if it exists. The path [defaults](https://specifications.freedesktop.org/basedir-spec/0.8/#variables) to `$HOME/.config/als/config.json` if `XDG_CONFIG_HOME` is not set.
8
8
9
9
1. A workspace-specific `.als.json` file in the directory where ALS is spawned, if it exists.
0 commit comments