emacs-import-js
emacs-import-js copied to clipboard
Run import-js after snippet completion
Is there a way to trigger import js after yasnippet completion?
I know I can use a custom hook or even yasnippet's 'expand-env' function but what import-js function should I use?
import-js-import will import only on-point expressions, I would need to use something that takes part of the snippet text as argument
Hey @zerinoid - do you require that import-js would run only on a specific snippet, or would import-js-fix suffice?
The easiest path I see here to importing after snippet expansion would be to run import-js-fix on the current file just after expanding, which will apply imports to the whole file.
@kevinkehl Hi, thank you.
I thought about that but import-js-fix end up importing things wrongly, Like catch's 'error' parameter which it imports as a component name Error:

Don't know why this happens.