vscode-solargraph icon indicating copy to clipboard operation
vscode-solargraph copied to clipboard

Allow Setting the Port of externalServer to a String

Open a0n opened this issue 2 years ago • 1 comments

I have a file: .vscode/settings.json with the following content:

{
  "solargraph.externalServer": {
    "host": "localhost",
    "port": "${env:SOLARGRAPH_PORT}"
  },
  "solargraph.transport": "external",
}

I'd like to be able to set the Port from an ENV Variable, currently only String values can be created from ENV Variables. But if I provide a String in the Settings the Code breaks with:

Failed to start Solargraph: RangeError [ERR_SOCKET_BAD_PORT]: Port should be >= 0 and < 65536. Received ${env:SOLARGRAPH_PORT}.

Could the value of "port" be casted to an integer so that this is possible?

a0n avatar Sep 13 '22 16:09 a0n

I think there is a Problem still because the package.json#L65 enforces the port setting to be of type integer

a0n avatar Nov 07 '22 18:11 a0n