[Mongo4idea] Load Mongo Shell JS Libs when editing a JS file

Hi,

I would like to support the Mongo shell JS libraries for mongo scripts. I can get them from the Mongo github source repository and bundle them in the Mongo Plugin.
Unfortunately, with my current knowledge in IntelliJ plateform, I do not know how to load them in the Editor Context for JS files.
Do you have any documentation or sample project that could explain the way to do?

Thanks,

David

0
1 comment

Hi David,

You can use com.intellij.lang.javascript.library.JSPredefinedLibraryProvider extension point for that purpose and override getPredefinedLibraries(Project) and getRequiredLibraryFilesForResolve(Project) with the list of JS files

0

Please sign in to leave a comment.