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

Code action for extracting expressions to separate files. More...

#include <lspserver/Protocol.h>
#include <nixf/Sema/ParentMap.h>
#include <nixf/Sema/VariableLookup.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::addExtractToFileAction (const nixf::Node &N, const nixf::ParentMapAnalysis &PM, const nixf::VariableLookupAnalysis &VLA, const std::string &FileURI, llvm::StringRef Src, std::vector< lspserver::CodeAction > &Actions)
 Add extract-to-file action for selected expressions.

Detailed Description

Code action for extracting expressions to separate files.

Allows users to select any Nix expression and extract it to a new file, automatically generating an import statement with appropriate argument passing for free variables.

Definition in file ExtractToFile.h.