From 27908d34ec386066b4db12a54cba1d40abb97396 Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sun, 3 Dec 2023 16:18:01 -0300 Subject: [PATCH 1/3] initial --- draft-v3-release.md | 54 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 draft-v3-release.md diff --git a/draft-v3-release.md b/draft-v3-release.md new file mode 100644 index 0000000..41fe28c --- /dev/null +++ b/draft-v3-release.md @@ -0,0 +1,54 @@ +[ANN] vim-rescript v3.0.0 release + +Hi everyone!!! + +We've just released the newest plugin for Vim. This release has some important changes. + +We only provide the Vim runtime files that provide the following features: + +1. Indentation +2. Syntax Highlight +3. Filetype detection + +## Breaking Changes + +- We removed the vendored server and native Vim commands (e.g `:RescriptBuild`, etc) + +## Improvements + +- Better syntax highlighting + +The `rescript-language-server` server is a dedicated package published on NPM. Users must do +installation and setup to get all the features. + +> If you are using [mason.nvim](https://github.com/williamboman/mason.nvim) you can install the ReScript Language Server using the command `MasonInstall rescript-language-server` + +```sh +npm install -g @rescript/language-server +``` + +## Noevim LSP builtin users + +Install nvim-lspconfig package. + +```lua +local lspconfig = require('lspconfig') + +lspconfig.rescriptls.setup{} +``` + +For more details, see [server configuration](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#rescriptls) + +## vim-coc users + +```json +"languageserver": { + "rescript": { + "enable": true, + "module": "rescript-language-server", + "args": ["--node-ipc"], + "filetypes": ["rescript"], + "rootPatterns": ["rescript.json", "bsconfig.json"] + } +} +``` From 95977abd0a1ed2d19462174429d1f068f275814a Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sun, 28 Jul 2024 20:50:49 -0300 Subject: [PATCH 2/3] update --- draft-v3-release.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/draft-v3-release.md b/draft-v3-release.md index 41fe28c..5d2eb40 100644 --- a/draft-v3-release.md +++ b/draft-v3-release.md @@ -9,6 +9,7 @@ We only provide the Vim runtime files that provide the following features: 1. Indentation 2. Syntax Highlight 3. Filetype detection +4. Commenting support (Neovim v10 has a built-in commenting) ## Breaking Changes @@ -27,7 +28,7 @@ installation and setup to get all the features. npm install -g @rescript/language-server ``` -## Noevim LSP builtin users +## Neovim LSP builtin users Install nvim-lspconfig package. From f27d30f9060651394ae6d147ef0438c6e88fac2d Mon Sep 17 00:00:00 2001 From: Pedro Castro Date: Sun, 28 Jul 2024 21:55:44 -0300 Subject: [PATCH 3/3] updates --- draft-v3-release.md | 36 ++++++++++++++++++++++++++++++++++-- 1 file changed, 34 insertions(+), 2 deletions(-) diff --git a/draft-v3-release.md b/draft-v3-release.md index 5d2eb40..79088c6 100644 --- a/draft-v3-release.md +++ b/draft-v3-release.md @@ -9,7 +9,7 @@ We only provide the Vim runtime files that provide the following features: 1. Indentation 2. Syntax Highlight 3. Filetype detection -4. Commenting support (Neovim v10 has a built-in commenting) +4. Commenting support (Neovim v10 (only) has a built-in commenting) ## Breaking Changes @@ -22,7 +22,11 @@ We only provide the Vim runtime files that provide the following features: The `rescript-language-server` server is a dedicated package published on NPM. Users must do installation and setup to get all the features. -> If you are using [mason.nvim](https://github.com/williamboman/mason.nvim) you can install the ReScript Language Server using the command `MasonInstall rescript-language-server` +> If you are using [mason.nvim](https://github.com/williamboman/mason.nvim) you can install the ReScript Language Server using the command `MasonInstall rescript-language-server`. Also you can install LSP pre-release using `MasonInstall rescript-language-server@next --force` + +> When installing LSP via `mason.nvim` the binary will be available inside Neovim only + +Or install globally: ```sh npm install -g @rescript/language-server @@ -38,10 +42,26 @@ local lspconfig = require('lspconfig') lspconfig.rescriptls.setup{} ``` +### How enable `incrementalTypechecking`? + +```lua +lspconfig.rescriptls.setup{ + init_options = { + extensionConfiguration = { + incrementalTypechecking = { + enabled = true + }, + }, + }, +} +``` + For more details, see [server configuration](https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#rescriptls) ## vim-coc users +Coc users can use LSP using `--stdio` or `--node-ipc` channel. + ```json "languageserver": { "rescript": { @@ -53,3 +73,15 @@ For more details, see [server configuration](https://github.com/neovim/nvim-lspc } } ``` + +## ReScript grammar Tree-sitter + +The Tree-sitter parser is now part of the `rescript-lang` organization, https://github.com/rescript-lang/tree-sitter-rescript. + +It's been a while since Victor moved the repository. We still have to add support for the syntax changes introduced in v11. The parser has also been added to [`nvim-treesitter`](https://github.com/nvim-treesitter/nvim-treesitter), [PR](https://github.com/nvim-treesitter/nvim-treesitter/pull/6671). + +The parser provides some important features in addition to highlight, indentation, language injection, folds and locals (used to extract keyword definitions, scopes, references, etc.). + +You can install the parser with `TSInstall rescript`, more details [here](https://github.com/nvim-treesitter/nvim-treesitter?tab=readme-ov-file#modules) + +The [nvim-treesitter-rescript](https://github.com/rescript-lang/nvim-treesitter-rescript) plugin is no longer needed and will be archived.