diff --git a/.envrc b/.envrc index 736ceab..a54837c 100644 --- a/.envrc +++ b/.envrc @@ -7,6 +7,16 @@ 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 diff --git a/.tool-versions b/.tool-versions index 413bfa1..fcd4196 100644 --- a/.tool-versions +++ b/.tool-versions @@ -1,5 +1,5 @@ direnv 2.34.0 # NOTE: Path to nodejs is hardcoded in init.lua -nodejs 21.6.2 +nodejs 22.2.0 # TODO: Don't use version matching system python 3.12.3 diff --git a/init.lua b/init.lua index 81c381b..f06d358 100644 --- a/init.lua +++ b/init.lua @@ -3,7 +3,7 @@ -- Use Node from ASDF -- TODO: Use neovim config -vim.env.PATH = vim.env.HOME .. "/.asdf/installs/nodejs/21.6.2/bin/" .. ":" .. vim.env.PATH +vim.env.PATH = vim.env.HOME .. "/.asdf/installs/nodejs/22.2.0/bin/" .. ":" .. vim.env.PATH -- Use Python from neoovim "config" folder local python_root = vim.fn.glob(vim.fn.stdpath("config") .. "/.direnv/python*", true, true)[1]