diff options
| author | github-actions <github-actions@github.com> | 2022-08-21 23:09:01 +0000 |
|---|---|---|
| committer | github-actions <github-actions@github.com> | 2022-08-21 23:09:01 +0000 |
| commit | b2b3c75fb0afbedc4183eade6f1ed503f011a387 (patch) | |
| tree | 0a8aaae1221fae3be3d4a69abc3abaa9dae281d8 | |
| parent | feat: add relay language server support (#2048) (diff) | |
| download | nvim-lspconfig-b2b3c75fb0afbedc4183eade6f1ed503f011a387.tar nvim-lspconfig-b2b3c75fb0afbedc4183eade6f1ed503f011a387.tar.gz nvim-lspconfig-b2b3c75fb0afbedc4183eade6f1ed503f011a387.tar.bz2 nvim-lspconfig-b2b3c75fb0afbedc4183eade6f1ed503f011a387.tar.lz nvim-lspconfig-b2b3c75fb0afbedc4183eade6f1ed503f011a387.tar.xz nvim-lspconfig-b2b3c75fb0afbedc4183eade6f1ed503f011a387.tar.zst nvim-lspconfig-b2b3c75fb0afbedc4183eade6f1ed503f011a387.zip | |
docs: update server_configurations.md
skip-checks: true
| -rw-r--r-- | doc/server_configurations.md | 68 | ||||
| -rw-r--r-- | doc/server_configurations.txt | 68 |
2 files changed, 136 insertions, 0 deletions
diff --git a/doc/server_configurations.md b/doc/server_configurations.md index a9c364b2..ff5b5af5 100644 --- a/doc/server_configurations.md +++ b/doc/server_configurations.md @@ -116,6 +116,7 @@ autogenerated from the Lua files. You can view this file in Nvim by running - [r_language_server](#r_language_server) - [racket_langserver](#racket_langserver) - [reason_ls](#reason_ls) +- [relay_lsp](#relay_lsp) - [remark_ls](#remark_ls) - [rescriptls](#rescriptls) - [rls](#rls) @@ -4896,6 +4897,73 @@ require'lspconfig'.reason_ls.setup{} ``` +## relay_lsp + + https://github.com/facebook/relay + `Relay` is a JavaScript framework for building data-driven React applications + + Setup: + + - Make sure you have a Relay config file somewhere in your project. + - We support standard config file formats (`.yml`, `.js`, `.json`), and the the `relay` field in your `package.json` + - Make sure you have the `relay-compiler` installed in your project. The bare minimum is v13. + - Make sure you are able to run the `relay-compiler` command from the command line. If `yarn relay-compiler` works, it's very likely that the LSP will work. + - Remove / disable any conflicting GraphQL LSPs you have installed. + + Relay LSP is a part of the Relay Compiler binary and available when adding `relay-compiler` to your project's devDependencies. + + ```lua + require'lspconfig'.relay_lsp.setup { + -- (default: false) Whether or not we should automatically start + -- the Relay Compiler in watch mode when you open a project + auto_start_compiler = false, + + + -- (default: null) Path to a relay config relative to the + -- `root_dir`. Without this, the compiler will search for your + -- config. This is helpful if your relay project is in a nested + -- directory. + path_to_config = nil, + } + ``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.relay_lsp.setup{} +``` + + +**Default values:** + - `auto_start_compiler` : + ```lua + false + ``` + - `cmd` : + ```lua + { "relay-compiler", "lsp" } + ``` + - `filetypes` : + ```lua + { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" } + ``` + - `handlers` : + ```lua + { + ["window/showStatus"] = <function 1> + } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + root_pattern("relay.config.*", "package.json") + ``` + + ## remark_ls https://github.com/remarkjs/remark-language-server diff --git a/doc/server_configurations.txt b/doc/server_configurations.txt index a9c364b2..ff5b5af5 100644 --- a/doc/server_configurations.txt +++ b/doc/server_configurations.txt @@ -116,6 +116,7 @@ autogenerated from the Lua files. You can view this file in Nvim by running - [r_language_server](#r_language_server) - [racket_langserver](#racket_langserver) - [reason_ls](#reason_ls) +- [relay_lsp](#relay_lsp) - [remark_ls](#remark_ls) - [rescriptls](#rescriptls) - [rls](#rls) @@ -4896,6 +4897,73 @@ require'lspconfig'.reason_ls.setup{} ``` +## relay_lsp + + https://github.com/facebook/relay + `Relay` is a JavaScript framework for building data-driven React applications + + Setup: + + - Make sure you have a Relay config file somewhere in your project. + - We support standard config file formats (`.yml`, `.js`, `.json`), and the the `relay` field in your `package.json` + - Make sure you have the `relay-compiler` installed in your project. The bare minimum is v13. + - Make sure you are able to run the `relay-compiler` command from the command line. If `yarn relay-compiler` works, it's very likely that the LSP will work. + - Remove / disable any conflicting GraphQL LSPs you have installed. + + Relay LSP is a part of the Relay Compiler binary and available when adding `relay-compiler` to your project's devDependencies. + + ```lua + require'lspconfig'.relay_lsp.setup { + -- (default: false) Whether or not we should automatically start + -- the Relay Compiler in watch mode when you open a project + auto_start_compiler = false, + + + -- (default: null) Path to a relay config relative to the + -- `root_dir`. Without this, the compiler will search for your + -- config. This is helpful if your relay project is in a nested + -- directory. + path_to_config = nil, + } + ``` + + + +**Snippet to enable the language server:** +```lua +require'lspconfig'.relay_lsp.setup{} +``` + + +**Default values:** + - `auto_start_compiler` : + ```lua + false + ``` + - `cmd` : + ```lua + { "relay-compiler", "lsp" } + ``` + - `filetypes` : + ```lua + { "javascript", "javascriptreact", "javascript.jsx", "typescript", "typescriptreact", "typescript.tsx" } + ``` + - `handlers` : + ```lua + { + ["window/showStatus"] = <function 1> + } + ``` + - `on_new_config` : + ```lua + see source file + ``` + - `root_dir` : + ```lua + root_pattern("relay.config.*", "package.json") + ``` + + ## remark_ls https://github.com/remarkjs/remark-language-server |
