Documentation ¶
Index ¶
- type ApplyWorkspaceEditParams
- type ApplyWorkspaceRenameEditParams
- type BuiltinPosition
- type Client
- type ClientCapabilities
- type CodeAction
- type CodeActionContext
- type CodeActionOptions
- type CodeActionParams
- type CodeDescription
- type CodeLens
- type CodeLensOptions
- type CodeLensParams
- type Command
- type CompletionContext
- type CompletionItem
- type CompletionItemLabelDetails
- type CompletionItemOptions
- type CompletionItemRegalMetadata
- type CompletionList
- type CompletionOptions
- type CompletionParams
- type DefinitionParams
- type DeleteFile
- type DeleteFileOptions
- type Diagnostic
- type DiagnosticClientCapabilities
- type DiagnosticCode
- type DiagnosticOptions
- type DiagnosticWorkspaceClientCapabilities
- type DocumentFormattingParams
- type DocumentSymbol
- type DocumentSymbolParams
- type ExecuteCommandOptions
- type ExecuteCommandParams
- type FileDiagnostics
- type FileEvent
- type FileOperationFilter
- type FileOperationPattern
- type FileOperationRegistrationOptions
- type FileOperationsServerCapabilities
- type FoldingRange
- type FoldingRangeParams
- type FormattingOptions
- type GeneralClientCapabilities
- type InitializationOptions
- type InitializeParams
- type InitializeResult
- type InlayHint
- type InlayHintOptions
- type KeywordLocation
- type Location
- type MarkupContent
- type OptionalVersionedTextDocumentIdentifier
- type Position
- type Range
- type Ref
- type RefKind
- type RenameFile
- type RenameFileOptions
- type ServerCapabilities
- type ShowMessageParams
- type StaleRequestSupportClientCapabilities
- type TextDocumentClientCapabilities
- type TextDocumentContentChangeEvent
- type TextDocumentDidChangeParams
- type TextDocumentDidCloseParams
- type TextDocumentDidOpenParams
- type TextDocumentDidSaveParams
- type TextDocumentEdit
- type TextDocumentHoverParams
- type TextDocumentIdentifier
- type TextDocumentInlayHintParams
- type TextDocumentItem
- type TextDocumentSaveOptions
- type TextDocumentSyncOptions
- type TextEdit
- type WindowClientCapabilities
- type WorkspaceClientCapabilities
- type WorkspaceDiagnosticReport
- type WorkspaceDidChangeWatchedFilesParams
- type WorkspaceDidCreateFilesParams
- type WorkspaceDidCreateFilesParamsCreatedFile
- type WorkspaceDidDeleteFilesParams
- type WorkspaceDidDeleteFilesParamsDeletedFile
- type WorkspaceDidRenameFilesParams
- type WorkspaceDidRenameFilesParamsFileRename
- type WorkspaceEdit
- type WorkspaceFolder
- type WorkspaceFullDocumentDiagnosticReport
- type WorkspaceOptions
- type WorkspaceRenameEdit
- type WorkspaceSymbol
- type WorkspaceSymbolParams
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ApplyWorkspaceEditParams ¶
type ApplyWorkspaceEditParams struct { Label string `json:"label"` Edit WorkspaceEdit `json:"edit"` }
type ApplyWorkspaceRenameEditParams ¶ added in v0.26.0
type ApplyWorkspaceRenameEditParams struct { Label string `json:"label"` Edit WorkspaceRenameEdit `json:"edit"` }
type BuiltinPosition ¶ added in v0.22.0
type ClientCapabilities ¶
type ClientCapabilities struct { General GeneralClientCapabilities `json:"general"` Text TextDocumentClientCapabilities `json:"textDocument"` Workspace WorkspaceClientCapabilities `json:"workspace"` Window WindowClientCapabilities `json:"window"` }
type CodeAction ¶
type CodeAction struct { Command Command `json:"command"` IsPreferred *bool `json:"isPreferred,omitempty"` Title string `json:"title"` Kind string `json:"kind"` Diagnostics []Diagnostic `json:"diagnostics,omitempty"` }
type CodeActionContext ¶
type CodeActionContext struct {
Diagnostics []Diagnostic `json:"diagnostics"`
}
type CodeActionOptions ¶
type CodeActionOptions struct {
CodeActionKinds []string `json:"codeActionKinds"`
}
type CodeActionParams ¶
type CodeActionParams struct { TextDocument TextDocumentIdentifier `json:"textDocument"` Context CodeActionContext `json:"context"` Range Range `json:"range"` }
type CodeDescription ¶
type CodeDescription struct {
Href string `json:"href"`
}
type CodeLensOptions ¶ added in v0.25.0
type CodeLensOptions struct {
ResolveProvider *bool `json:"resolveProvider,omitempty"`
}
type CodeLensParams ¶ added in v0.25.0
type CodeLensParams struct {
TextDocument TextDocumentIdentifier `json:"textDocument"`
}
type CompletionContext ¶ added in v0.22.0
type CompletionContext struct { TriggerCharacter string `json:"triggerCharacter"` TriggerKind completion.TriggerKind `json:"triggerKind"` }
type CompletionItem ¶ added in v0.22.0
type CompletionItem struct { LabelDetails *CompletionItemLabelDetails `json:"labelDetails,omitempty"` Documentation *MarkupContent `json:"documentation,omitempty"` TextEdit *TextEdit `json:"textEdit,omitempty"` InserTextFormat *uint `json:"insertTextFormat,omitempty"` // Regal is used to store regal-specific metadata about the completion item. // This is not part of the LSP spec, but used in the manager to post process // items before returning them to the client. Regal *CompletionItemRegalMetadata `json:"_regal,omitempty"` Label string `json:"label"` Detail string `json:"detail"` // https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItemKind Kind completion.ItemKind `json:"kind"` Preselect bool `json:"preselect"` // Mandatory is used to indicate that the completion item is mandatory and should be offered // as an exclusive completion. This is not part of the LSP spec, but used in regal providers // to indicate that the completion item is the only valid completion. Mandatory bool `json:"-"` }
type CompletionItemLabelDetails ¶ added in v0.22.0
type CompletionItemOptions ¶ added in v0.22.0
type CompletionItemOptions struct {
LabelDetailsSupport bool `json:"labelDetailsSupport"`
}
type CompletionItemRegalMetadata ¶ added in v0.24.0
type CompletionItemRegalMetadata struct {
Provider string `json:"provider"`
}
type CompletionList ¶ added in v0.22.0
type CompletionList struct { Items []CompletionItem `json:"items"` IsIncomplete bool `json:"isIncomplete"` }
type CompletionOptions ¶ added in v0.22.0
type CompletionOptions struct { CompletionItem CompletionItemOptions `json:"completionItem"` ResolveProvider bool `json:"resolveProvider"` }
type CompletionParams ¶ added in v0.22.0
type CompletionParams struct { TextDocument TextDocumentIdentifier `json:"textDocument"` Context CompletionContext `json:"context"` Position Position `json:"position"` }
type DefinitionParams ¶
type DefinitionParams struct { TextDocument TextDocumentIdentifier `json:"textDocument"` Position Position `json:"position"` }
type DeleteFile ¶ added in v0.26.2
type DeleteFile struct { Options *DeleteFileOptions `json:"options,omitempty"` Kind string `json:"kind"` // must always be "delete" URI string `json:"uri"` }
type DeleteFileOptions ¶ added in v0.26.2
type Diagnostic ¶
type DiagnosticCode ¶
type DiagnosticOptions ¶
type DiagnosticWorkspaceClientCapabilities ¶
type DiagnosticWorkspaceClientCapabilities struct {
RefreshSupport bool `json:"refreshSupport"`
}
type DocumentFormattingParams ¶
type DocumentFormattingParams struct { TextDocument TextDocumentIdentifier `json:"textDocument"` Options FormattingOptions `json:"options"` }
type DocumentSymbol ¶
type DocumentSymbol struct { Detail *string `json:"detail,omitempty"` Children *[]DocumentSymbol `json:"children,omitempty"` Name string `json:"name"` Range Range `json:"range"` SelectionRange Range `json:"selectionRange"` Kind symbols.SymbolKind `json:"kind"` }
type DocumentSymbolParams ¶
type DocumentSymbolParams struct {
TextDocument TextDocumentIdentifier `json:"textDocument"`
}
type ExecuteCommandOptions ¶
type ExecuteCommandOptions struct {
Commands []string `json:"commands"`
}
type ExecuteCommandParams ¶
type FileDiagnostics ¶
type FileDiagnostics struct { URI string `json:"uri"` Items []Diagnostic `json:"diagnostics"` }
type FileOperationFilter ¶
type FileOperationFilter struct { Scheme string `json:"scheme"` Pattern FileOperationPattern `json:"pattern"` }
type FileOperationPattern ¶
type FileOperationPattern struct {
Glob string `json:"glob"`
}
type FileOperationRegistrationOptions ¶
type FileOperationRegistrationOptions struct {
Filters []FileOperationFilter `json:"filters"`
}
type FileOperationsServerCapabilities ¶
type FileOperationsServerCapabilities struct { DidCreate FileOperationRegistrationOptions `json:"didCreate"` DidRename FileOperationRegistrationOptions `json:"didRename"` DidDelete FileOperationRegistrationOptions `json:"didDelete"` }
type FoldingRange ¶
type FoldingRangeParams ¶
type FoldingRangeParams struct {
TextDocument TextDocumentIdentifier `json:"textDocument"`
}
type FormattingOptions ¶
type GeneralClientCapabilities ¶
type GeneralClientCapabilities struct {
StaleRequestSupport StaleRequestSupportClientCapabilities `json:"staleRequestSupport"`
}
type InitializationOptions ¶ added in v0.25.0
type InitializationOptions struct { // Formatter specifies the formatter to use. Options: 'opa fmt' (default), // 'opa fmt --rego-v1' or 'regal fix'. Formatter *string `json:"formatter,omitempty"` // EnableDebugCodelens, if set, will enable debug codelens // when clients request code lenses for a file. EnableDebugCodelens *bool `json:"enableDebugCodelens,omitempty"` // EvalCodelensDisplayInline, if set, will show evaluation results natively // in the calling editor, rather than in an output file. EvalCodelensDisplayInline *bool `json:"evalCodelensDisplayInline,omitempty"` }
type InitializeParams ¶
type InitializeParams struct { InitializationOptions *InitializationOptions `json:"initializationOptions,omitempty"` ClientInfo Client `json:"clientInfo"` Locale string `json:"locale"` RootPath string `json:"rootPath"` RootURI string `json:"rootUri"` Trace string `json:"trace"` WorkspaceFolders []WorkspaceFolder `json:"workspaceFolders"` Capabilities ClientCapabilities `json:"capabilities"` ProcessID int `json:"processId"` }
type InitializeResult ¶
type InitializeResult struct {
Capabilities ServerCapabilities `json:"capabilities"`
}
type InlayHintOptions ¶
type InlayHintOptions struct {
ResolveProvider bool `json:"resolveProvider"`
}
type KeywordLocation ¶ added in v0.24.0
type MarkupContent ¶
type Ref ¶ added in v0.23.0
type Ref struct { // Label is a identifier for the object. e.g. data.package.rule. Label string `json:"label"` // Detail is a small amount of additional information about the object. Detail string `json:"detail"` // Description is a longer description of the object and uses Markdown formatting. Description string `json:"description"` Kind RefKind `json:"kind"` }
Ref is a generic construct for an object found in a Rego module. Ref is designed to be used in completions and provides information relevant to the object with that operation in mind.
type RefKind ¶ added in v0.23.0
type RefKind int
RefKind represents the kind of object that a Ref represents. This is intended to toggle functionality and which UI symbols to use.
type RenameFile ¶ added in v0.26.0
type RenameFile struct { Options *RenameFileOptions `json:"options,omitempty"` AnnotationIdentifier *string `json:"annotationId,omitempty"` Kind string `json:"kind"` // must always be "rename" OldURI string `json:"oldUri"` NewURI string `json:"newUri"` }
type RenameFileOptions ¶ added in v0.26.0
type ServerCapabilities ¶
type ServerCapabilities struct { CodeLensProvider *CodeLensOptions `json:"codeLensProvider,omitempty"` Workspace WorkspaceOptions `json:"workspace"` DiagnosticProvider DiagnosticOptions `json:"diagnosticProvider"` CodeActionProvider CodeActionOptions `json:"codeActionProvider"` ExecuteCommandProvider ExecuteCommandOptions `json:"executeCommandProvider"` TextDocumentSyncOptions TextDocumentSyncOptions `json:"textDocumentSync"` CompletionProvider CompletionOptions `json:"completionProvider"` InlayHintProvider InlayHintOptions `json:"inlayHintProvider"` HoverProvider bool `json:"hoverProvider"` DocumentFormattingProvider bool `json:"documentFormattingProvider"` FoldingRangeProvider bool `json:"foldingRangeProvider"` DocumentSymbolProvider bool `json:"documentSymbolProvider"` WorkspaceSymbolProvider bool `json:"workspaceSymbolProvider"` DefinitionProvider bool `json:"definitionProvider"` }
type ShowMessageParams ¶ added in v0.22.0
type TextDocumentClientCapabilities ¶
type TextDocumentClientCapabilities struct {
Diagnostic DiagnosticClientCapabilities `json:"diagnostic"`
}
type TextDocumentContentChangeEvent ¶
type TextDocumentContentChangeEvent struct {
Text string `json:"text"`
}
type TextDocumentDidChangeParams ¶
type TextDocumentDidChangeParams struct { TextDocument TextDocumentIdentifier `json:"textDocument"` ContentChanges []TextDocumentContentChangeEvent `json:"contentChanges"` }
type TextDocumentDidCloseParams ¶ added in v0.24.0
type TextDocumentDidCloseParams struct {
TextDocument TextDocumentItem `json:"textDocument"`
}
type TextDocumentDidOpenParams ¶
type TextDocumentDidOpenParams struct {
TextDocument TextDocumentItem `json:"textDocument"`
}
type TextDocumentDidSaveParams ¶ added in v0.22.0
type TextDocumentDidSaveParams struct { Text *string `json:"text,omitempty"` TextDocument TextDocumentIdentifier `json:"textDocument"` }
type TextDocumentEdit ¶
type TextDocumentEdit struct { // TextDocument is the document to change. Not that this could be versioned, // (OptionalVersionedTextDocumentIdentifier) but we currently don't use that. TextDocument OptionalVersionedTextDocumentIdentifier `json:"textDocument"` Edits []TextEdit `json:"edits"` }
type TextDocumentHoverParams ¶
type TextDocumentHoverParams struct { TextDocument TextDocumentIdentifier `json:"textDocument"` Position Position `json:"position"` }
type TextDocumentIdentifier ¶
type TextDocumentIdentifier struct {
URI string `json:"uri"`
}
type TextDocumentInlayHintParams ¶
type TextDocumentInlayHintParams struct { TextDocument TextDocumentIdentifier `json:"textDocument"` Range Range `json:"range"` }
type TextDocumentItem ¶
type TextDocumentSaveOptions ¶ added in v0.22.0
type TextDocumentSaveOptions struct {
IncludeText bool `json:"includeText"`
}
type TextDocumentSyncOptions ¶
type TextDocumentSyncOptions struct { Change uint `json:"change"` OpenClose bool `json:"openClose"` Save TextDocumentSaveOptions `json:"save"` }
type WindowClientCapabilities ¶
type WindowClientCapabilities struct {
WorkDoneProgress bool `json:"workDoneProgress"`
}
type WorkspaceClientCapabilities ¶
type WorkspaceClientCapabilities struct {
Diagnostics DiagnosticWorkspaceClientCapabilities `json:"diagnostics"`
}
type WorkspaceDiagnosticReport ¶
type WorkspaceDiagnosticReport struct {
Items []WorkspaceFullDocumentDiagnosticReport `json:"items"`
}
type WorkspaceDidChangeWatchedFilesParams ¶
type WorkspaceDidChangeWatchedFilesParams struct {
Changes []FileEvent `json:"changes"`
}
type WorkspaceDidCreateFilesParams ¶
type WorkspaceDidCreateFilesParams struct {
Files []WorkspaceDidCreateFilesParamsCreatedFile `json:"files"`
}
type WorkspaceDidCreateFilesParamsCreatedFile ¶
type WorkspaceDidCreateFilesParamsCreatedFile struct {
URI string `json:"uri"`
}
type WorkspaceDidDeleteFilesParams ¶
type WorkspaceDidDeleteFilesParams struct {
Files []WorkspaceDidDeleteFilesParamsDeletedFile `json:"files"`
}
type WorkspaceDidDeleteFilesParamsDeletedFile ¶
type WorkspaceDidDeleteFilesParamsDeletedFile struct {
URI string `json:"uri"`
}
type WorkspaceDidRenameFilesParams ¶
type WorkspaceDidRenameFilesParams struct {
Files []WorkspaceDidRenameFilesParamsFileRename `json:"files"`
}
type WorkspaceEdit ¶
type WorkspaceEdit struct {
DocumentChanges []TextDocumentEdit `json:"documentChanges"`
}
type WorkspaceFolder ¶
type WorkspaceFullDocumentDiagnosticReport ¶
type WorkspaceFullDocumentDiagnosticReport struct { URI string `json:"uri"` Version *uint `json:"version"` Kind string `json:"kind"` // full, or incremental. We always use full Items []Diagnostic `json:"items"` }
type WorkspaceOptions ¶
type WorkspaceOptions struct {
FileOperations FileOperationsServerCapabilities `json:"fileOperations"`
}
type WorkspaceRenameEdit ¶ added in v0.26.0
type WorkspaceRenameEdit struct {
DocumentChanges []RenameFile `json:"documentChanges"`
}
WorkspaceRenameEdit is a WorkspaceEdit that is used for renaming files. Perhaps we should use generics and a union type here instead.
type WorkspaceSymbol ¶
type WorkspaceSymbol struct { ContainerName *string `json:"containerName,omitempty"` Name string `json:"name"` Location Location `json:"location"` Kind symbols.SymbolKind `json:"kind"` }
type WorkspaceSymbolParams ¶
type WorkspaceSymbolParams struct {
Query string `json:"query"`
}
Click to show internal directories.
Click to hide internal directories.