Skip to content

Commit

Permalink
fix:ignore 'run main package' codelens of _ytest.gox
Browse files Browse the repository at this point in the history
  • Loading branch information
luoliwoshang committed Apr 9, 2024
1 parent 8d8a3aa commit 6383d51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion gopls/internal/lsp/source/code_lens_gox.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func gopToggleDetailsCodeLens(ctx context.Context, snapshot Snapshot, fh FileHan

func gopCommandCodeLens(ctx context.Context, snapshot Snapshot, fh FileHandle) ([]protocol.CodeLens, error) {
filename := fh.URI().Filename()
if strings.HasSuffix(filename, "_test.go") || strings.HasSuffix(filename, "_test.gop") {
if strings.HasSuffix(filename, "_test.go") || strings.HasSuffix(filename, "_test.gop") || strings.HasSuffix(filename, "_ytest.gox") {
return nil, nil
}
pgf, err := snapshot.ParseGop(ctx, fh, parser.PackageClauseOnly)
Expand Down

0 comments on commit 6383d51

Please sign in to comment.