Closed holybreath closed 8 years ago
Tern would be a good basis to do this, but you'll have to do it in a plugin you write yourself. I'm not adding extra features at the moment.
@marijnh Hi, I would like to develop such a plugin based on tern, so I want a function like FunctionListOfCurrentFile which I can call directly, could you make it out? Then I may finish this plugin very soon. Thanks!
@holybreath I have a npm module that used to find functions parsefunc it's based on acorn (the same as tern), I've also made a plugin unite-js-func to find function in vim, you could use it or take it for example.
@chemzqm Thanks! your suggestion is very helpful
When the code increments, it is very useful to have a list of function names of current file, then I can jump from one function to another quickly. So if you could provide a API to provide this list? I guess it is very easy for tern, because it already has done a excellent analysis work.
I have done some UI work to made a window to show function list, but it is simply based on the "function" string search, so it couldn't work under new es6 grammar.
Thanks!