non-default nvim socket for wezterm-edit-helper
This commit is contained in:
parent
89accda030
commit
21e885309c
1 changed files with 6 additions and 4 deletions
|
@ -14,17 +14,19 @@ else
|
|||
fre --store_name "$_store" --add "$_file"
|
||||
fi
|
||||
|
||||
_nvim_socket="$XDG_RUNTIME_DIR/nvim-persistent.sock"
|
||||
|
||||
function _nvim_setenv() {
|
||||
nvim --server "$XDG_RUNTIME_DIR/nvim.sock" --remote-expr "execute(\"let \$${1} = \\\"${2}\\\"\")"
|
||||
nvim --server "$_nvim_socket" --remote-expr "execute(\"let \$${1} = \\\"${2}\\\"\")"
|
||||
}
|
||||
|
||||
nvim --server "$XDG_RUNTIME_DIR/nvim.sock" --remote-expr "42" 2>/dev/null ||
|
||||
(wezterm cli spawn --cwd "${PWD}" nvim --listen "$XDG_RUNTIME_DIR/nvim.sock" && sleep 0.5)
|
||||
nvim --server "$_nvim_socket" --remote-expr "42" 2>/dev/null ||
|
||||
(rm -f "$_nvim_socket" && wezterm cli spawn --cwd "${PWD}" nvim --listen "$_nvim_socket" && sleep 0.5)
|
||||
|
||||
_nvim_setenv BUILD_COMMAND "$BUILD_COMMAND"
|
||||
_nvim_setenv GOPACKAGESDRIVER "$GOPACKAGESDRIVER"
|
||||
_nvim_setenv GOFLAGS "$GOFLAGS"
|
||||
|
||||
nvim --server "$XDG_RUNTIME_DIR/nvim.sock" --remote "$_file"
|
||||
nvim --server "$_nvim_socket" --remote "$_file"
|
||||
|
||||
printf "\033]1337;SetUserVar=%s=%s\007" nvim_activate $(date +%s | base64)
|
||||
|
|
Loading…
Reference in a new issue