You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Use npm package require-relative to find module path #41
I suspect that's because the package resolution algo I wrote for Node.vim isn't seeking for modules recursively up the chain. 😇 I should fix that as I occasionally hit that issue myself, too. As for require-relative, that's a Node module and Node.vim doesn't actually run any of its logic in JavaScript. :)
I've written a small plugin that uses the package.json to resolve Node Path Relative modules https://github.com/tomarrell/vim-npr and is configurable on a project-by-project basis.
Activity
moll commentedon Apr 4, 2017
I suspect that's because the package resolution algo I wrote for Node.vim isn't seeking for modules recursively up the chain. 😇 I should fix that as I occasionally hit that issue myself, too. As for
require-relative, that's a Node module and Node.vim doesn't actually run any of its logic in JavaScript. :)feix760 commentedon Apr 17, 2017
We can use
system('node vim-node.js')to exerequire-relativefor get path, i wrote one at https://github.com/feix760/vim-javascript-gftomarrell commentedon Apr 9, 2018
I've written a small plugin that uses the package.json to resolve Node Path Relative modules https://github.com/tomarrell/vim-npr and is configurable on a project-by-project basis.
It may help out for your use case.