vim-apathy
vim-apathy copied to clipboard
Set filetype extensions for javascript even when node_modules is not found
This will allow gf on projects between files in the same project even when I haven't done npm install yet.
Hesitant to stomp on other use cases to solve an edge case. But maybe fall back to looking for package.json?
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.
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.