From 0a94fd87d77e6e4e9ae3e0a8e383717938872415 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Mon, 13 Nov 2023 20:42:47 -0300 Subject: [PATCH 1/2] add server config --- server/config.md | 63 ++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 server/config.md diff --git a/server/config.md b/server/config.md new file mode 100644 index 000000000..57d0d17ce --- /dev/null +++ b/server/config.md @@ -0,0 +1,63 @@ +# Configuration + +The ReScript Language Server support the folowing configuration. + +These configurations are sent to the server on [initialization](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#initialize) + +```typescript +interface config { + /** + * Format code using builtin formatter from ReScript Compiler + * @default false + */ + allowBuiltInFormatter: boolean; + + /** + * Whether you want the extension to prompt for autostarting a ReScript build if a project is opened with no build running + * @default true + */ + askToStartBuild: boolean; + + /** + * Inlay Hint config + */ + inlayHints: { + /** + * Enable Inlay Hint + * @defalt false + */ + enable: boolean; + /** + * Maximum length of character for inlay hints. Set to null to have an unlimited length. Inlay hints that exceed the maximum length will not be shown + * @defalt 25 + */ + maxLength: number | null; + }; + /** + * Enable CodeLens + * @default false + */ + codeLens: boolean; + /** + * Path to the directory where cross-platform ReScript binaries are. You can use it if you haven't or don't want to use the installed ReScript from node_modules in your project. + * @default null + */ + binaryPath: string | null; + /** + * Path to the directory where platform-specific ReScript binaries are. You can use it if you haven't or don't want to use the installed ReScript from node_modules in your project. + * @default null + */ + platformPath: string | null; + + /** + * Signature Help config + */ + signatureHelp: { + /** + * Enable Signature Help + * @default true + */ + enabled: boolean; + }; +} +``` From 2cef6ecadd92bc3e63c23f32fb9ddac3a1b9af91 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Mon, 13 Nov 2023 21:31:37 -0300 Subject: [PATCH 2/2] update --- server/config.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/server/config.md b/server/config.md index 57d0d17ce..12687faeb 100644 --- a/server/config.md +++ b/server/config.md @@ -7,7 +7,7 @@ These configurations are sent to the server on [initialization](https://microsof ```typescript interface config { /** - * Format code using builtin formatter from ReScript Compiler + * Format code using builtin formatter from server * @default false */ allowBuiltInFormatter: boolean;