Skip to content

Commit

Permalink
2024.05.03-19:46
Browse files Browse the repository at this point in the history
  • Loading branch information
slankdev committed May 3, 2024
1 parent 8854cca commit 9425678
Showing 1 changed file with 11 additions and 3 deletions.
14 changes: 11 additions & 3 deletions pkg/vtyang/commands.go
Original file line number Diff line number Diff line change
Expand Up @@ -617,18 +617,26 @@ type CompletionItem struct {
func doCompletion(line string, pos int) CompletionResult {
tree := getCommandNodeCurrent().tree
nodes := tree.Completion(line, pos)

items := []CompletionItem{}

// Static information (1) yang-tree
for _, node := range nodes {
items = append(items, CompletionItem{
Word: node.Name,
Helper: node.Description,
})
}
res := CompletionResult{

// Static information (2) identityref, enum
// TODO(slankdev): implement me

// Dynamic information
// TODO(slankdev): implement me

// Return result
return CompletionResult{
Items: items,
}
return res
}

// TODO: kore kore
Expand Down

0 comments on commit 9425678

Please sign in to comment.