Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set filetype extensions for javascript even when node_modules is not found #12

Open
SevereOverfl0w opened this issue Aug 13, 2019 · 3 comments

Comments

@SevereOverfl0w
Copy link

This will allow gf on projects between files in the same project even when I haven't done npm install yet.

@tpope
Copy link
Owner

tpope commented Aug 13, 2019

Hesitant to stomp on other use cases to solve an edge case. But maybe fall back to looking for package.json?

@SevereOverfl0w
Copy link
Author

is the intention only to set .js to suffixesadd only when there's a node_modules folder? It seems like that's generally useful for js outside of nodejs, to me at least.

@tpope
Copy link
Owner

tpope commented Aug 13, 2019

The intention is to only handle the Node case, and stay out of the way for other environments. For example, the Rails asset pipeline has a different set of extensions and its own //= require import syntax handled by rails.vim. Mind you, that's the only "other environment" I can name, and even Rails is starting to favor Yarn. I'd be open to a more aggressive compromise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants