Skip to content

Support for showing source code #476

@vemv

Description

@vemv

Hi!

It would be useful to show the source code of a given function for a few use cases:

  • As a standalone function, e.g. M-x tide-source-at-point
    • this would be akin to VS Code peek definition
  • As a drop-in fallback for M-x tide-documentation-at-point
    • e.g. if there's no available doc, show the source code instead – it often is useful enough as "documentation"
    • a variation: always append the source at the end of the buffer, even if the documentation was present
    • it would be good to apply font locking here.
  • As the *tide-documentation* buffer when using Company completions
    • this is essentially the same use case as the previous one, but in the context of showing doc while choosing a Company candidate.

Note that, AFAIK, tide-completion-show-source has nothing to do with this feature - that one merely renders a file path, not the source code itself.

Cheers - V

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions