arnoudkooi / sn-scriptsync

Use sn-scriptsync in combination with SN Utils to be able to code in VS Code, including all benefits of a full fledged code editor
https://marketplace.visualstudio.com/items?itemName=arnoudkooicom.sn-scriptsync
Other
43 stars 28 forks source link

Autocomplete based on client.d.ts and server.d.ts is not working in VSC #55

Closed PZifcakBC closed 3 years ago

PZifcakBC commented 3 years ago

Sorry for such lame question, but I can't get the autocomplete working in my VSC. I have VSC installed as the User setup and despite all the sn_scriptsync works as a charm, the autocomplete based on client.d.ts and server.d.ts does not work at all. I had started scriptsync in a new workspace folder, it created autocomplete folder with both files, but no relevant autocompletion is offered. I am quite desperate, as without that the autocomplete is counter-productive, when I type gs. it automatically completes getSelection(). etc. I have been trying to solve it on my own, searching for how to register template files for autocompletion etc., I have tried to make a copy of both files with js extension, but all my attempts have failed. image

arnoudkooi commented 3 years ago

You need to create a file with name jsconfig.json in the rooth of the workspace. Can be an empty file. It looks that this is not auto generated by the extension when working with Workspaces. I will check if I can support that.

arnoudkooi commented 3 years ago

This should be fixed in version 2.0.0. Also updated the intellisense to Quebec. Please let me know

PZifcakBC commented 3 years ago

Thank you, intellisense is working since update of the sn-scriptsync, what puzzles me that it does not offer all the methods which shall be available and which are defined in *.d.ts files, e.g. for GlideRecord it offers only two methods starting with "add" image

arnoudkooi commented 3 years ago

Because GlideRecord is present in both CLient and Server, it seems to pick the client version. Try to rename client.d.ts to xclient.d.ts It seems to pick in alfabetic order. Going forward I'll remove the GlideRecord part from the client version, as it is bad practice anyway

PZifcakBC commented 3 years ago

Thank you, Arnoud, now it works like a charm.

arnoudkooi commented 3 years ago

Yes, it should be fixed in 2.0.1. Not sure if you noted?

PZifcakBC commented 3 years ago

I commented your hint for renaming the autocomplete files, but now I can see you already modified the content. Great work! Thank you.