Skip to content

Support readonly Location/LocationLink and showDocument #1152

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions _specifications/specification-3-16.md
Original file line number Diff line number Diff line change
Expand Up @@ -433,10 +433,16 @@ interface Range {
#### <a href="#location" name="location" class="anchor"> Location </a>

Represents a location inside a resource, such as a line inside a text file.
The server may optionally hint to the client that a location should be considered readonly.
```typescript
interface Location {
uri: DocumentUri;
range: Range;

/**
* @since 3.16.0 - proposed state
*/
readonly?: boolean;
}
```

Expand Down Expand Up @@ -474,6 +480,14 @@ interface LocationLink {
* `targetRange`. See also `DocumentSymbol#range`
*/
targetSelectionRange: Range;

/**
* Specifies that the target document should be considered readonly by the
* editor.
*
* @since 3.16.0 - proposed state
*/
targetReadonly?: boolean;
}
```

Expand Down Expand Up @@ -2017,6 +2031,13 @@ interface ClientCapabilities {
* @since 3.16.0 - proposed state
*/
markdown?: MarkdownClientCapabilities;

/**
* Client supports documents in a readonly mode.
*
* @since 3.16.0 - proposed state
*/
readonlySupport?: boolean
}

/**
Expand Down Expand Up @@ -2534,6 +2555,14 @@ export interface ShowDocumentParams {
* file.
*/
selection?: Range;

/**
* An optional property to indicate whether the editor
* showing the text document should be readonly.
* Clients might ignore this property if they do not support
* a readonly mode.
*/
readonly?: boolean;
}
```

Expand Down