@@ -105,6 +105,57 @@ or set `haskell.serverExecutablePath` (overrides all other settings) to a valid
105
105
106
106
If you need to set mirrors for ghcup download info, check the settings ` haskell.metadataURL ` and ` haskell.releasesURL ` .
107
107
108
+ ### Setting a specific toolchain
109
+
110
+ When ` manageHLS ` is set to ` GHCup ` , you can define a specific toolchain (` hls ` , ` ghc ` , ` cabal ` and ` stack ` ),
111
+ either globally or per project. E.g.:
112
+
113
+ ``` json
114
+ {
115
+ "haskell.toolchain" : {
116
+ "hls" : " 1.6.1.1" ,
117
+ "cabal" : " recommended" ,
118
+ "stack" : null
119
+ }
120
+ }
121
+ ```
122
+
123
+ This means:
124
+
125
+ 1 . install the ` ghc ` version corresponding to the project (default, because it's omitted)
126
+ 2 . install ` hls ` 1.6.1.1
127
+ 3 . install the recommended ` cabal ` version from ghcup
128
+ 4 . don't install any ` stack ` version
129
+
130
+ Another config could be:
131
+
132
+ ``` json
133
+ {
134
+ "haskell.toolchain" : {
135
+ "ghc" : " 9.2.2" ,
136
+ "hls" : " latest"
137
+ "cabal" : " recommended"
138
+ }
139
+ }
140
+ ```
141
+
142
+ Meaning:
143
+
144
+ 1 . install ` ghc ` 9.2.2 regardless of what the project requires
145
+ 2 . always install latest ` hls ` , even if it doesn't support the given GHC version
146
+ 3 . install recommended ` cabal `
147
+ 4 . install latest ` stack ` (default, because it's omitted)
148
+
149
+ The defaults (when omitted) are as follows:
150
+
151
+ 1 . install the project required ` ghc ` (corresponding to ` with-compiler ` setting in ` cabal.project ` for example)
152
+ 2 . install the latest ` hls ` version that supports the project required ghc version
153
+ 3 . install latest ` cabal `
154
+ 3 . install latest ` stack `
155
+
156
+ When a the value is ` null ` , the extension will refrain from installing it.
157
+
158
+
108
159
### Supported GHC versions
109
160
110
161
These are the versions of GHC that there are binaries of ` haskell-language-server-1.6.1 ` for. Building from source may support more versions!
0 commit comments