Search code examples
javascriptvisual-studio-codedocumentation

Visual studio code popup documentation API


Hi I am trying gather a list of all my Javascript functions in my project together with the comments for each function. Visual studio code provides a beautiful way of viewing each function with a popup, but I have no idea how it works and where to start my research. Anyone know an API I could use or what I can do to get this data?

enter image description here


Solution

  • Based on the provided print screen, as it presents the Quick Fix... at the Botton, I would say you are looking for the CodeActionProvider API.

    The VS Code team provides a repo full of samples at https://github.com/microsoft/vscode-extension-samples, and this API in particular is at https://github.com/microsoft/vscode-extension-samples/tree/main/code-actions-sample.

    The VS Code website also provides a complete overview of language related features, at https://code.visualstudio.com/api/language-extensions/programmatic-language-features. You could take a closer look and decide which one better fit your needs.

    Hope this helps