aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWilliam Boman <william@redwill.se>2021-09-08 14:24:15 +0200
committerWilliam Boman <william@redwill.se>2021-09-08 14:24:15 +0200
commitbdc24a07eaeb0d37a631db5c00b4c246d6847a80 (patch)
treebae111d1319af6cfa8f5186cf04d62d8af454eee
parentfix iterating table (diff)
downloadmason-bdc24a07eaeb0d37a631db5c00b4c246d6847a80.tar
mason-bdc24a07eaeb0d37a631db5c00b4c246d6847a80.tar.gz
mason-bdc24a07eaeb0d37a631db5c00b4c246d6847a80.tar.bz2
mason-bdc24a07eaeb0d37a631db5c00b4c246d6847a80.tar.lz
mason-bdc24a07eaeb0d37a631db5c00b4c246d6847a80.tar.xz
mason-bdc24a07eaeb0d37a631db5c00b4c246d6847a80.tar.zst
mason-bdc24a07eaeb0d37a631db5c00b4c246d6847a80.zip
CUSTOM_SERVERS.md: update docs
-rw-r--r--CUSTOM_SERVERS.md49
1 files changed, 40 insertions, 9 deletions
diff --git a/CUSTOM_SERVERS.md b/CUSTOM_SERVERS.md
index 5db90113..cffad236 100644
--- a/CUSTOM_SERVERS.md
+++ b/CUSTOM_SERVERS.md
@@ -78,11 +78,9 @@ available installers that are available out of the box.
- ### Shell
- #### `shell.raw(raw_script: string, opts?: table)`
+ #### `shell.bash(raw_script: string, opts?: table)`
- Returns an installer that runs the provided `raw_script` in a new terminal window.
-
- Runs as a bash script (`/bin/bash`).
+ Returns an installer that runs the provided `raw_script` as a bash script (`/bin/bash`).
`opts` is an optional table, with the following defaults:
@@ -94,17 +92,17 @@ available installers that are available out of the box.
```lua
local shell = require "nvim-lsp-installer.installers.shell"
- shell.raw [[
+ shell.bash [[
wget -O server.zip https://github.com/fwcd/kotlin-language-server/releases/latest/download/server.zip;
unzip server.zip;
rm server.zip;
]]
```
- #### `shell.remote(url: string, opts?: table)`
+ #### `shell.remote_bash(url: string, opts?: table)`
- Returns an installer that downloads the content at `url` and executes its content by passing it to the `shell.raw()`
- installer.
+ Returns an installer that downloads the content at `url` and executes its content by passing it to the
+ `shell.bash()` installer.
`opts` is an optional table, with the following defaults:
@@ -116,13 +114,46 @@ available installers that are available out of the box.
```lua
local shell = require "nvim-lsp-installer.installers.shell"
- shell.remote("https://raw.githubusercontent.com/my_server/my_server_lsp/install.sh", {
+ shell.remote_bash("https://raw.githubusercontent.com/my_server/my_server_lsp/install.sh", {
env = {
MY_ENV = "true"
}
})
```
+ #### `shell.cmd(raw_script: string, opts?: table)`
+
+ Returns an installer that runs the provided `raw_script` as a `cmd.exe` script.
+
+ `opts` is an optional table, with the following defaults:
+
+ - `env = table?` (default `nil`) - A table (dict) with environment variables to be set in the shell.
+
+ Example:
+
+ ```lua
+ local shell = require "nvim-lsp-installer.installers.shell"
+
+ shell.cmd("git clone --depth 1 https://github.com/microsoft/vscode-eslint . && npm install && npm run compile:server")
+ ```
+
+ #### `shell.polyshell(raw_script: string, opts?: table)`
+
+ Returns an installer that runs the provided `raw_script` as a platform agnostic shell script. This installer expects
+ the provided `raw_script` is syntactically valid across all platform shells (`/bin/bash` and `cmd.exe`).
+
+ `opts` is an optional table, with the following defaults:
+
+ - `env = table?` (default `nil`) - A table (dict) with environment variables to be set in the shell.
+
+ Example:
+
+ ```lua
+ local shell = require "nvim-lsp-installer.installers.shell"
+
+ shell.polyshell("git clone --depth 1 https://github.com/microsoft/vscode-eslint . && npm install && npm run compile:server")
+ ```
+
- ### zx
[zx](https://github.com/google/zx) is a tool for writing better scripts. It's a suitable install method for servers