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§
Macros§
Structs§
- Apply
Workspace Edit Params - Apply
Workspace Edit Response - Cancel
Params - Change
Annotation Support - Client
Capabilities - Where ClientCapabilities are currently empty:
- Client
Info - Code
Action - Code
Action Capability - Code
Action Context - Contains additional diagnostic information about the context in which a code action is run.
- Code
Action Kind - Code
Action Kind Literal Support - Code
Action Literal Support - Code
Action Options - Code
Action Params - Params for the CodeActionRequest
- Code
Lens - 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.
- Code
Lens Options - Code Lens options.
- Code
Lens Params - Color
- Color
Information - Color
Presentation - Color
Presentation Params - Color
Provider Options - 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.
- Completion
Capability - Completion
Context - Completion
Item - Completion
Item Capability - Completion
Item Kind Capability - Completion
List - Represents a collection of completion items to be presented in the editor.
- Completion
Options - Completion options.
- Completion
Params - Completion
Registration Options - Configuration
Item - Configuration
Params - Create
File - Create file operation
- Create
File Options - Options to create a file.
- Declaration
Options - Declaration
Registration Options - Definition
Options - Delete
File - Delete file operation
- Delete
File Options - 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.
- Diagnostic
Related Information - 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.
- DidChange
Configuration Params - DidChange
Text Document Params - DidChange
Watched Files Params - DidChange
Watched Files Registration Options - Describe options to be used when registered for text document change events.
- DidChange
Workspace Folders Params - DidClose
Text Document Params - DidOpen
Text Document Params - DidSave
Text Document Params - Document
Color Params - Document
Filter - 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:
- Document
Formatting Options - Document
Formatting Params - Document
Highlight - 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.
- Document
Highlight Options - Document
Highlight Params - Document
Link - 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.
- Document
Link Capabilities - Document
Link Options - Document
Link Params - Document
OnType Formatting Options - Format document on type options
- Document
OnType Formatting Params - Document
OnType Formatting Registration Options - Extends TextDocumentRegistrationOptions
- Document
Range Formatting Options - Document
Range Formatting Params - Document
Symbol - 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.
- Document
Symbol Client Capabilities - Document
Symbol Options - Document
Symbol Params - Execute
Command Options - Execute command options.
- Execute
Command Params - Execute
Command Registration Options - Execute command registration options.
- File
Event - An event describing a file change.
- File
System Watcher - Folding
Provider Options - Folding
Range - Represents a folding range.
- Folding
Range Capability - Folding
Range Params - Formatting
Options - Value-object describing what options formatting should use.
- Generic
Capability - Generic
Options - Generic
Params - Generic
Registration Options - Goto
Capability - Goto
Definition Params - Hover
- The result of a hover request.
- Hover
Capability - Hover
Options - Hover options.
- Hover
Params - Hover
Registration Options - Initialize
Error - Initialize
Params - Initialize
Result - Initialized
Params - Language
String - Location
- Represents a location inside a resource, such as a line inside a text file.
- Location
Link - Represents a link between a source and a target location.
- LogMessage
Params - Markup
Content - A
MarkupContentliteral represents a string value which content can be represented in different formats. Currentlyplaintextandmarkdownare supported formats. AMarkupContentis usually used in documentation properties of result literals likeCompletionItemorSignatureInformation. If the format ismarkdownthe content should follow the GitHub Flavored Markdown Specification. - Message
Action Item - Optional
Versioned Text Document Identifier - An identifier which optionally denotes a specific version of a text document. This information usually flows from the server to the client
- Parameter
Information - Represents a parameter of a callable-signature. A parameter can have a label and a doc-comment.
- Parameter
Information Settings - Partial
Result Params - 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.
- Progress
Params - The progress notification is sent from the server to the client to ask the client to indicate progress.
- Publish
Diagnostics Client Capabilities - Publish
Diagnostics Params - 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.
- Reference
Context - Reference
Params - References
Options - Registration
- General parameters to to register for a capability.
- Registration
Params - Rename
Capability - Rename
File - Rename file operation
- Rename
File Options - Rename file options
- Rename
Options - Rename
Params - Save
Options - Save options.
- Server
Capabilities - Server
Info - Show
Message Params - Show
Message Request Params - Signature
Help - Signature help represents the signature of something callable. There can be multiple signature but only one active and only one active parameter.
- Signature
Help Capability - Signature
Help Context - Signature
Help Options - Signature help options.
- Signature
Help Params - Signature
Help Registration Options - Signature help options.
- Signature
Information - Represents the signature of something callable. A signature can have a label, like a function-name, a doc-comment, and a set of parameters.
- Signature
Information Settings - Static
Registration Options - Static
Text Document Color Provider Options - Static
Text Document Registration Options - Symbol
Information - Represents information about programming constructs like variables, classes, interfaces etc.
- Symbol
Kind Capability - Specific capabilities for the
SymbolKindin theworkspace/symbolrequest. - Synchronization
Capability - TagSupport
- Text
Document Change Registration Options - Descibe options to be used when registered for text document change events.
- Text
Document Client Capabilities - Text document specific client capabilities.
- Text
Document Content Change Event - 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.
- Text
Document Edit - Describes textual changes on a single text document. The text document is referred to as a
OptionalVersionedTextDocumentIdentifierto allow clients to check the text document version before an edit is applied. ATextDocumentEditdescribes all changes on a version Si and after they are applied move the document to version Si+1. So the creator of aTextDocumentEditdoesn’t need to sort the array or do any kind of ordering. However the edits must be non overlapping. - Text
Document Identifier - Text documents are identified using a URI. On the protocol level, URIs are passed as strings.
- Text
Document Item - An item to transfer a text document from the client to the server.
- Text
Document Position Params - A parameter literal used in requests to pass a text document and a position inside that document.
- Text
Document Registration Options - Since most of the registration options require to specify a document selector there is a base interface that can be used.
- Text
Document Save Registration Options - Text
Document Sync Options - Text
Edit - A textual edit applicable to a text document.
- Unregistration
- General parameters to unregister a capability.
- Unregistration
Params - Url
- A parsed URL record.
- Versioned
Text Document Identifier - An identifier to denote a specific version of a text document. This information usually flows from the client to the server.
- Watch
Kind - Will
Save Text Document Params - The parameters send in a will save text document notification.
- Window
Client Capabilities - Window specific client capabilities.
- Work
Done Progress Begin - Work
Done Progress Cancel Params - The
window/workDoneProgress/cancelnotification is sent from the client to the server to cancel a progress initiated on the server side using thewindow/workDoneProgress/create. - Work
Done Progress Create Params - The
window/workDoneProgress/createrequest is sent from the server to the clientto ask the client to create a work done progress. - Work
Done Progress End - Work
Done Progress Options - Work
Done Progress Params - An optional token that a server can use to report work done progress
- Work
Done Progress Report - Workspace
Capability - Workspace
Client Capabilities - Workspace specific client capabilities.
- Workspace
Edit - A workspace edit represents changes to many resources managed in the workspace.
- Workspace
Edit Capability - Workspace
Folder - Workspace
Folder Capability - Workspace
Folders Change Event - The workspace folder change event.
- Workspace
Symbol Client Capabilities - Workspace
Symbol Options - Workspace
Symbol Params - The parameters of a Workspace Symbol Request.
Enums§
- Code
Action OrCommand - Code
Action Provider Capability - Color
Provider Capability - Completion
Item Kind - The kind of a completion entry.
- Completion
Item Tag - Completion
Response - Completion
Text Edit - Completion
Trigger Kind - How a completion was triggered.
- Declaration
Capability - Diagnostic
Severity - The protocol currently supports the following diagnostic severities:
- Diagnostic
Tag - The diagnostic tags.
- Document
Change Operation - Document
Changes - Document
Highlight Kind - A document highlight kind.
- Document
Symbol Response - Documentation
- Failure
Handling Kind - File
Change Type - The file event type.
- Folding
Range Kind - Enum of known range kinds
- Folding
Range Provider Capability - Formatting
Property - Goto
Definition Response - GotoDefinition response can be single location, or multiple Locations or a link.
- Hover
Contents - Hover contents could be single entry or multiple entries.
- Hover
Provider Capability - Implementation
Provider Capability - Insert
Text Format - Defines how to interpret the insert text in a completion item
- Marked
String - The marked string is rendered:
- Markup
Kind - Describes the content type that a client supports in various
result literals like
Hover,ParameterInfoorCompletionItem. - Message
Type - Number
OrString - OneOf
- Parameter
Label - Prepare
Rename Response - Prepare
Support Default Behavior - Progress
Params Value - Resource
Op - Resource
Operation Kind - Signature
Help Trigger Kind - Signature help options.
- Symbol
Kind - A symbol kind.
- Text
Document Save Reason - Represents reasons why a text document is saved.
- Text
Document Sync Capability - Text
Document Sync Kind - Defines how the host (editor) should sync document changes to the language server.
- Text
Document Sync Save Options - Trace
Option - Type
Definition Provider Capability - Work
Done Progress - Workspace
Folder Capability Change Notifications
Type Aliases§
- Code
Action Response - response for CodeActionRequest
- Document
Selector - A document selector is the combination of one or many document filters.
- Progress
Token