Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add ability to specify binary path/args for rust-analyzer #9293

Merged
merged 1 commit into from
Mar 13, 2024

Conversation

mrnugget
Copy link
Member

This fixes #9292 by adding a section to the language server settings that allows users to specify the binary path and arguments with which to start up a language server.

Example user settings for rust-analyzer:

{
  "lsp": {
    "rust-analyzer": {
      "binary": {
        "path": "/Users/thorstenball/tmp/rust-analyzer-aarch64-apple-darwin",
        "arguments": ["--no-log-buffering"]
      }
    }
  }
}

Constraints:

  • Right now this only allows ABSOLUTE paths.
  • This is only used by rust-analyzer integration right now, but the setting can be used for other language servers. We just need to update the adapters to also respect that setting.

Release Notes:

  • Added ability to specify rust-analyzer binary path (must be absolute) and arguments in user settings. Example: {"lsp": {"rust-analyzer": {"binary": {"path": "/my/abs/path/rust-analyzer", "arguments": ["--no-log-buffering"] }}}} (#9292).

@cla-bot cla-bot bot added the cla-signed The user has signed the Contributor License Agreement label Mar 13, 2024
This fixes #9292 by adding a section to the language server settings
that allows users to specify the binary path and arguments with which
to start up a language server.

Example user settings for `rust-analyzer`:

```json
{
  "lsp": {
    "rust-analyzer": {
      "binary": {
        "path": "/Users/thorstenball/tmp/rust-analyzer-aarch64-apple-darwin",
        "arguments": ["--no-log-buffering"]
      }
    }
  }
}
```

Right now this only allows ABSOLUTE paths.

Co-authored-by: Ricard Mallafre <[email protected]>
@mrnugget mrnugget force-pushed the rust-analyzer-path-args branch from ac7b3f2 to 5117404 Compare March 13, 2024 17:10
@mrnugget mrnugget merged commit a56a260 into main Mar 13, 2024
9 checks passed
@mrnugget mrnugget deleted the rust-analyzer-path-args branch March 13, 2024 17:42
mrnugget added a commit that referenced this pull request Mar 26, 2024
This uses the language server settings added in #9293 to allow users
to specify the binary path and arguments with which to start up `gopls`.

Example user settings for `gopls`:

```json
{
  "lsp": {
    "gopls": {
      "binary": {
        "path": "/Users/thorstenball/tmp/gopls",
        "arguments": ["-debug=0.0.0.0:8080"]
      },
    }
  }
}
```

Constraints:

* Right now this only allows ABSOLUTE paths.

Release Notes:

- Added ability to specify `gopls` binary `path` (must be absolute) and `arguments` in user settings. Example: `{"lsp": {"gopls": {"binary": {"path": "/my/abs/path/gopls", "arguments": ["-debug=0.0.0.0:8080"] }}}}`
mrnugget added a commit that referenced this pull request Mar 26, 2024
This uses the language server settings added in #9293 to allow users to
specify the binary path and arguments with which to start up `gopls`.

Example user settings for `gopls`:

```json
{
  "lsp": {
    "gopls": {
      "binary": {
        "path": "/Users/thorstenball/tmp/gopls",
        "arguments": ["-debug=0.0.0.0:8080"]
      },
    }
  }
}
```

Constraints:

* Right now this only allows ABSOLUTE paths.

Release Notes:

- Added ability to specify `gopls` binary `path` (must be absolute) and
`arguments` in user settings. Example: `{"lsp": {"gopls": {"binary":
{"path": "/my/abs/path/gopls", "arguments": ["-debug=0.0.0.0:8080"]
}}}}`
pjlast pushed a commit to pjlast/zed that referenced this pull request Mar 26, 2024
)

This uses the language server settings added in zed-industries#9293 to allow users to
specify the binary path and arguments with which to start up `gopls`.

Example user settings for `gopls`:

```json
{
  "lsp": {
    "gopls": {
      "binary": {
        "path": "/Users/thorstenball/tmp/gopls",
        "arguments": ["-debug=0.0.0.0:8080"]
      },
    }
  }
}
```

Constraints:

* Right now this only allows ABSOLUTE paths.

Release Notes:

- Added ability to specify `gopls` binary `path` (must be absolute) and
`arguments` in user settings. Example: `{"lsp": {"gopls": {"binary":
{"path": "/my/abs/path/gopls", "arguments": ["-debug=0.0.0.0:8080"]
}}}}`
hferreiro added a commit to hferreiro/zed that referenced this pull request Apr 16, 2024
This uses the language server settings added in zed-industries#9293 to allow users
to specify the binary path and arguments with which to start up
`clangd`.

Example user settings for `clangd`:

```json
{
  "lsp": {
    "clangd": {
      "binary": {
        "path": "/usr/bin/clangd",
        "arguments": ["--log=verbose"]
      },
    }
  }
}
```

Constraints:

* Right now this only allows ABSOLUTE paths.

Release Notes:

- Added ability to specify `clangd` binary `path` (must be absolute) and `arguments` in user settings. Example: `{"lsp": {"clangd": {"binary": {"path": "/usr/bin/clangd", "arguments": ["--log=verbose"] }}}}`
mrnugget pushed a commit that referenced this pull request Apr 16, 2024
This uses the language server settings added in #9293 to allow users to
specify the binary path and arguments with which to start up `clangd`.

Example user settings for `clangd`:

```json
{
  "lsp": {
    "clangd": {
      "binary": {
        "path": "/usr/bin/clangd",
        "arguments": ["--log=verbose"]
      },
    }
  }
}
```

Constraints:

* Right now this only allows ABSOLUTE paths.

Release Notes:

- Added ability to specify `clangd` binary `path` (must be absolute) and
`arguments` in user settings. Example: `{"lsp": {"clangd": {"binary":
{"path": "/usr/bin/clangd", "arguments": ["--log=verbose"] }}}}`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla-signed The user has signed the Contributor License Agreement
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Allow rust-analayzer to be configured as a local binary path plus arguments - Request from Meta
1 participant