mirror of
https://github.com/neovim/neovim.git
synced 2026-04-05 07:09:23 +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:
10
runtime/lua/vim/_meta/vimfn.lua
generated
10
runtime/lua/vim/_meta/vimfn.lua
generated
@@ -7964,12 +7964,20 @@ function vim.fn.searchpos(pattern, flags, stopline, timeout, skip) end
|
||||
|
||||
--- 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()
|
||||
--- <
|
||||
---
|
||||
--- @param opts? table
|
||||
--- @return string[]
|
||||
function vim.fn.serverlist() end
|
||||
function vim.fn.serverlist(opts) end
|
||||
|
||||
--- Opens a socket or named pipe at {address} and listens for
|
||||
--- |RPC| messages. Clients can send |API| commands to the
|
||||
|
||||
Reference in New Issue
Block a user