nixd
|
Main RPC class for attrset provider. More...
#include <AttrSetProvider.h>
Public Member Functions | |
AttrSetProvider (std::unique_ptr< lspserver::InboundPort > In, std::unique_ptr< lspserver::OutboundPort > Out) | |
void | onEvalExpr (const EvalExprParams &Name, lspserver::Callback< EvalExprResponse > Reply) |
Eval an expression, use it for furthur requests. | |
void | onAttrPathInfo (const AttrPathInfoParams &AttrPath, lspserver::Callback< AttrPathInfoResponse > Reply) |
Query attrpath information. | |
void | onAttrPathComplete (const AttrPathCompleteParams &Params, lspserver::Callback< AttrPathCompleteResponse > Reply) |
Complete attrpath entries. | |
void | onOptionInfo (const AttrPathInfoParams &AttrPath, lspserver::Callback< OptionInfoResponse > Reply) |
Provide option information on given attrpath. | |
void | onOptionComplete (const AttrPathCompleteParams &Params, lspserver::Callback< OptionCompleteResponse > Reply) |
Complete attrpath entries. However dive into submodules while selecting. | |
Public Member Functions inherited from lspserver::LSPServer | |
LSPServer (std::unique_ptr< InboundPort > In, std::unique_ptr< OutboundPort > Out) | |
void | closeInbound () |
Close the inbound port. | |
void | run () |
void | switchStreamStyle (JSONStreamStyle Style) |
Public Member Functions inherited from lspserver::MessageHandler | |
virtual | ~MessageHandler ()=default |
Additional Inherited Members | |
Protected Member Functions inherited from lspserver::LSPServer | |
template<class T > | |
llvm::unique_function< void(const T &)> | mkOutNotifiction (llvm::StringRef Method, OutboundPort *O=nullptr) |
template<class ParamTy , class ResponseTy > | |
llvm::unique_function< void(const ParamTy &, Callback< ResponseTy >)> | mkOutMethod (llvm::StringRef Method, OutboundPort *O=nullptr) |
Protected Attributes inherited from lspserver::LSPServer | |
HandlerRegistry | Registry |
Main RPC class for attrset provider.
Definition at line 31 of file AttrSetProvider.h.
AttrSetProvider::AttrSetProvider | ( | std::unique_ptr< lspserver::InboundPort > | In, |
std::unique_ptr< lspserver::OutboundPort > | Out ) |
Definition at line 161 of file AttrSetProvider.cpp.
void AttrSetProvider::onAttrPathComplete | ( | const AttrPathCompleteParams & | Params, |
lspserver::Callback< AttrPathCompleteResponse > | Reply ) |
Complete attrpath entries.
Definition at line 217 of file AttrSetProvider.cpp.
References lspserver::error(), nixd::AttrPathCompleteParams::Prefix, nixd::AttrPathCompleteParams::Scope, and nixt::selectStrings().
void AttrSetProvider::onAttrPathInfo | ( | const AttrPathInfoParams & | AttrPath, |
lspserver::Callback< AttrPathInfoResponse > | Reply ) |
Query attrpath information.
Definition at line 194 of file AttrSetProvider.cpp.
References lspserver::error(), and nixt::selectStrings().
void AttrSetProvider::onEvalExpr | ( | const EvalExprParams & | Name, |
lspserver::Callback< EvalExprResponse > | Reply ) |
Eval an expression, use it for furthur requests.
Definition at line 177 of file AttrSetProvider.cpp.
References lspserver::error().
void AttrSetProvider::onOptionComplete | ( | const AttrPathCompleteParams & | Params, |
lspserver::Callback< OptionCompleteResponse > | Reply ) |
Complete attrpath entries. However dive into submodules while selecting.
FIXME: suppport list names. i.e. foo.*.submodule
Definition at line 287 of file AttrSetProvider.cpp.
References nixd::OptionField::Description, lspserver::error(), nixt::isOption(), nixd::OptionField::Name, nixd::AttrPathCompleteParams::Prefix, nixd::AttrPathCompleteParams::Scope, nixt::selectOptions(), and nixt::toSymbols().
void AttrSetProvider::onOptionInfo | ( | const AttrPathInfoParams & | AttrPath, |
lspserver::Callback< OptionInfoResponse > | Reply ) |
Provide option information on given attrpath.
Definition at line 260 of file AttrSetProvider.cpp.
References lspserver::error(), nixt::selectOptions(), and nixt::toSymbols().