zsh: fix in-nvim detection
This commit is contained in:
parent
80961265ea
commit
9ac5d0065f
|
@ -18,13 +18,8 @@ fi
|
|||
|
||||
# Set preferred editor.
|
||||
if type nvim >& -; then
|
||||
if [[ -v ${NVIM} ]]; then
|
||||
# Open files from :terminal in parent instance
|
||||
VISUAL="${VISUAL} --server ${NVIM} --remote"
|
||||
else
|
||||
local sockdir="${XDG_RUNTIME_DIR:-${XDG_STATE_HOME:-${HOME}/.local/state}}"
|
||||
VISUAL="$(command -v nvim) --server ${sockdir}/nvim.sock"
|
||||
fi
|
||||
elif command -v emacsclient > /dev/null; then
|
||||
# Add Defaults env_keep += "SSH_CONNECTION" to /etc/sudoers.d/ssh_vars
|
||||
export EMACS_SOCKET_NAME="${HOME}/.emacs.d/server/server"
|
||||
|
|
|
@ -134,6 +134,12 @@ fi
|
|||
|
||||
[[ ${COLORTERM} == *(truecolor|24bit)* ]] && export NVIM_TUI_ENABLE_TRUE_COLOR=1
|
||||
|
||||
# Open files from :terminal in parent instance
|
||||
if [[ -v NVIM ]]; then
|
||||
export VISUAL="$(command -v nvim) --server ${NVIM} --remote"
|
||||
export EDITOR=${VISUAL}
|
||||
fi
|
||||
|
||||
export GPG_TTY=$(tty)
|
||||
|
||||
case ${TERM} in
|
||||
|
|
Loading…
Reference in New Issue
Block a user