x/tools/gopls: support language features for text/template, html/template #36911
I was looking into this and noticed that Goland has IDE-level support for this. It requires the use of a comment to specify the embedded type.
I can't see a way to support language features without some sort of "type hint" for template files, so maybe this is something to consider making standard.
Following the discussion on #34652 and the proposal of #36911 (gopls), this CL adds an option to skip the function declartion check on parsing, in order to make it possible to parse arbitrary template text files and get their AST. Fixed #38627 Change-Id: Id1e0360fc726b49dcdd49716ce25563ebaae6c10 Reviewed-on: https://go-review.googlesource.com/c/go/+/301493 Reviewed-by: Rob Pike <email@example.com> Reviewed-by: Emmanuel Odeke <firstname.lastname@example.org> Run-TryBot: Ian Lance Taylor <email@example.com> TryBot-Result: Go Bot <firstname.lastname@example.org> Trust: Ian Lance Taylor <email@example.com>