#pragma once #include #include #include #include #include #include namespace vls::features::code_lens { struct Position { std::uint32_t line{}, character{}; auto operator<=>(const Position &) const = default; }; struct Range { Position start, end; auto operator<=>(const Range &) const = default; }; // One outline symbol with its proven reference count. struct Entry { std::string name; std::string path; Range range; std::size_t references{}; }; struct Lens { Range range; std::string title; std::vector arguments; auto operator<=>(const Lens &) const = default; }; struct Limits { std::size_t lenses{512}; std::size_t nameBytes{256}; std::size_t titleBytes{128}; }; // One lens per unique (path, range), titled with the reference count and // carrying {path, line, character} arguments so a client can resolve it through // workspace/executeCommand. Entries are ordered by position and bounded. [[nodiscard]] std::vector build(std::span, const Limits & = Limits{}); } // namespace vls::features::code_lens