import { serverstart } from "https://deno.land/x/denops_std@v5.0.2/function/nvim/mod.ts";
Opens a socket or named pipe at {address} and listens for
RPC
messages. Clients can send API
commands to the
returned address to control Nvim.
Returns the address string (may differ from the requested {address}).
- If {address} contains a colon ":" it is interpreted as a TCP/IPv4/IPv6 address where the last ":" separates host and port (empty or zero assigns a random port).
- Else it is interpreted as a named pipe or Unix domain socket path. If there are no slashes it is treated as a name and appended to a generated path.
- If {address} is empty it generates a path.
Example named pipe:
if has('win32')
echo serverstart('\\.\pipe\nvim-pipe-1234')
else
echo serverstart('nvim.sock')
endif
Example TCP/IP address:
echo serverstart('::1:12345')
Parameters
denops: Denops