In buf beta lsp we have a handle on a set of *ast.FileNodes that the user has open. For formatting, we format the node, and then construct a range from the node, using the FileNode's Start() and End(). However, because Start() doesn't take into account leading comments, we had a bug. (It looks like End() does handle up to the EOF correctly.)
Ideally, we'd be able to retrieve the full file span from an *ast.FileNode. (Perhaps there's a way to do this already; open to pointers!)