2023-03-31 17:56:00 +02:00
|
|
|
# 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"
|
|
|
|
|
2024-06-07 11:13:45 +02:00
|
|
|
# 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
|
|
|
|
|
2023-03-31 17:56:00 +02:00
|
|
|
# Python virtual env
|
|
|
|
layout python3
|
|
|
|
|
|
|
|
if (($(echo $(direnv_layout_dir)/python* | wc --words) > 1)); then
|
|
|
|
log_error "Found several python environments"
|
2023-06-15 13:56:23 +02:00
|
|
|
du -sh .direnv/*
|
2023-03-31 17:56:00 +02:00
|
|
|
fi
|
2023-04-17 18:11:11 +02:00
|
|
|
|
2024-06-07 17:22:48 +02:00
|
|
|
if ! pip list | grep pynvim > /dev/null; then
|
|
|
|
log_error "python: Missing pynvim module"
|
|
|
|
fi
|
|
|
|
|
2023-04-17 18:11:11 +02:00
|
|
|
# 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"
|
2023-09-01 16:22:04 +02:00
|
|
|
log_error "ln -fs \$HOME/.config/nvim/.direnv/python-3*/bin/nvr(om[1]) \$HOME/.local/bin"
|
2023-04-17 18:11:11 +02:00
|
|
|
fi
|