nixd
Loading...
Searching...
No Matches
Classes | Namespaces
AttrSetProvider.h File Reference

Dedicated worker for evaluating attrset. More...

#include "nixd/Protocol/AttrSet.h"
#include "lspserver/LSPServer.h"
#include <nix/eval.hh>
#include <memory>

Go to the source code of this file.

Classes

class  nixd::AttrSetProvider
 Main RPC class for attrset provider. More...
 

Namespaces

namespace  nixd
 

Detailed Description

Dedicated worker for evaluating attrset.

Motivation: eval things in attrset (e.g. nixpkgs). (packages, functions ...)

Observation:

  1. Fast: eval (import <nixpkgs> { }).
  2. Slow: eval a whole NixOS config until some node is being touched.

This worker is designed to answer "packages"/"functions" in nixpkgs, but not limited to it.

For time-saving: Once a value is evaluated. It basically assume it will not change. That is, any workspace editing will not invalidate the value.

Definition in file AttrSetProvider.h.