mirror of
https://github.com/neovim/neovim.git
synced 2025-09-20 18:28:19 +00:00
feat(server): instance "name", store pipes in stdpath(state)
Problem: - Unix sockets are created in random /tmp dirs. - /tmp is messy, unclear when OSes actually clear it. - The generated paths are very ugly. This adds friction to reasoning about which paths belong to which Nvim instances. - No way to provide a human-friendly way to identify Nvim instances in logs or server addresses. Solution: - Store unix sockets in stdpath('state') - Allow --listen "name" and serverstart("name") to given a name (which is appended to a generated path). TODO: - is stdpath(state) the right place?
This commit is contained in:
@@ -88,7 +88,12 @@ FileComparison path_full_compare(char_u *const s1, char_u *const s2, const bool
|
||||
return kDifferentFiles;
|
||||
}
|
||||
|
||||
/// Gets the tail (i.e., the filename segment) of a path `fname`.
|
||||
/// Gets the tail (filename segment) of path `fname`.
|
||||
///
|
||||
/// Examples:
|
||||
/// - "dir/file.txt" => "file.txt"
|
||||
/// - "file.txt" => "file.txt"
|
||||
/// - "dir/" => ""
|
||||
///
|
||||
/// @return pointer just past the last path separator (empty string, if fname
|
||||
/// ends in a slash), or empty string if fname is NULL.
|
||||
|
Reference in New Issue
Block a user