#pragma once #include #include #include #include #include #include #include #include namespace vls::features::documents { struct Position { std::uint32_t line{}, character{}; auto operator<=>(const Position &) const = default; }; struct Range { Position start, end; auto operator<=>(const Range &) const = default; }; struct Location { std::string path; Range range; auto operator<=>(const Location &) const = default; }; // Semantic identity of one binding, joined by definition like navigation. struct Binding { std::string name; std::optional definition; auto operator<=>(const Binding &) const = default; }; struct Use { Binding binding; std::string path; Range range; }; // Ranges of every proven use of the binding at the position, restricted to // the same file, deduplicated and bounded. An empty result means no unique // binding covers the position. [[nodiscard]] std::vector highlights(std::span, std::string_view path, Position, std::size_t limit = 512); } // namespace vls::features::documents