nixd
Loading...
Searching...
No Matches
Utils.cpp File Reference

Implementation of shared utilities for code actions. More...

#include "Utils.h"
#include <set>

Go to the source code of this file.

Namespaces

namespace  nixd

Functions

lspserver::CodeAction nixd::createSingleEditAction (const std::string &Title, llvm::StringLiteral Kind, const std::string &FileURI, const lspserver::Range &EditRange, std::string NewText)
 Create a CodeAction with a single text edit.
bool nixd::isValidNixIdentifier (const std::string &S)
 Check if a string is a valid Nix identifier that can be unquoted.
std::string nixd::escapeNixString (llvm::StringRef S)
 Escape special characters for Nix double-quoted string literals.
std::string nixd::quoteNixAttrKey (const std::string &Key)
 Quote and escape a Nix attribute key if necessary.

Detailed Description

Implementation of shared utilities for code actions.

Definition in file Utils.cpp.