21 using OptionMapTy = std::map<std::string, std::unique_ptr<AttrSetClientProc>>;
24 std::unique_ptr<OwnedEvalClient> Eval;
27 std::unique_ptr<AttrSetClientProc> NixpkgsEval;
29 std::mutex OptionsLock;
43 void evalExprWithProgress(AttrSetClient &Client,
const EvalExprParams &Params,
44 std::string_view Description);
50 std::mutex ConfigLock;
55 WorkspaceConfiguration;
63 void updateConfig(Configuration NewConfig);
72 CreateWorkDoneProgress;
77 llvm::unique_function<void(
79 BeginWorkDoneProgress;
81 void beginWorkDoneProgress(
85 BeginWorkDoneProgress(Params);
88 llvm::unique_function<void(
90 ReportWorkDoneProgress;
92 void reportWorkDoneProgress(
96 ReportWorkDoneProgress(Params);
99 llvm::unique_function<void(
103 void endWorkDoneProgress(
106 EndWorkDoneProgress(Params);
109 mutable std::mutex TUsLock;
110 llvm::StringMap<std::shared_ptr<NixTU>> TUs;
112 std::shared_ptr<const NixTU> getTU(std::string_view
File)
const {
114 std::lock_guard G(TUsLock);
115 if (!TUs.count(
File)) [[unlikely]] {
119 return TUs.lookup(
File);
122 static std::shared_ptr<nixf::Node> getAST(
const NixTU &TU) {
131 std::shared_ptr<const nixf::Node> getAST(std::string_view
File)
const {
132 auto TU = getTU(
File);
133 return TU ? getAST(*TU) : nullptr;
136 boost::asio::thread_pool Pool;
140 std::optional<int64_t> Version);
149 bool ReceivedShutdown =
false;
168 void onDocumentSymbol(
193 void onDocumentHighlight(
201 std::set<nixf::Diagnostic::DiagnosticKind>
202 SuppressedDiagnostics;
204 std::mutex SuppressedDiagnosticsLock;
208 void updateSuppressed(
const std::vector<std::string> &Sup);
211 bool isSuppressed(nixf::Diagnostic::DiagnosticKind Kind);
213 std::optional<int64_t> Version, std::string_view Src,
214 const std::vector<nixf::Diagnostic> &Diagnostics);
229 void onDidChangeConfiguration(
233 Controller(std::unique_ptr<lspserver::InboundPort> In,
234 std::unique_ptr<lspserver::OutboundPort> Out);