MCPcopy Create free account
hub / github.com/docker/docker-language-server / createSymbol

Function createSymbol

internal/compose/documentSymbol.go:95–112  ·  view source on GitHub ↗
(t *token.Token, kind protocol.SymbolKind)

Source from the content-addressed store, hash-verified

93}
94
95func createSymbol(t *token.Token, kind protocol.SymbolKind) *protocol.DocumentSymbol {
96 rng := protocol.Range{
97 Start: protocol.Position{
98 Line: uint32(t.Position.Line - 1),
99 Character: uint32(t.Position.Column - 1),
100 },
101 End: protocol.Position{
102 Line: uint32(t.Position.Line - 1),
103 Character: uint32(t.Position.Column - 1 + len(t.Value)),
104 },
105 }
106 return &protocol.DocumentSymbol{
107 Name: t.Value,
108 Kind: kind,
109 Range: rng,
110 SelectionRange: rng,
111 }
112}

Callers 1

findSymbolsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected