diff --git a/README.md b/README.md index 78085a6..2e7cf9b 100644 --- a/README.md +++ b/README.md @@ -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: diff --git a/src/fennel-ls/handlers.fnl b/src/fennel-ls/handlers.fnl index f463d4e..5a56e0d 100644 --- a/src/fennel-ls/handlers.fnl +++ b/src/fennel-ls/handlers.fnl @@ -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"