#!/usr/bin/env fish

# PATH

if test -d /usr/local/sbin
  set PATH /usr/local/sbin $PATH
end

if test -x /usr/local/bin/cargo
  set PATH ~/.cargo/bin $PATH
end

if test -x /usr/local/bin/yarn
  set PATH ~/.yarn/bin ~/.config/yarn/global/node_modules/.bin $PATH
end

set EDITOR nvim
set VISUAL nvim

if test -n "$NVIM_LISTEN_ADDRESS"
  set EDITOR nvr
  set VISUAL nvr
  if test -x /usr/local/bin/page
    set PAGER /usr/local/bin/page
  end
end

if not functions -q fisher
  set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
  curl https://git.io/fisher --create-dirs -sLo $XDG_CONFIG_HOME/fish/functions/fisher.fish
  fish -c fisher
end

#!/usr/bin/env fish

# PATH

if test -d /usr/local/sbin
  set PATH /usr/local/sbin $PATH
end

if test -x /usr/local/bin/cargo
  set PATH ~/.cargo/bin $PATH
end

if test -x /usr/local/bin/yarn
  set PATH ~/.yarn/bin ~/.config/yarn/global/node_modules/.bin $PATH
end

if test -z "$NVIM_LISTEN_ADDRESS"
  set EDITOR nvim
  set VISUAL nvim
end

if test -n "$NVIM_LISTEN_ADDRESS"
  if test -x /usr/local/bin/page
    set PAGER /usr/local/bin/page
  end
end

if not functions -q fisher
  set -q XDG_CONFIG_HOME; or set XDG_CONFIG_HOME ~/.config
  curl https://git.io/fisher --create-dirs -sLo $XDG_CONFIG_HOME/fish/functions/fisher.fish
  fish -c fisher
end

Fix EDITOR variable inside neovim session
Fix EDITOR variable inside neovim session

There's an order of operations problem with setting the EDITOR and
VISUAL environment variables inside fish configuration. The correct
configuration is setup in nvr.vim after plugin, but the fish
configuration, which does not properly split and wait for edits,
overrides it. Adding the correct config to fish causes some strange
errors and doesn't wait properly still, so instead of debugging that,
keep the configuration in nvr.vim, and guard the outside neovim variable
settings to only happen when not in a neovim session, so they don't
override the correct config inside.

bronzehedwick/dotfiles,bronzehedwick/dotfiles,bronzehedwick/dotfiles,bronzehedwick/dotfiles