Hello,
Can you tell me how to get the editor to add a new framework for code auto-completion ?
I would like to integrate GSAP (JS framework)
Thank in advance
I’m not sure about your tech stack, but I think you need to install TypeScript extension
Thank you for your answer.
Yes, I have already installed TypeScript. But I didn’t find a solution to integrate a specific framewrok like other editors (for example PHPStorm) by adding the type files for a language.
I tried to write to the support but I never got any answer either.
What do you mean saying “integrate a specific framewrok”?
“Some editors may require that you add support for TypeScript through third party packages. For example there’s a TypeScript package for Sublime and one for Atom. You may need to install an additional package like these to get auto-completion and hinting working with GSAP in your editor. That’s why we recommend Visual Studio Code (VS Code) or WebStorm.”
Source → How to get GSAP Auto-completion and Hinting - Learning Center - GreenSock
The declaration type file are available at : https://github.com/greensock/GSAP/tree/master/types
I Installed the GSAP autocompletion with PHPStorm and all working fine. But as I prefer Nova, I would like the same autocompletion with it.
As far as I worked with GSAP, I had no issues with autocomplete in any editors that supports LSP and TypeScript. For example in my JS I just imported GSAP library and boom, it worked with just TypeScript Language Server enabled (which is on board on Nova after TS installing, LSP is here by default). So for me, it should be working well with just TS installed, nothing else.
Then there is perhaps a configuration that I did not make or another oversight on my part because I do not have the same result on my side with Nova (however it works with PHPStorm).
Can you give me an example of how you imported the GSAP library so that I do exactly as you do?
Thanks in advance
I’m pretty sure that everything is nice described here gsap - npm
Thanks for the link.
With nova I want to edit files remotely on a server. So the loading of gsap is done with a tag in the website.
During my tests, I had already installed npm gsap locally because I thought that the Nova editor could need it but it didn’t change anything.
In the remote website, gsap works well and is well loaded. My problem concerns the Nova editor in order to take in charge the auto complete
The GSAP auto completion requires Typescript. Therefore you can only get code completion when editing a Typescript file.
You’re on your own if you want to try to get Typescript completions working in plain JS. You could try changing the syntax to Typescript from the Editor → Syntax menu. You may also need to follow the GSAP instructions here under If you are using plain JS files. You may need to add a tsconfig.json instead of a jsconfig.json file, because I think only VScode supports jsconfig.json, however tsconfig.json is recognized by Typescript.
Since you are editing a remote file, I’m not sure that it will work at all, because Typescript and Nova may not see the remote file as being part of your project and not subject to your local Typescript configuration.
It’s best to get it working locally first, using Typescript, then publish your changes to the remote server.
The other possibility is if someone made a GSAP completions plugin for Nova that does not rely on Typescript, but no such plugin has been made.
Thank you for your feedback.
Locally it works now. But you are right it doesn’t work because I edit a file in remote.
I found that Nova proposes a “File Browser” to manually transfer the files directly from the editor. But it remains manual and not very optimized time-wise.
Is it possible to create a local project with Nova and to synchronize it with a remote server? The goal is to be able to upload the file to the remote server when I save a change in local version?
There is a “Save & Publish” option in the File menu, or Ctrl + Command + S.
You’ll need to configure publishing in your project settings. Open Project → Project Settings and click the + next to Remote Files to choose a publishing server. Then check on Use Publishing and specify your local and remote publishing paths.
Now any saved local files will be queued up in the Publish tab in the sidebar. Just click Publish All in the sidebar to upload all the changed files to the remote server. Or use the Save & Publish menu item.
More info: Nova Publishing sidebar documentation
Thank you all very much, everything is working now