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: doc/settings.md
+14-4Lines changed: 14 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,11 @@
2
2
3
3
## Configuration Sources
4
4
5
-
The ALS loads configuration settings from different sources in the following order:
5
+
The ALS loads configuration settings from different sources. All configuration sources are loaded in the following order:
6
6
7
-
1.The 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.
8
8
9
-
1.The file`.als.json` in the directory where ALS is spawned, if it exists.
9
+
1.A workspace-specific`.als.json` file in the directory where ALS is spawned, if it exists.
10
10
11
11
This is the prefered location to store project-specific settings that are tracked in version control and shared among developers.
12
12
@@ -16,7 +16,11 @@ The ALS loads configuration settings from different sources in the following ord
16
16
17
17
1. In `workspace/didChangeConfiguration` LSP notifications, if specified.
18
18
19
-
If given, the configuration file must be a JSON file with the following structure:
19
+
Each configuration source can contain a partial list of settings. Thus each
20
+
configuration source can override individual settings while preserving
21
+
previously loaded settings.
22
+
23
+
Configuration files must be JSON files matching [this JSON schema](integration/vscode/ada/schemas/als-settings-schema.json). Roughly the structure looks like this:
20
24
21
25
```json
22
26
{
@@ -61,6 +65,12 @@ Similarly, settings passed in `workspace/didChangeConfiguration` notifications s
61
65
}
62
66
```
63
67
68
+
## Base Configuration
69
+
70
+
The *base configuration* is the one that ALS reaches after loading configuration files (i.e. global user configuration, workspace-specific `.als.json` file, and `--config` command line argument).
71
+
72
+
After that the ALS may receive configuration changes through the `initialize` request, or the `workspace/didChangeConfiguration` notification. In those messages, if settings have the value `null`, ALS reverts their value to the base configuration. This allows clients to temporarily override settings, and revert them back in the same session.
73
+
64
74
## Visual Studio Code
65
75
66
76
In the context of Visual Studio Code, configuration settings can be set in the
0 commit comments