You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+50-1Lines changed: 50 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,7 +8,56 @@ Queries for text objects are also included which help you to navigate, select, a
8
8
9
9
## Installation
10
10
11
-
- If you want ReScript Tree-sitter in NeoVim, refer to [`nvim-treesitter-rescript`](https://github.com/nkrkv/nvim-tree-sitter-rescript/) installation notes;
11
+
### Neovim
12
+
13
+
If you want ReScript Tree-sitter in NeoVim, you will first need to register a new parser for it like so:
This will make `TSInstall rescript` globally available. For more persistent approach you should add this parser to your Lua configuration.
30
+
Default configuration detects `.res` and `.resi` files. You can confirm that it's correctly installed by using [`nvim-treesitter/playground`](https://github.com/nvim-treesitter/playground) and invoking `TSPlaygroundToggle` when you are in the ReScript file.
31
+
Notice that by default you will not see the highlighting! To enable highlighting, you will need to install this package either as a dependency or directly.
32
+
If you are using `lazy.nvim` example configuration will look like so:
33
+
34
+
```lua
35
+
{
36
+
"nvim-treesitter/nvim-treesitter",
37
+
dependencies= {
38
+
"nkrkv/tree-sitter-rescript"
39
+
},
40
+
opts=function(_, opts) -- this is needed so you won't override your default nvim-treesitter configuration
0 commit comments