relay_lsp
plugins.lsp.servers.relay_lsp.enable
Whether to enable 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,
}
```
.
Type: boolean
Default:
false
Example:
true
Declared by:
plugins.lsp.servers.relay_lsp.package
The package to use for relay_lsp. Has no default, but can be set to null.
Type: null or package
Declared by:
plugins.lsp.servers.relay_lsp.autostart
Controls if the FileType
autocommand that launches a language server is created.
If false
, allows for deferring language servers until manually launched with
:LspStart
(|lspconfig-commands|).
Type: null or boolean or raw lua code
Default:
null
Plugin default: true
Declared by:
plugins.lsp.servers.relay_lsp.cmd
A list where each entry corresponds to the blankspace delimited part of the command that launches the server.
The first entry is the binary used to run the language server. Additional entries are passed as arguments.
Type: null or (list of string)
Default:
null
Declared by:
plugins.lsp.servers.relay_lsp.extraOptions
Extra options for the relay_lsp language server.
Type: attribute set of anything
Default:
{ }
Declared by:
plugins.lsp.servers.relay_lsp.filetypes
Set of filetypes for which to attempt to resolve {root_dir}. May be empty, or server may specify a default value.
Type: null or (list of string)
Default:
null
Declared by:
plugins.lsp.servers.relay_lsp.rootDir
A function (or function handle) which returns the root of the project used to determine if lspconfig should launch a new language server, or attach a previously launched server when you open a new buffer matching the filetype of the server.
Type: null or lua function string
Default:
null
Plugin default: "nil"
Declared by:
plugins.lsp.servers.relay_lsp.settings
The settings for this LSP.
Type: attribute set of anything
Default:
{ }
Example:
{
callback = {
__raw = ''
function()
print('nixvim')
end
'';
};
foo_bar = 42;
hostname = "localhost:8080";
}
Declared by: