diff --git a/.config/nvim/lua/my/net.lua b/.config/nvim/lua/my/net.lua index 6a0f4c8..3fc9f44 100644 --- a/.config/nvim/lua/my/net.lua +++ b/.config/nvim/lua/my/net.lua @@ -1,6 +1,7 @@ require('my/plugins') -local serversock = (vim.env['XDG_RUNTIME_DIR'] or '/tmp') .. '/nvim.sock' +local serversock = string.format("%s/nvim.%s.sock", + vim.env['XDG_RUNTIME_DIR'] or '/tmp', vim.env['USER']) if vim.fn.filereadable(serversock) == 0 then vim.fn.serverstart(serversock); end diff --git a/.config/zsh/.zprofile b/.config/zsh/.zprofile index 6175008..2d4172b 100644 --- a/.config/zsh/.zprofile +++ b/.config/zsh/.zprofile @@ -22,7 +22,8 @@ if type nvim >& -; then # Open files from :terminal in parent instance VISUAL="${VISUAL} --server ${NVIM} --remote" else - VISUAL="$(command -v nvim) --server ${XDG_RUNTIME_DIR:-/tmp}/nvim.sock" + VISUAL="$(command -v nvim) \ + --server ${XDG_RUNTIME_DIR:-/tmp}/nvim.${USER}.sock" fi elif command -v emacsclient > /dev/null; then # Add Defaults env_keep += "SSH_CONNECTION" to /etc/sudoers.d/ssh_vars