annotate-snippets-rs icon indicating copy to clipboard operation
annotate-snippets-rs copied to clipboard

Trimming of suggestions needs to be syntax aware which is out of scope

Open epage opened this issue 4 weeks ago • 0 comments

Looking at #343, we can see that the trimming logic should really care about atomic units of syntax. While we can pile more hacks on top of our existing ones, we'll never reach syntax awareness for full correctness.

Pushing this to the caller would allow the caller to either be syntax aware or specialize the hacks to their needs. In fact, having the current heuristics could run counter to someone doing that today.

This also better fits with the literalism that we embraced with the lastest API design (see also #309)

epage avatar Nov 13 '25 21:11 epage