Skip to content

Commit

Permalink
lsp: fix printing alias decl imports
Browse files Browse the repository at this point in the history
  • Loading branch information
vknabel committed Jun 14, 2022
1 parent b64e42a commit 2b160f7
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion ast/decl-import.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,11 @@ func (e DeclImport) DeclName() Identifier {
}

func (e DeclImport) DeclOverview() string {
return fmt.Sprintf("import %s", e.ModuleName)
if e.Alias != "" {
return fmt.Sprintf("import %s = %s", e.Alias, e.ModuleName)
} else {
return fmt.Sprintf("import %s", e.ModuleName)
}
}

func (e DeclImport) Meta() *MetaDecl {
Expand Down

0 comments on commit 2b160f7

Please sign in to comment.