nixd
Loading...
Searching...
No Matches
Public Attributes | List of all members
lspserver::Diagnostic Struct Reference

#include <Protocol.h>

Collaboration diagram for lspserver::Diagnostic:
[legend]

Public Attributes

Range range
 The range at which the message applies.
 
int severity = 0
 
std::string code
 The diagnostic's code. Can be omitted.
 
std::optional< CodeDescriptioncodeDescription
 An optional property to describe the error code.
 
std::string source
 
std::string message
 The diagnostic's message.
 
llvm::SmallVector< DiagnosticTag, 1 > tags
 Additional metadata about the diagnostic.
 
std::optional< std::vector< DiagnosticRelatedInformation > > relatedInformation
 
std::optional< std::string > category
 
std::optional< std::vector< CodeAction > > codeActions
 
llvm::json::Object data
 

Detailed Description

Definition at line 891 of file lspserver/include/lspserver/Protocol.h.

Member Data Documentation

◆ category

std::optional<std::string> lspserver::Diagnostic::category

The diagnostic's category. Can be omitted. An LSP extension that's used to send the name of the category over to the client. The category typically describes the compilation stage during which the issue was produced, e.g. "Semantic Issue" or "Parse Issue".

Definition at line 923 of file lspserver/include/lspserver/Protocol.h.

Referenced by lspserver::fromJSON(), and lspserver::toJSON().

◆ code

std::string lspserver::Diagnostic::code

The diagnostic's code. Can be omitted.

Definition at line 900 of file lspserver/include/lspserver/Protocol.h.

Referenced by lspserver::fromJSON(), and lspserver::toJSON().

◆ codeActions

std::optional<std::vector<CodeAction> > lspserver::Diagnostic::codeActions

Clangd extension: code actions related to this diagnostic. Only with capability textDocument.publishDiagnostics.codeActionsInline. (These actions can also be obtained using textDocument/codeAction).

Definition at line 928 of file lspserver/include/lspserver/Protocol.h.

Referenced by lspserver::toJSON().

◆ codeDescription

std::optional<CodeDescription> lspserver::Diagnostic::codeDescription

An optional property to describe the error code.

Definition at line 903 of file lspserver/include/lspserver/Protocol.h.

Referenced by lspserver::toJSON().

◆ data

llvm::json::Object lspserver::Diagnostic::data

A data entry field that is preserved between a textDocument/publishDiagnostics notification and textDocument/codeAction request. Mutating users should associate their data with a unique key they can use to retrieve later on.

Definition at line 935 of file lspserver/include/lspserver/Protocol.h.

Referenced by lspserver::fromJSON(), and lspserver::toJSON().

◆ message

std::string lspserver::Diagnostic::message

◆ range

Range lspserver::Diagnostic::range

◆ relatedInformation

std::optional<std::vector<DiagnosticRelatedInformation> > lspserver::Diagnostic::relatedInformation

An array of related diagnostic information, e.g. when symbol-names within a scope collide all definitions can be marked via this property.

Definition at line 917 of file lspserver/include/lspserver/Protocol.h.

Referenced by lspserver::toJSON().

◆ severity

int lspserver::Diagnostic::severity = 0

The diagnostic's severity. Can be omitted. If omitted it is up to the client to interpret diagnostics as error, warning, info or hint.

Definition at line 897 of file lspserver/include/lspserver/Protocol.h.

Referenced by lspserver::fromJSON(), lspserver::operator<<(), and lspserver::toJSON().

◆ source

std::string lspserver::Diagnostic::source

A human-readable string describing the source of this diagnostic, e.g. 'typescript' or 'super lint'.

Definition at line 907 of file lspserver/include/lspserver/Protocol.h.

Referenced by lspserver::fromJSON(), and lspserver::toJSON().

◆ tags

llvm::SmallVector<DiagnosticTag, 1> lspserver::Diagnostic::tags

Additional metadata about the diagnostic.

Definition at line 913 of file lspserver/include/lspserver/Protocol.h.

Referenced by lspserver::toJSON().


The documentation for this struct was generated from the following file: