nixd
Loading...
Searching...
No Matches
nixd::AttrSetProvider Class Reference

Main RPC class for attrset provider. More...

#include <AttrSetProvider.h>

Inheritance diagram for nixd::AttrSetProvider:
[legend]
Collaboration diagram for nixd::AttrSetProvider:
[legend]

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

Detailed Description

Main RPC class for attrset provider.

Definition at line 31 of file AttrSetProvider.h.

Constructor & Destructor Documentation

◆ AttrSetProvider()

AttrSetProvider::AttrSetProvider ( std::unique_ptr< lspserver::InboundPort > In,
std::unique_ptr< lspserver::OutboundPort > Out )

Definition at line 221 of file AttrSetProvider.cpp.

References lspserver::LSPServer::LSPServer().

Member Function Documentation

◆ onAttrPathComplete()

void AttrSetProvider::onAttrPathComplete ( const AttrPathCompleteParams & Params,
lspserver::Callback< AttrPathCompleteResponse > Reply )

◆ onAttrPathInfo()

void AttrSetProvider::onAttrPathInfo ( const AttrPathInfoParams & AttrPath,
lspserver::Callback< AttrPathInfoResponse > Reply )

Query attrpath information.

Definition at line 254 of file AttrSetProvider.cpp.

References lspserver::error(), and nixt::selectStrings().

◆ onEvalExpr()

void AttrSetProvider::onEvalExpr ( const EvalExprParams & Name,
lspserver::Callback< EvalExprResponse > Reply )

Eval an expression, use it for furthur requests.

Definition at line 237 of file AttrSetProvider.cpp.

References lspserver::error().

◆ onOptionComplete()

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 326 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().

◆ onOptionInfo()

void AttrSetProvider::onOptionInfo ( const AttrPathInfoParams & AttrPath,
lspserver::Callback< OptionInfoResponse > Reply )

Provide option information on given attrpath.

Definition at line 299 of file AttrSetProvider.cpp.

References lspserver::error(), nixt::selectOptions(), and nixt::toSymbols().


The documentation for this class was generated from the following files: