Open knobo opened 5 years ago
Run tern-find-definition in emacs when standing on InputElement when I have the jsx extention, it woks.
tern-find-definition
InputElement
jsx
How can I make tern look for jsx files by default?
import InputElement from './InputElement.jsx';
^[[1;2CRequest: { "query": { "end": 98, "file": "src/input/InputElementBlock.jsx", "type": "definition", "variable": null } } Response: { "origin": "src/input/InputElement.jsx", "start": 145, "end": 150, "file": "src/input/InputElement.jsx", "contextOffset": 50, "context": "nst block = bemCn('input');\n\nexport default class " }
But without the jsx extention Like this:
import InputBlock from './InputBlock';
It does not work.
Request: { "query": { "end": 153, "file": "src/input/InputElementBlock.jsx", "type": "definition", "variable": null } } Response: { "origin": "node_modules/react-transition-group/TransitionGroup.js" }
I am think to add a official jsx plugin to deal with this.
Run
tern-find-definition
in emacs when standing onInputElement
when I have thejsx
extention, it woks.How can I make tern look for
jsx
files by default?But without the
jsx
extention Like this:It does not work.