Shanti Posted September 12, 2020 Share Posted September 12, 2020 Hi Everyone, I am new here and just discovered this "whole new world" of building websites that stand out. Here is my problem: In my main.js file, when i type gsap.set VS code shows me suggestion, but there is no way, to use the auto-completion. Neither "tab" nor "enter" will complete the code. I attached an image, so you can see what I mean. After I hit "tab" or "enter", the suggestions disappears and I will just see " gsap.set without any further code. :((( What I have done: I added the/types folder from the gsap member /npm-install-this folder to the root of my project added an empty jsconfig.json to the root of my project restartet VS Code several times checked my VS Code Settings (but was not quite sure about what to search there) Also tried the VS Code Extension "GreenSock Snippets" from Petr Tichy, but that also doesn't work I am using the CDN with GSAP Version 3.5.1, but also tried it with the version that was shipped with the starter files, which was 3.3.1 It may be hard because you can change so many settings in VS Code that its impossible to blindly find my mistake. but I hope that maybe someone else had the same issue and can help me out Thanks alot!!! Link to comment Share on other sites More sharing options...
ZachSaucier Posted September 12, 2020 Share Posted September 12, 2020 Hey Shanti and welcome to the GreenSock forums. Given the suggestions are being provided, you are indeed successfully loading the Typescript declaration files properly which is very important. That means that for some reason your tab/enter to autocomplete is the only part not working. I don't know why that might be. Maybe it's a conflicting package or a changed key bind in your user preferences? I think you should reach out to the VS Code support about the issue given it seems to be an issue with the IDE itself, not anything wrong with GSAP or its declaration files. If you figure out what's going wrong we'd really appreciate it if you tell us what went wrong and how to fix it in this thread though! Link to comment Share on other sites More sharing options...
Shanti Posted September 13, 2020 Author Share Posted September 13, 2020 Hi Zach, thank you for your quick reply. Yes, I also had the feeling that is was more of a VS Code issue. And I have found the issue, it's now working like a charm. In my VS Code User Settings(JSON) my files.associations was still set to javascriptreact, not vanilla javascript. After the change from "files.associations": { "*.js": "javascriptreact", } to "files.associations": { "*.js": "javascript", } After a restart of VS Code all the suggestions now get inserted. 2 Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now