nixd
Loading...
Searching...
No Matches
JsonToNix.h
Go to the documentation of this file.
1/// \file
2/// \brief Code action for converting JSON to Nix expressions.
3///
4/// Provides a selection-based code action that converts valid JSON text
5/// to equivalent Nix expression syntax.
6
7#pragma once
8
10
11#include <llvm/ADT/StringRef.h>
12
13#include <string>
14#include <vector>
15
16namespace nixd {
17
18/// \brief Add JSON to Nix conversion action for selected JSON text.
19///
20/// This is a selection-based action that works on arbitrary text, not AST
21/// nodes. It parses the selected text as JSON and converts it to Nix syntax.
22void addJsonToNixAction(llvm::StringRef Src, const lspserver::Range &Range,
23 const std::string &FileURI,
24 std::vector<lspserver::CodeAction> &Actions);
25
26} // namespace nixd
void addJsonToNixAction(llvm::StringRef Src, const lspserver::Range &Range, const std::string &FileURI, std::vector< lspserver::CodeAction > &Actions)
Add JSON to Nix conversion action for selected JSON text.
Definition JsonToNix.cpp:97