fix: specify node version
Cause
nodenv version 22 is not recognized by nodenv and throws an error when trying to start the Language Server in Zed.
Example:
Language server emmet-language-server:
initializing server emmet-language-server, id 4
-- stderr--
nodenv: version `22' is not installed (set by /Users/<some-user>/Library/Application Support/Zed/extensions/work/emmet/node_modules/@olrtg/emmet-language-server/.node-version)
Hey there @olrtg, just checking in to see if this PR is on your radar. It would be a blast to have this fixed since it's kinda difficult having a partially or not working emmet server in the editor :)
Let me know if you need anything from me! :)
@LordSalmon hello! sorry for the delay, very busy with work these days. I have to say that this is very weird, in theory the .node_version file is for working in this project, not for running the language server.
Personally i don't add a specific version to my projects to avoid installing different versions of the same mayor version.
How are you using this language server? I assume that you just installed the zed extension.
@olrtg thanks for the reply! No Problem :) May I ask what OS you work on? At least for my setup on Mac with arm, the .node_version notation is not recognized when trying to install it.
Yes, I am using it via Zed. Any suggestions on how I either could avoid that error or a plan on how this could be resolved in general? I can imagine I'm not the only one with zed and nodenv installed
@LordSalmon good morning! I'm using macos too with arm. But i use mise as my node installer.
To me is weird that nodenv picks up the .node_version for running the language server. I mean, node 22 is the version we use to develop it but it can be compatible with older versions of node.