minor improvment in the hover doc
This commit is contained in:
@@ -196,7 +196,9 @@ func handleMessage(msg *JsonRpcMessage) {
|
|||||||
if root != "" {
|
if root != "" {
|
||||||
projectRoot = root
|
projectRoot = root
|
||||||
logger.Printf("Scanning workspace: %s\n", root)
|
logger.Printf("Scanning workspace: %s\n", root)
|
||||||
tree.ScanDirectory(root)
|
if err := tree.ScanDirectory(root); err != nil {
|
||||||
|
logger.Printf("ScanDirectory failed: %v\n", err)
|
||||||
|
}
|
||||||
tree.ResolveReferences()
|
tree.ResolveReferences()
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -602,13 +604,12 @@ func handleReferences(params ReferenceParams) []Location {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func formatNodeInfo(node *index.ProjectNode) string {
|
func formatNodeInfo(node *index.ProjectNode) string {
|
||||||
class := node.Metadata["Class"]
|
info := ""
|
||||||
if class == "" {
|
if class := node.Metadata["Class"]; class != "" {
|
||||||
class = "Unknown"
|
info = fmt.Sprintf("`%s:%s`\n\n", class, node.RealName[1:])
|
||||||
|
} else {
|
||||||
|
info = fmt.Sprintf("`%s`\n\n", node.RealName)
|
||||||
}
|
}
|
||||||
|
|
||||||
info := fmt.Sprintf("**Object**: `%s`\n\n**Class**: `%s`", node.RealName, class)
|
|
||||||
|
|
||||||
// Check if it's a Signal (has Type or DataSource)
|
// Check if it's a Signal (has Type or DataSource)
|
||||||
typ := node.Metadata["Type"]
|
typ := node.Metadata["Type"]
|
||||||
ds := node.Metadata["DataSource"]
|
ds := node.Metadata["DataSource"]
|
||||||
|
|||||||
Reference in New Issue
Block a user