Initialize nodejs path used in the launch according the OS
Closed this issue · 3 comments
angelozerr commented
Today, nodejs path is hard coded. It should be better to initialize nodejs path according teh OS
- try to find nodejs path in the known directory according the OS (ex :
C:/Program Files/nodejs/node.exe
for Windows,/usr/local/bin/node
for linux) - if not found, try to retrieve node inside PATH env.
In other words:
- create a
org.eclipse.languageserver.util.NodejsHelper
class - provide a
NodejsHelper#getNodejsPath()
which retrieve node path.
I have already done that for tern.java and typescript.java. If you are interesed, I could do a PR.
mickaelistria commented
I had in mind, once the support for CSS, JS and C# are in a separate bundle, to consume the JSDT node.js integrations and runners for those. What do you think about it?
angelozerr commented
the JSDT node.js integrations doesn't support this feature if I remember. NodejsHelper is a very basic class. You could remove to JSDT node.js integration after.
mickaelistria commented