Repository: neovim/neovim
File: src/nvim/eval.lua (Lua)

Code before:
      { 'stopline', 'integer' },
      { 'timeout', 'integer' },
      { 'skip', 'string|function' },
    },
    signature = 'searchpos({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]])',
  },
  serverlist = {
    args = { 0, 1 },
    desc = [=[
      Returns a list of server addresses, or empty if all servers
      were stopped. |serverstart()| |serverstop()|

      The optional argument {opts} is a Dict and supports the following items:

        peer  : If |TRUE|, servers not started by |serverstart()| will also be returned.
                Currenly only supports unnamed pipes in stdpath("run").
                (default: |FALSE|)

      Example: >vim
      	echo serverlist()
      <
    ]=],
    name = 'serverlist',
    params = { { 'opts', 'table' } },
    returns = 'string[]',
    signature = 'serverlist()',
  },
  serverstart = {
    args = { 0, 1 },
    desc = [=[
      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 (which may differ from the
      {address} argument, see below).

      - If {address} has a colon (":") it is a TCP/IPv4/IPv6 address
        where the last ":" separates host and port (empty or zero
        assigns a random port).
      - Else {address} is the path to a named pipe (except on Windows).
        - If {address} has no slashes ("/") it is treated as the
          "name" part of a generated path in this format: >vim
      	stdpath("run").."/{name}.{pid}.{counter}"
      <  - If {address} is omitted the name is "nvim". >vim
      	echo serverstart()
      < >
      	=> /tmp/nvim.bram/oknANW/nvim.15430.5
      <
      Example bash command to list all Nvim servers: >bash
      	ls ${XDG_RUNTIME_DIR:-${TMPDIR}nvim.${USER}}/*/nvim.*.0

Review comment (suggestion):
```suggestion
    signature = 'serverlist([{opts}])',
```

Code after:
      { 'flags', 'string' },
      { 'stopline', 'integer' },
      { 'timeout', 'integer' },
      { 'skip', 'string|function' },
    },
    signature = 'searchpos({pattern} [, {flags} [, {stopline} [, {timeout} [, {skip}]]]])',
  },
  serverlist = {
    args = { 0, 1 },
    desc = [=[
      Returns a list of server addresses, or empty if all servers
      were stopped. |serverstart()| |serverstop()|

      The optional argument {opts} is a Dict and supports the following items:

        peer  : If |TRUE|, servers not started by |serverstart()| 
                will also be returned. (default: |FALSE|)
                Not supported on Windows yet.

      Example: >vim
      	echo serverlist()
      <
    ]=],
    name = 'serverlist',
    params = { { 'opts', 'table' } },
    returns = 'string[]',
    signature = 'serverlist([{opts}])',
  },
  serverstart = {
    args = { 0, 1 },
    desc = [=[
      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 (which may differ from the
      {address} argument, see below).

      - If {address} has a colon (":") it is a TCP/IPv4/IPv6 address
        where the last ":" separates host and port (empty or zero
        assigns a random port).
      - Else {address} is the path to a named pipe (except on Windows).
        - If {address} has no slashes ("/") it is treated as the
          "name" part of a generated path in this format: >vim
      	stdpath("run").."/{name}.{pid}.{counter}"
      <  - If {address} is omitted the name is "nvim". >vim
      	echo serverstart()
      < >
      	=> /tmp/nvim.bram/oknANW/nvim.15430.5
      <
      Example bash command to list all Nvim servers: >bash