ember_tools.vim
ember_tools.vim copied to clipboard
Can't resolve import
I have this awesome plugin working perfectly in my neovim setup on Ubuntu. Only one issue bothers me a lot.
I have an import defined like this:
import SomeMixin from 'myApp/mixins/shared/some-mixin';
in package.json I have
{
"name": "myApp"
}
and app/mixins/shared/some-mixin.js exists and contains
import Ember from 'ember';
export default Ember.Mixin.create({});
The issue is when I place a cursor to myApp/mixins/shared/some-mixin and press gf it prints an error:
E447: Can't find file "myApp/mixins/shared/some-mixin" in path
Although it works as expected with relative imports defined like this:
import SomeMixin from '../../mixins/shared/some-mixin';
I'm really sorry it took me so long to get around to this. I saved the issue for later handling, and I never got around to it.
I'd like to help debug this, if you're still using the plugin. I can't reproduce the problem, but you might be able to give me some more information. If you update to the master version and put let g:ember_tools_debug = 1 in your .vimrc, then trying to gf should output some debug information that you can view by running the :messages command. Could you paste it here, so I can get a trace of what callbacks are being attempted?