nvim: add ${USER} to socket name
This commit is contained in:
parent
ce0cba8ff2
commit
027f2066b6
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user