nixd
Loading...
Searching...
No Matches
ConvertToInherit.h File Reference

Code action for converting bindings to inherit syntax. More...

#include <lspserver/Protocol.h>
#include <nixf/Sema/ParentMap.h>
#include <llvm/ADT/StringRef.h>
#include <string>
#include <vector>

Go to the source code of this file.

Namespaces

namespace  nixf
namespace  nixd

Functions

void nixd::addConvertToInheritAction (const nixf::Node &N, const nixf::ParentMapAnalysis &PM, const std::string &FileURI, llvm::StringRef Src, std::vector< lspserver::CodeAction > &Actions)
 Add code action to convert binding to inherit syntax.

Detailed Description

Code action for converting bindings to inherit syntax.

Transforms:

  • { x = x; } -> { inherit x; }
  • { a = lib.a; } -> { inherit (lib) a; }

Definition in file ConvertToInherit.h.