mirror of
https://github.com/neovim/neovim.git
synced 2025-09-28 14:08:32 +00:00
feat: serverlist({peer=true}) returns peer addresses #34806
Problem: serverlist() only lists servers that were started by the current Nvim. Solution: Look for other Nvim servers in stdpath("run").
This commit is contained in:
@@ -9655,17 +9655,25 @@ M.funcs = {
|
||||
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 = {},
|
||||
params = { { 'opts', 'table' } },
|
||||
returns = 'string[]',
|
||||
signature = 'serverlist()',
|
||||
signature = 'serverlist([{opts}])',
|
||||
},
|
||||
serverstart = {
|
||||
args = { 0, 1 },
|
||||
|
Reference in New Issue
Block a user