Quantcast
Channel: Active questions tagged visual-studio-code - Stack Overflow
Viewing all articles
Browse latest Browse all 99173

Closest ancestor function in code - VS Code Extensions API

$
0
0

I need the VS Code extension API that finds closest ancestor function in code. These are to be coordinates (line, character) and function name.

I imagine doing one of these solutions:

  1. getBreadcrumb(line: number, character: number), which returns an array, with a path to the place we specified in the parameters.

or

  1. AST structure navigation.

or

  1. Manual search, custom search script.

But there is no or I can't find the ready breadcrumb API, ready access to AST navigation. Manual own code is a last resort.

How do you get one of these solutions in the VS Code API?


Viewing all articles
Browse latest Browse all 99173

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>