eapache / starscope

Smart code search for Ruby, Go, and JavaScript
https://rubygems.org/gems/starscope
MIT License
266 stars 18 forks source link

Consider adding sym table export to ctags #170

Closed jackkinsella closed 5 years ago

jackkinsella commented 5 years ago

I'm using starscope to generate ctags which in turn powers my auto-complete in vim. This works majestically for function definitions and constants, but it doesn't pick up symbols.

For example, in Rails I might write:

   has_many :orders, dependent: :restrict_with_exception

With the current workflow, the :restrict_with_exception symbol will not be available in other buffers.

What are your thoughts on adding syms to the ctag format exports? Or at least allowing an option for this. Happy to make a PR if this is something you'd consider.

eapache commented 5 years ago

I'm happy to consider it, but I'm not sure where in the ctag format symbols would fit in, since (unlike the others) they don't have a single canonical point of definition, they just get used.

jackkinsella commented 5 years ago

You're right. It sort of breaks the semantics. Perhaps there could be an option to export a general sym list into a plaintext file that could be read as a source for autocomplete plugins.

For example:

:set complete+=.starscope_syms
eapache commented 5 years ago

Ya, something like that would probably work. You might also be able to get what you want via the cscope export?