nixd
Loading...
Searching...
No Matches
nixd
lib
Controller
CodeActions
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
9
#include <
lspserver/Protocol.h
>
10
11
#include <llvm/ADT/StringRef.h>
12
13
#include <string>
14
#include <vector>
15
16
namespace
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.
22
void
addJsonToNixAction
(llvm::StringRef Src,
const
lspserver::Range
&
Range
,
23
const
std::string &FileURI,
24
std::vector<lspserver::CodeAction> &Actions);
25
26
}
// namespace nixd
Protocol.h
nixd
Definition
CommandLine/Configuration.h:9
nixd::addJsonToNixAction
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
lspserver::Range
Definition
lspserver/include/lspserver/Protocol.h:157
Generated by
1.15.0