Crate tamasfe_lsp_types

Crate tamasfe_lsp_types 

Source
Expand description

Language Server Protocol types for Rust.

Based on: https://microsoft.github.io/language-server-protocol/specification

This library uses the URL crate for parsing URIs. Note that there is some confusion on the meaning of URLs vs URIs: http://stackoverflow.com/a/28865728/393898. According to that information, on the classical sense of “URLs”, “URLs” are a subset of URIs, But on the modern/new meaning of URLs, they are the same as URIs. The important take-away aspect is that the URL crate should be able to parse any URI, such as urn:isbn:0451450523.

Re-exports§

pub use selection_range::*;

Modules§

notification
request
selection_range

Macros§

lsp_notification
lsp_request

Structs§

ApplyWorkspaceEditParams
ApplyWorkspaceEditResponse
CancelParams
ChangeAnnotationSupport
ClientCapabilities
Where ClientCapabilities are currently empty:
ClientInfo
CodeAction
CodeActionCapability
CodeActionContext
Contains additional diagnostic information about the context in which a code action is run.
CodeActionKind
CodeActionKindLiteralSupport
CodeActionLiteralSupport
CodeActionOptions
CodeActionParams
Params for the CodeActionRequest
CodeLens
A code lens represents a command that should be shown along with source text, like the number of references, a way to run tests, etc.
CodeLensOptions
Code Lens options.
CodeLensParams
Color
ColorInformation
ColorPresentation
ColorPresentationParams
ColorProviderOptions
Command
Represents a reference to a command. Provides a title which will be used to represent a command in the UI. Commands are identitifed using a string identifier and the protocol currently doesn’t specify a set of well known commands. So executing a command requires some tool extension code.
CompletionCapability
CompletionContext
CompletionItem
CompletionItemCapability
CompletionItemKindCapability
CompletionList
Represents a collection of completion items to be presented in the editor.
CompletionOptions
Completion options.
CompletionParams
CompletionRegistrationOptions
ConfigurationItem
ConfigurationParams
CreateFile
Create file operation
CreateFileOptions
Options to create a file.
DeclarationOptions
DeclarationRegistrationOptions
DefinitionOptions
DeleteFile
Delete file operation
DeleteFileOptions
Delete file options
Diagnostic
Represents a diagnostic, such as a compiler error or warning. Diagnostic objects are only valid in the scope of a resource.
DiagnosticRelatedInformation
Represents a related message and source code location for a diagnostic. This should be used to point to code locations that cause or related to a diagnostics, e.g when duplicating a symbol in a scope.
DidChangeConfigurationParams
DidChangeTextDocumentParams
DidChangeWatchedFilesParams
DidChangeWatchedFilesRegistrationOptions
Describe options to be used when registered for text document change events.
DidChangeWorkspaceFoldersParams
DidCloseTextDocumentParams
DidOpenTextDocumentParams
DidSaveTextDocumentParams
DocumentColorParams
DocumentFilter
A document filter denotes a document through properties like language, schema or pattern. Examples are a filter that applies to TypeScript files on disk or a filter the applies to JSON files with name package.json:
DocumentFormattingOptions
DocumentFormattingParams
DocumentHighlight
A document highlight is a range inside a text document which deserves special attention. Usually a document highlight is visualized by changing the background color of its range.
DocumentHighlightOptions
DocumentHighlightParams
DocumentLink
A document link is a range in a text document that links to an internal or external resource, like another text document or a web site.
DocumentLinkCapabilities
DocumentLinkOptions
DocumentLinkParams
DocumentOnTypeFormattingOptions
Format document on type options
DocumentOnTypeFormattingParams
DocumentOnTypeFormattingRegistrationOptions
Extends TextDocumentRegistrationOptions
DocumentRangeFormattingOptions
DocumentRangeFormattingParams
DocumentSymbol
Represents programming constructs like variables, classes, interfaces etc. that appear in a document. Document symbols can be hierarchical and they have two ranges: one that encloses its definition and one that points to its most interesting range, e.g. the range of an identifier.
DocumentSymbolClientCapabilities
DocumentSymbolOptions
DocumentSymbolParams
ExecuteCommandOptions
Execute command options.
ExecuteCommandParams
ExecuteCommandRegistrationOptions
Execute command registration options.
FileEvent
An event describing a file change.
FileSystemWatcher
FoldingProviderOptions
FoldingRange
Represents a folding range.
FoldingRangeCapability
FoldingRangeParams
FormattingOptions
Value-object describing what options formatting should use.
GenericCapability
GenericOptions
GenericParams
GenericRegistrationOptions
GotoCapability
GotoDefinitionParams
Hover
The result of a hover request.
HoverCapability
HoverOptions
Hover options.
HoverParams
HoverRegistrationOptions
InitializeError
InitializeParams
InitializeResult
InitializedParams
LanguageString
Location
Represents a location inside a resource, such as a line inside a text file.
LocationLink
Represents a link between a source and a target location.
LogMessageParams
MarkupContent
A MarkupContent literal represents a string value which content can be represented in different formats. Currently plaintext and markdown are supported formats. A MarkupContent is usually used in documentation properties of result literals like CompletionItem or SignatureInformation. If the format is markdown the content should follow the GitHub Flavored Markdown Specification.
MessageActionItem
OptionalVersionedTextDocumentIdentifier
An identifier which optionally denotes a specific version of a text document. This information usually flows from the server to the client
ParameterInformation
Represents a parameter of a callable-signature. A parameter can have a label and a doc-comment.
ParameterInformationSettings
PartialResultParams
A parameter literal used to pass a partial result token.
Position
Position in a text document expressed as zero-based line and character offset. A position is between two characters like an ‘insert’ cursor in a editor.
ProgressParams
The progress notification is sent from the server to the client to ask the client to indicate progress.
PublishDiagnosticsClientCapabilities
PublishDiagnosticsParams
Range
A range in a text document expressed as (zero-based) start and end positions. A range is comparable to a selection in an editor. Therefore the end position is exclusive.
ReferenceContext
ReferenceParams
ReferencesOptions
Registration
General parameters to to register for a capability.
RegistrationParams
RenameCapability
RenameFile
Rename file operation
RenameFileOptions
Rename file options
RenameOptions
RenameParams
SaveOptions
Save options.
ServerCapabilities
ServerInfo
ShowMessageParams
ShowMessageRequestParams
SignatureHelp
Signature help represents the signature of something callable. There can be multiple signature but only one active and only one active parameter.
SignatureHelpCapability
SignatureHelpContext
SignatureHelpOptions
Signature help options.
SignatureHelpParams
SignatureHelpRegistrationOptions
Signature help options.
SignatureInformation
Represents the signature of something callable. A signature can have a label, like a function-name, a doc-comment, and a set of parameters.
SignatureInformationSettings
StaticRegistrationOptions
StaticTextDocumentColorProviderOptions
StaticTextDocumentRegistrationOptions
SymbolInformation
Represents information about programming constructs like variables, classes, interfaces etc.
SymbolKindCapability
Specific capabilities for the SymbolKind in the workspace/symbol request.
SynchronizationCapability
TagSupport
TextDocumentChangeRegistrationOptions
Descibe options to be used when registered for text document change events.
TextDocumentClientCapabilities
Text document specific client capabilities.
TextDocumentContentChangeEvent
An event describing a change to a text document. If range and rangeLength are omitted the new text is considered to be the full content of the document.
TextDocumentEdit
Describes textual changes on a single text document. The text document is referred to as a OptionalVersionedTextDocumentIdentifier to allow clients to check the text document version before an edit is applied. A TextDocumentEdit describes all changes on a version Si and after they are applied move the document to version Si+1. So the creator of a TextDocumentEdit doesn’t need to sort the array or do any kind of ordering. However the edits must be non overlapping.
TextDocumentIdentifier
Text documents are identified using a URI. On the protocol level, URIs are passed as strings.
TextDocumentItem
An item to transfer a text document from the client to the server.
TextDocumentPositionParams
A parameter literal used in requests to pass a text document and a position inside that document.
TextDocumentRegistrationOptions
Since most of the registration options require to specify a document selector there is a base interface that can be used.
TextDocumentSaveRegistrationOptions
TextDocumentSyncOptions
TextEdit
A textual edit applicable to a text document.
Unregistration
General parameters to unregister a capability.
UnregistrationParams
Url
A parsed URL record.
VersionedTextDocumentIdentifier
An identifier to denote a specific version of a text document. This information usually flows from the client to the server.
WatchKind
WillSaveTextDocumentParams
The parameters send in a will save text document notification.
WindowClientCapabilities
Window specific client capabilities.
WorkDoneProgressBegin
WorkDoneProgressCancelParams
The window/workDoneProgress/cancel notification is sent from the client to the server to cancel a progress initiated on the server side using the window/workDoneProgress/create.
WorkDoneProgressCreateParams
The window/workDoneProgress/create request is sent from the server to the clientto ask the client to create a work done progress.
WorkDoneProgressEnd
WorkDoneProgressOptions
WorkDoneProgressParams
An optional token that a server can use to report work done progress
WorkDoneProgressReport
WorkspaceCapability
WorkspaceClientCapabilities
Workspace specific client capabilities.
WorkspaceEdit
A workspace edit represents changes to many resources managed in the workspace.
WorkspaceEditCapability
WorkspaceFolder
WorkspaceFolderCapability
WorkspaceFoldersChangeEvent
The workspace folder change event.
WorkspaceSymbolClientCapabilities
WorkspaceSymbolOptions
WorkspaceSymbolParams
The parameters of a Workspace Symbol Request.

Enums§

CodeActionOrCommand
CodeActionProviderCapability
ColorProviderCapability
CompletionItemKind
The kind of a completion entry.
CompletionItemTag
CompletionResponse
CompletionTextEdit
CompletionTriggerKind
How a completion was triggered.
DeclarationCapability
DiagnosticSeverity
The protocol currently supports the following diagnostic severities:
DiagnosticTag
The diagnostic tags.
DocumentChangeOperation
DocumentChanges
DocumentHighlightKind
A document highlight kind.
DocumentSymbolResponse
Documentation
FailureHandlingKind
FileChangeType
The file event type.
FoldingRangeKind
Enum of known range kinds
FoldingRangeProviderCapability
FormattingProperty
GotoDefinitionResponse
GotoDefinition response can be single location, or multiple Locations or a link.
HoverContents
Hover contents could be single entry or multiple entries.
HoverProviderCapability
ImplementationProviderCapability
InsertTextFormat
Defines how to interpret the insert text in a completion item
MarkedString
The marked string is rendered:
MarkupKind
Describes the content type that a client supports in various result literals like Hover, ParameterInfo or CompletionItem.
MessageType
NumberOrString
OneOf
ParameterLabel
PrepareRenameResponse
PrepareSupportDefaultBehavior
ProgressParamsValue
ResourceOp
ResourceOperationKind
SignatureHelpTriggerKind
Signature help options.
SymbolKind
A symbol kind.
TextDocumentSaveReason
Represents reasons why a text document is saved.
TextDocumentSyncCapability
TextDocumentSyncKind
Defines how the host (editor) should sync document changes to the language server.
TextDocumentSyncSaveOptions
TraceOption
TypeDefinitionProviderCapability
WorkDoneProgress
WorkspaceFolderCapabilityChangeNotifications

Type Aliases§

CodeActionResponse
response for CodeActionRequest
DocumentSelector
A document selector is the combination of one or many document filters.
ProgressToken