aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGithub Actions <actions@github>2019-11-26 14:22:36 +0000
committerGithub Actions <actions@github>2019-11-26 14:22:36 +0000
commita9acdd927131e257096c2c0282fa84ea4ea6b049 (patch)
tree440ef20e14e7eb87531085886e4a548c9a7af20c
parentAdd support for rust-analyzer (#43) (diff)
downloadnvim-lspconfig-a9acdd927131e257096c2c0282fa84ea4ea6b049.tar
nvim-lspconfig-a9acdd927131e257096c2c0282fa84ea4ea6b049.tar.gz
nvim-lspconfig-a9acdd927131e257096c2c0282fa84ea4ea6b049.tar.bz2
nvim-lspconfig-a9acdd927131e257096c2c0282fa84ea4ea6b049.tar.lz
nvim-lspconfig-a9acdd927131e257096c2c0282fa84ea4ea6b049.tar.xz
nvim-lspconfig-a9acdd927131e257096c2c0282fa84ea4ea6b049.tar.zst
nvim-lspconfig-a9acdd927131e257096c2c0282fa84ea4ea6b049.zip
[docgen] Update README.md
skip-checks: true
-rw-r--r--README.md209
1 files changed, 152 insertions, 57 deletions
diff --git a/README.md b/README.md
index 7ccf7202..467bcbe8 100644
--- a/README.md
+++ b/README.md
@@ -44,6 +44,7 @@ Implemented language servers:
- [leanls](#leanls)
- [pyls](#pyls)
- [rls](#rls)
+- [rust_analyzer](#rust_analyzer)
- [solargraph](#solargraph)
- [sumneko_lua](#sumneko_lua)
- [texlab](#texlab)
@@ -698,6 +699,40 @@ npm install -g elm elm-test elm-format @elm-tooling/elm-language-server
```
Can be installed in neovim with `:LspInstall elmls`
+This server accepts configuration via the `settings` key.
+<details><summary>Available settings:</summary>
+
+- **`elmLS.elmAnalyseTrigger`**: `enum { "change", "save", "never" }`
+
+ Default: `"change"`
+
+ When do you want the extension to run elm-analyse? Might need a restart to take effect.
+
+- **`elmLS.elmFormatPath`**: `string`
+
+ Default: `""`
+
+ The path to your elm-format executable. Should be empty by default, in that case it will assume the name and try to first get it from a local npm installation or a global one. If you set it manually it will not try to load from the npm folder.
+
+- **`elmLS.elmPath`**: `string`
+
+ Default: `""`
+
+ The path to your elm executable. Should be empty by default, in that case it will assume the name and try to first get it from a local npm installation or a global one. If you set it manually it will not try to load from the npm folder.
+
+- **`elmLS.elmTestPath`**: `string`
+
+ Default: `""`
+
+ The path to your elm-test executable. Should be empty by default, in that case it will assume the name and try to first get it from a local npm installation or a global one. If you set it manually it will not try to load from the npm folder.
+
+- **`elmLS.trace.server`**: `enum { "off", "messages", "verbose" }`
+
+ Default: `"off"`
+
+ Traces the communication between VS Code and the language server.
+
+</details>
```lua
nvim_lsp.elmls.setup({config})
@@ -1151,118 +1186,178 @@ nvim_lsp#setup("rls", {config})
settings = {}
```
-## solargraph
-
-https://solargraph.org/
+## rust_analyzer
-solargraph, a language server for Ruby
+https://github.com/rust-analyzer/rust-analyzer
-You can install solargraph via gem install.
+rust-analyzer(aka rls 2.0), a language server for Rust
-```sh
-gem install solargraph
-```
+See below for rls specific settings.
+https://github.com/rust-analyzer/rust-analyzer/tree/master/docs/user#settings
This server accepts configuration via the `settings` key.
<details><summary>Available settings:</summary>
-- **`solargraph.autoformat`**: `enum { true, false }`
-
- Enable automatic formatting while typing (WARNING: experimental)
-
-- **`solargraph.bundlerPath`**: `string`
+- **`rust-analyzer.cargo-watch.arguments`**: `string`
- Default: `"bundle"`
+ Default: `""`
- Path to the bundle executable, defaults to 'bundle'
+ `cargo-watch` arguments. (e.g: `--features="shumway,pdf"` will run as `cargo watch -x "check --features="shumway,pdf""` )
-- **`solargraph.checkGemVersion`**: `enum { true, false }`
+- **`rust-analyzer.cargo-watch.command`**: `string`
- Default: `true`
+ Default: `"check"`
- Automatically check if a new version of the Solargraph gem is available.
+ `cargo-watch` command. (e.g: `clippy` will run as `cargo watch -x clippy` )
-- **`solargraph.commandPath`**: `string`
+- **`rust-analyzer.cargo-watch.ignore`**: `array`
- Default: `"solargraph"`
+ Default: `{}`
- Path to the solargraph command. Set this to an absolute path to select from multiple installed Ruby versions.
+ A list of patterns for cargo-watch to ignore (will be passed as `--ignore`)
-- **`solargraph.completion`**: `enum { true, false }`
+- **`rust-analyzer.displayInlayHints`**: `boolean`
Default: `true`
- Enable completion
+ Display additional type information in the editor
-- **`solargraph.definitions`**: `enum { true, false }`
+- **`rust-analyzer.enableCargoWatchOnStartup`**: `enum { "ask", "enabled", "disabled" }`
- Default: `true`
+ Default: `"ask"`
- Enable definitions (go to, etc.)
+ Whether to run `cargo watch` on startup
-- **`solargraph.diagnostics`**: `enum { true, false }`
+- **`rust-analyzer.enableEnhancedTyping`**: `boolean`
- Enable diagnostics
+ Default: `true`
+
+ Enables enhanced typing. NOTE: If using a VIM extension, you should set this to false
-- **`solargraph.externalServer`**: `object`
+- **`rust-analyzer.excludeGlobs`**: `array`
- Default: `{host = "localhost",port = 7658}`
+ Default: `{}`
- The host and port to use for external transports. (Ignored for stdio and socket transports.)
+ Paths to exclude from analysis
-- **`solargraph.folding`**: `boolean`
+- **`rust-analyzer.featureFlags`**: `object`
- Default: `true`
+ Default: `{}`
- Enable folding ranges
+ Fine grained feature flags to disable annoying features
-- **`solargraph.formatting`**: `enum { true, false }`
+- **`rust-analyzer.highlightingOn`**: `boolean`
- Enable document formatting
+ Highlight Rust code (overrides built-in syntax highlighting)
-- **`solargraph.hover`**: `enum { true, false }`
+- **`rust-analyzer.lruCapacity`**: `number`
- Default: `true`
+ Default: `vim.NIL`
- Enable hover
+ Number of syntax trees rust-analyzer keeps in memory
-- **`solargraph.logLevel`**: `enum { "warn", "info", "debug" }`
+- **`rust-analyzer.maxInlayHintLength`**: `number`
- Default: `"warn"`
+ Default: `20`
- Level of debug info to log. `warn` is least and `debug` is most.
+ Maximum length for inlay hints
-- **`solargraph.references`**: `enum { true, false }`
+- **`rust-analyzer.raLspServerPath`**: `string`
- Default: `true`
+ Default: `"ra_lsp_server"`
- Enable finding references
+ Path to ra_lsp_server executable
-- **`solargraph.rename`**: `enum { true, false }`
+- **`rust-analyzer.rainbowHighlightingOn`**: `boolean`
- Default: `true`
-
- Enable symbol renaming
+ When highlighting Rust code, use a unique color per identifier
-- **`solargraph.symbols`**: `enum { true, false }`
+- **`rust-analyzer.trace.cargo-watch`**: `enum { "off", "error", "verbose" }`
- Default: `true`
+ Default: `"off"`
- Enable symbols
+ Trace output of cargo-watch
-- **`solargraph.transport`**: `enum { "socket", "stdio", "external" }`
+- **`rust-analyzer.trace.server`**: `enum { "off", "messages", "verbose" }`
- Default: `"socket"`
+ Default: `"off"`
- The type of transport to use.
+ Trace requests to the ra_lsp_server
-- **`solargraph.useBundler`**: `boolean`
+- **`rust-analyzer.useClientWatching`**: `boolean`
- Use `bundle exec` to run solargraph. (If this is true, the solargraph.commandPath setting is ignored.)
+ client provided file watching instead of notify watching.
</details>
```lua
+nvim_lsp.rust_analyzer.setup({config})
+nvim_lsp#setup("rust_analyzer", {config})
+
+ Default Values:
+ capabilities = {
+ offsetEncoding = { "utf-8", "utf-16" },
+ textDocument = {
+ completion = {
+ completionItem = {
+ commitCharactersSupport = false,
+ deprecatedSupport = false,
+ documentationFormat = { "markdown", "plaintext" },
+ preselectSupport = false,
+ snippetSupport = false
+ },
+ completionItemKind = {
+ valueSet = { 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25 }
+ },
+ contextSupport = false,
+ dynamicRegistration = false
+ },
+ documentHighlight = {
+ dynamicRegistration = false
+ },
+ hover = {
+ contentFormat = { "markdown", "plaintext" },
+ dynamicRegistration = false
+ },
+ references = {
+ dynamicRegistration = false
+ },
+ signatureHelp = {
+ dynamicRegistration = false,
+ signatureInformation = {
+ documentationFormat = { "markdown", "plaintext" }
+ }
+ },
+ synchronization = {
+ didSave = true,
+ dynamicRegistration = false,
+ willSave = false,
+ willSaveWaitUntil = false
+ }
+ }
+ }
+ cmd = { "ra_lsp_server" }
+ filetypes = { "rust" }
+ log_level = 2
+ on_init = <function 1>
+ root_dir = root_pattern("Cargo.toml")
+ settings = {}
+```
+
+## solargraph
+
+https://solargraph.org/
+
+solargraph, a language server for Ruby
+
+You can install solargraph via gem install.
+
+```sh
+gem install solargraph
+```
+
+
+```lua
nvim_lsp.solargraph.setup({config})
nvim_lsp#setup("solargraph", {config})