Documented initializationOptions
We accept the settings object either from initialize:initializationOptions or workspace/didChangeConfiguration:settings. The readme now explains this.
This commit is contained in:
parent
31ea7a1039
commit
9db2ec7537
@ -1,5 +1,5 @@
|
||||
# fennel-ls
|
||||
A language server for fennel-ls.
|
||||
A language server for fennel.
|
||||
Supports Go-to-definition, and a little bit of completion suggestions.
|
||||
Fennel-LS uses static analysis, and does not execute your code.
|
||||
|
||||
@ -57,6 +57,10 @@ fennel-ls default settings:
|
||||
}
|
||||
```
|
||||
|
||||
Your editor can send these settings using one of these two methods:
|
||||
* The client sends an `initialize` request with the structure `{initializationOptions: {"fennel-ls": {...}}, ...}`
|
||||
* The client sends a `workspace/didChangeConfiguration` notfication containing the field `{settings: {"fennel-ls": {YOUR_SETTINGS}}}`
|
||||
|
||||
## License
|
||||
fennel-ls is licensed under the MIT license. See LICENSE for more info.
|
||||
This project also contains files from other projects:
|
||||
|
||||
@ -221,7 +221,7 @@ Every time the client sends a message, it gets handled by a function in the corr
|
||||
(state.flush-uri self uri))
|
||||
|
||||
(λ notifications.workspace/didChangeConfiguration [self send {: settings}]
|
||||
(state.write-configuration self settings.fennel-ls))
|
||||
(state.write-configuration self (?. settings :fennel-ls)))
|
||||
|
||||
(λ requests.shutdown [self send]
|
||||
"The server still needs to respond to this request, so the program can't close yet. Just wait until notifications.exit"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user