11#include <boost/asio/post.hpp>
27 llvm::StringRef Src) {
37 for (
const auto *
Use : Def.uses()) {
55 if (std::shared_ptr<nixf::Node> AST = getAST(*
TU,
Reply)) [[
likely]] {
59 error(
"cannot find corresponding node on given position"));
61 const auto &
PM = *
TU->parentMap();
62 const auto &VLA = *
TU->variableLookup();
65 }
catch (std::exception &E) {
66 return Reply(
error(
"references: {0}", E.what()));
71 boost::asio::post(Pool, std::move(
Action));
Convert between LSP and nixf types.
std::vector< Location > Locations
Lookup variable names, from it's parent scope.
const Node * descend(PositionRange Range) const
Descendant node that contains the given range.
Whether current platform treats paths case insensitively.
llvm::unique_function< void(llvm::Expected< T >)> Callback
llvm::Error error(std::error_code EC, const char *Fmt, Ts &&...Vals)
bool fromJSON(const llvm::json::Value &Params, Configuration::Diagnostic &R, llvm::json::Path P)
nixf::Position toNixfPosition(const lspserver::Position &P)
const nixf::Definition & findDefinition(const nixf::Node &N, const nixf::ParentMapAnalysis &PMA, const nixf::VariableLookupAnalysis &VLA)
Heuristically find definition on some node.
lspserver::Range toLSPRange(llvm::StringRef Code, const nixf::LexerCursorRange &R)
URIForFile uri
The text document's URI.