scztt / vscode-supercollider

MIT License
56 stars 6 forks source link

Please add a feature to change the port number of sclang. #35

Closed prko closed 6 months ago

prko commented 11 months ago

Hello everyone!

To use vscode-supercollider with SC-IDE, please add a feature to adjust the sclang port number and the scserver port number. Currently using vscode-supercollider and SC-IDE at the same time can cause some problems.

Thanks in advance!

prko commented 11 months ago

Ah, It would be nice if the port number of the server can be also changed!

jamshark70 commented 10 months ago

I had thought this might already be implemented, but, adding:

"supercollider.sclang.args": "-u 57140"

to settings.json doesn't actually do the job: sclang reports "file "-" does not exist".

It seems that the plug-in is treating each byte as two bytes:

ps x | grep sclang
 266628 ?        SLl    0:03 /usr/local/bin/sclang - u   5 7 1 4 0 -i vscode -l /home/dlm/.config/SuperCollider/sclang_conf_vscodium.yaml

"- u 5 7 1 4 0" = there's the bug.

So the option exists, but can't be used at present.

It would be nice if the port number of the server can be also changed!

It can be changed, but this has never been the responsibility of any editor. So there is no reason for the sc-vscode plug-in to implement this.

Server.default.addr = NetAddr("127.0.0.1", my_desired_port_number);
jamshark70 commented 10 months ago

"supercollider.sclang.args": "-u 57140"

This was wrong. Should be:

"supercollider.sclang.args": ["-u 57140"]

VSCode still flags this syntax as a "problem" (?) (why... this is not Array<string>?) but it works:

NetAddr.langPort

> 57140

So the option exists, and works -- so this issue can be closed.