(rng hcl.Range, position protocol.Position)
| 207 | } |
| 208 | |
| 209 | func isInsideRange(rng hcl.Range, position protocol.Position) bool { |
| 210 | positionLine := int(position.Line + 1) |
| 211 | positionCharacter := int(position.Character + 1) |
| 212 | if rng.Start.Line < positionLine { |
| 213 | if positionLine < rng.End.Line { |
| 214 | return true |
| 215 | } |
| 216 | return positionLine == rng.End.Line && positionCharacter < rng.End.Column |
| 217 | } else if rng.Start.Line == positionLine { |
| 218 | if positionLine < rng.End.Line { |
| 219 | return rng.Start.Column <= positionCharacter |
| 220 | } |
| 221 | return rng.Start.Column <= positionCharacter && positionCharacter <= rng.End.Column |
| 222 | } |
| 223 | return false |
| 224 | } |
| 225 | |
| 226 | func createTargetBlockCompletionItems(blocks hclsyntax.Blocks, quoted bool) *protocol.CompletionList { |
| 227 | list := &protocol.CompletionList{Items: []protocol.CompletionItem{}} |
no outgoing calls