tpope / vim-apathy

apathy.vim: Set the 'path' option for miscellaneous file types
180 stars 9 forks source link

set &define in javascript to look up functions, methods and classes #10

Open Konfekt opened 5 years ago

Konfekt commented 5 years ago

Adapted from https://github.com/romainl/ctags-patterns-for-javascript to Vim's regular expression syntax. Making good use of \ze to match labels coming before the syntax markers. This is a follow-up to https://github.com/tpope/vim-apathy/issues/9#issuecomment-473923678

ms commented 5 years ago

I think you may want to allow something like export function.. or export default const FOO = function.

I also wonder whether we only want function definition or any other definition. In particular const will typically not be functions but rather enums or strings.

Konfekt commented 5 years ago

@ms Thanks! I do not write javascript.