aboutsummaryrefslogtreecommitdiffstats
path: root/lsp/rescriptls.lua
diff options
context:
space:
mode:
authorDaniel Kirchhof <dkirchhof@gmail.com>2025-07-18 05:30:18 +0200
committerGitHub <noreply@github.com>2025-07-17 20:30:18 -0700
commit0c56e468c9bbd3cc8bc826fe14e2159bdca374a0 (patch)
tree6fa26b617c9a32cefb2107a108b532248ee754fa /lsp/rescriptls.lua
parentdocs: readme (diff)
downloadnvim-lspconfig-0c56e468c9bbd3cc8bc826fe14e2159bdca374a0.tar
nvim-lspconfig-0c56e468c9bbd3cc8bc826fe14e2159bdca374a0.tar.gz
nvim-lspconfig-0c56e468c9bbd3cc8bc826fe14e2159bdca374a0.tar.bz2
nvim-lspconfig-0c56e468c9bbd3cc8bc826fe14e2159bdca374a0.tar.lz
nvim-lspconfig-0c56e468c9bbd3cc8bc826fe14e2159bdca374a0.tar.xz
nvim-lspconfig-0c56e468c9bbd3cc8bc826fe14e2159bdca374a0.tar.zst
nvim-lspconfig-0c56e468c9bbd3cc8bc826fe14e2159bdca374a0.zip
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
Diffstat (limited to 'lsp/rescriptls.lua')
-rw-r--r--lsp/rescriptls.lua11
1 files changed, 11 insertions, 0 deletions
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' },