39 lines
1.0 KiB
Bash
39 lines
1.0 KiB
Bash
# See `direnv stdlib` for special functions provided by _direnv_.
|
|
use asdf
|
|
|
|
# Git
|
|
export GIT_AUTHOR_NAME="Michel"
|
|
export GIT_AUTHOR_EMAIL="michel@none"
|
|
export GIT_COMMITTER_NAME="Michel"
|
|
export GIT_COMMITTER_EMAIL="michel@none"
|
|
|
|
# Node.JS
|
|
lua_node=$(grep -o "nodejs/[.0-9]\\+" init.lua)
|
|
lua_node=${lua_node#nodejs/}
|
|
|
|
asdf_node=$(asdf current nodejs | grep -o "[.0-9]\\{3,\\}")
|
|
|
|
if [ "${lua_node}" != "${asdf_node}" ]; then
|
|
log_error "init.lua expects node.js ${lua_node} but asdf provides ${asdf_node}"
|
|
fi
|
|
|
|
# Python virtual env
|
|
layout python3
|
|
|
|
if (($(echo $(direnv_layout_dir)/python* | wc --words) > 1)); then
|
|
log_error "Found several python environments"
|
|
du -sh .direnv/*
|
|
fi
|
|
|
|
if ! python3 -m pip list | grep pynvim > /dev/null; then
|
|
log_error "python: Missing pynvim module"
|
|
fi
|
|
|
|
# neovim remote
|
|
if [[ ! -x $HOME/.local/bin/nvr ]]; then
|
|
log_error "Neovim remote (nvr) not found"
|
|
log_status "To create a symlink:"
|
|
log_error "mkdir -p $HOME/.local/bin"
|
|
log_error "ln -fs \$HOME/.config/nvim/.direnv/python-3*/bin/nvr(om[1]) \$HOME/.local/bin"
|
|
fi
|