From 22880f43ab0d0c0e3ed4c92748f82ed0ac80c3a6 Mon Sep 17 00:00:00 2001 From: Daniel Lundin Date: Wed, 29 May 2024 20:51:30 +0200 Subject: [PATCH] wezterm-edit-helper: no more need to hack the env vars, thanks to direnv.vim --- bin/wezterm-edit-helper | 28 +--------------------------- 1 file changed, 1 insertion(+), 27 deletions(-) diff --git a/bin/wezterm-edit-helper b/bin/wezterm-edit-helper index c0a9421..ecd968d 100755 --- a/bin/wezterm-edit-helper +++ b/bin/wezterm-edit-helper @@ -18,33 +18,7 @@ fi fre --store_name "edit-history" --add "$_file" -_nvim_socket="$XDG_RUNTIME_DIR/nvim-persistent.sock" - -nvim --server "$_nvim_socket" --remote "$_file" - -function _nvim_setenv() { - nvim --server "$_nvim_socket" --remote-expr "execute(\"let \$${1} = \\\"${2}\\\"\")" 2>&1 >/dev/null -} - -_nvim_setenv AR "$AR" -_nvim_setenv AS "$AS" -_nvim_setenv BUILD_COMMAND "$BUILD_COMMAND" -_nvim_setenv CC "$CC" -_nvim_setenv CXX "$CXX" -_nvim_setenv GOFLAGS "$GOFLAGS" -_nvim_setenv GOPACKAGESDRIVER "$GOPACKAGESDRIVER" -_nvim_setenv LC_ALL "$LC_ALL" -_nvim_setenv LD "$LD" -_nvim_setenv NM "$NM" -_nvim_setenv NM "$NM" -_nvim_setenv OBJCOPY "$OBJCOPY" -_nvim_setenv OBJDUMP "$OBJDUMP" -_nvim_setenv PATH "$PATH" -_nvim_setenv RANLIB "$RANLIB" -_nvim_setenv READELF "$READELF" -_nvim_setenv RUST_SRC_PATH "$RUST_SRC_PATH" -_nvim_setenv SIZE "$SIZE" -_nvim_setenv STRIP "$STRIP" +nvim --server "$XDG_RUNTIME_DIR/nvim-persistent.sock" --remote "$_file" # Wezterm: switch tab to nvim printf "\033]1337;SetUserVar=%s=%s\007" nvim_activate $(date +%s | base64)