ternjs/tern_for_sublime

Trigger module name autocomplete

seanders opened this issue · 1 comments

Hello,

I'm having trouble completing module paths like I see working in this demo. I'm using Sublime.

I spun up the tern server locally with the --verbose flag. I don't see a request coming in for trying to resolve the module path.

For example:
Say I have this:
src/
|..Foo.js
|..Bar.js

// Foo.js
export default () => {}
// Bar.js
import Foo from './' //Manually triggering the autocomplete after `/` isn't returning `Foo`

Heres my config:

{
  "ecmaVersion": 7,
  "plugins": {
    "webpack": {
      "configPath": "./config/webpack.config.dev.js"
    }
  },
  "loadEagerly": ["src/**/*.js"],
  "dontLoad": ["node_modules/**"]
}

Looking up module definitions and autocompletions of attributes on imported modules is working fine, however. Any help would be greatly appreciated.

It seems the ST plugin is explicitly disabling completions inside strings (via #12). Attached patch removes this, since it breaks features like this.