Skip to content

Forum post vim-rescript v3 release #73

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 3 commits into
base: master
Choose a base branch
from
Draft
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
updates
  • Loading branch information
aspeddro committed Jul 29, 2024
commit f27d30f9060651394ae6d147ef0438c6e88fac2d
36 changes: 34 additions & 2 deletions draft-v3-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand All @@ -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
Expand All @@ -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": {
Expand All @@ -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.