diff options
| author | Michael Lingelbach <m.j.lbach@gmail.com> | 2021-05-13 19:20:26 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-05-13 19:20:26 -0700 |
| commit | 3ed00a8a0de63054af5f133d6096d755ea0ac230 (patch) | |
| tree | cc39d2b09c2dccbdf47d8c6c947a098f3d179018 /lua | |
| parent | Merge pull request #889 from weeman1337/fix-pylsp-doc (diff) | |
| parent | Add ReScript language server configuration (diff) | |
| download | nvim-lspconfig-3ed00a8a0de63054af5f133d6096d755ea0ac230.tar nvim-lspconfig-3ed00a8a0de63054af5f133d6096d755ea0ac230.tar.gz nvim-lspconfig-3ed00a8a0de63054af5f133d6096d755ea0ac230.tar.bz2 nvim-lspconfig-3ed00a8a0de63054af5f133d6096d755ea0ac230.tar.lz nvim-lspconfig-3ed00a8a0de63054af5f133d6096d755ea0ac230.tar.xz nvim-lspconfig-3ed00a8a0de63054af5f133d6096d755ea0ac230.tar.zst nvim-lspconfig-3ed00a8a0de63054af5f133d6096d755ea0ac230.zip | |
Merge pull request #892 from amiralies/add-rescript-config
Add ReScript language server configuration
Diffstat (limited to 'lua')
| -rw-r--r-- | lua/lspconfig/rescriptls.lua | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/lua/lspconfig/rescriptls.lua b/lua/lspconfig/rescriptls.lua new file mode 100644 index 00000000..afe2037c --- /dev/null +++ b/lua/lspconfig/rescriptls.lua @@ -0,0 +1,45 @@ +local lspconfig = require('lspconfig') +local configs = require('lspconfig/configs') + +local name = 'rescriptls' + +configs[name] = { + default_config = { + cmd = {}, + filetypes = {'rescript'}, + root_dir = lspconfig.util.root_pattern('bsconfig.json', '.git'), + settings = {} + }, + docs = { + description = [[ +https://github.com/rescript-lang/rescript-vscode + +ReScript language server + +**By default, rescriptls doesn't have a `cmd` set.** This is because nvim-lspconfig does not make assumptions about your path. +You have to install the language server manually. + +You can use the bundled language server inside the [vim-rescript](https://github.com/rescript-lang/vim-rescript) repo. + +Clone the vim-rescript repo and point `cmd` to `server.js` inside `server/out` directory: + +```lua +cmd = {'node', '<path_to_repo>/server/out/server.js', '--stdio'} + +``` + +If you have vim-rescript installed you can also use that installation. for example if you're using packer.nvim you can set cmd to something like this: + +```lua +cmd = { + 'node', + '/home/username/.local/share/nvim/site/pack/packer/start/vim-rescript/server/out/server.js', + '--stdio' +} +``` + +Another option is to use vscode extension [release](https://github.com/rescript-lang/rescript-vscode/releases). +Take a look at [here](https://github.com/rescript-lang/rescript-vscode#use-with-other-editors) for instructions. +]] + } +} |
