Skip to content

Commit 2b160f7

Browse files
committed
lsp: fix printing alias decl imports
1 parent b64e42a commit 2b160f7

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

ast/decl-import.go

+5-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,11 @@ func (e DeclImport) DeclName() Identifier {
2121
}
2222

2323
func (e DeclImport) DeclOverview() string {
24-
return fmt.Sprintf("import %s", e.ModuleName)
24+
if e.Alias != "" {
25+
return fmt.Sprintf("import %s = %s", e.Alias, e.ModuleName)
26+
} else {
27+
return fmt.Sprintf("import %s", e.ModuleName)
28+
}
2529
}
2630

2731
func (e DeclImport) Meta() *MetaDecl {

0 commit comments

Comments
 (0)