Skip to content
This repository has been archived by the owner on Sep 26, 2023. It is now read-only.

Commit

Permalink
Revert "Optimize hover text (#50)"
Browse files Browse the repository at this point in the history
This reverts commit a940e07.
  • Loading branch information
efritz committed Apr 14, 2020
1 parent 1c4355b commit a855a1f
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 127 deletions.
122 changes: 0 additions & 122 deletions internal/index/astutil.go

This file was deleted.

3 changes: 2 additions & 1 deletion internal/index/helper.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ import (

doc "github.com/slimsag/godocmd"
"github.com/sourcegraph/lsif-go/protocol"
"golang.org/x/tools/go/ast/astutil"
"golang.org/x/tools/go/packages"
)

Expand Down Expand Up @@ -204,7 +205,7 @@ func findComments(pkgs []*packages.Package, p *packages.Package, f *ast.File, o
}

// Resolve the object o into its respective ast.Node
paths, exact := pathEnclosingInterval(f, o.Pos(), o.Pos())
paths, exact := astutil.PathEnclosingInterval(f, o.Pos(), o.Pos())
if !exact {
return "", nil
}
Expand Down
4 changes: 0 additions & 4 deletions internal/index/indexer.go
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,6 @@ func (i *indexer) addImports(p *packages.Package, f *ast.File, fi *fileInfo) err
}

func (i *indexer) indexDefs(pkgs []*packages.Package, p *packages.Package, f *ast.File, fi *fileInfo, proID, filename string) error {
fmt.Fprintf(os.Stdout, ".")

var rangeIDs []string
for ident, obj := range p.TypesInfo.Defs {
// Object is nil when not denote an object
Expand Down Expand Up @@ -487,8 +485,6 @@ func (i *indexer) indexDefs(pkgs []*packages.Package, p *packages.Package, f *as
}

func (i *indexer) indexUses(pkgs []*packages.Package, p *packages.Package, fi *fileInfo, filename string) error {
fmt.Fprintf(os.Stdout, ".")

var rangeIDs []string
for ident, obj := range p.TypesInfo.Uses {
// Only emit if the object belongs to current file
Expand Down

0 comments on commit a855a1f

Please sign in to comment.