From 0c56e468c9bbd3cc8bc826fe14e2159bdca374a0 Mon Sep 17 00:00:00 2001 From: Daniel Kirchhof Date: Fri, 18 Jul 2025 05:30:18 +0200 Subject: docs(rescriptls): add didChangeWatchedFiles example #3954 Using the newest language server for rescript doesn't detect file changes by itself anymore. So you have to register to the didChangeWatchedFiles hook. I added this information to the configs.md, since the newest version is not yet released as stable but is required for the newest beta version of rescript. When it will be released, we should add the capabilities to the default config. For reference: https://github.com/rescript-lang/rescript-vscode/blob/master/CHANGELOG.md https://forum.rescript-lang.org/t/ann-rescript-12-beta-release-call-for-testing/6238/10 --- lsp/rescriptls.lua | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'lsp/rescriptls.lua') diff --git a/lsp/rescriptls.lua b/lsp/rescriptls.lua index 85203441..7f2af384 100644 --- a/lsp/rescriptls.lua +++ b/lsp/rescriptls.lua @@ -22,6 +22,17 @@ --- }) --- } --- ``` +--- +--- Detect file changes: While using @rescript/language-server >= 1.63.0 you have to detect file changes by registering the didChangeWatchedFiles hook. +--- ```lua +--- capabilities = { +--- workspace = { +--- didChangeWatchedFiles = { +--- dynamicRegistration = true, +--- }, +--- }, +--- } +--- ``` return { cmd = { 'rescript-language-server', '--stdio' }, filetypes = { 'rescript' }, -- cgit v1.2.3-70-g09d2