Sublime Text: Unable to get autocomplete suggestions for imported modules


#1

Hello,

I have a simple setup, 2 files:
utils.js:

export function sum(a, b) {
    return a + b;
}

export function prod(a, b) {
    return a * b;
}

export function div(a, b) {
    return a / b;
}

main.js:

import * as utils from './utils';

I would expect to get the list of exported function from utils.js, as a suggestion when I type following in main.js:

utils.<alt + space>

But unfortunatly, I do not see this.
I think it is a configuration issue, but I cannot figure it out.
This is my ‘.tern-project’ file:

{
  "libs": [
    "browser",
    "jquery",
    "ecma6"
  ],
  "loadEagerly": [],
  "plugins": {
    "modules": {
      "load": true
    },
    "es_modules": {},
    "doc_comment": {},
    "node": {}
  }
}

Am I missing something in the configuration?

Thanks,
Gerald


#2

The "load": true option to the modules plugin is bogus, and will cause the plugin to only load modules that match the /true/ regular expression, which was probably not what you intended.