Skip to content

Commit

Permalink
Add TextDocumentFilterClientCapabilities (#2041)
Browse files Browse the repository at this point in the history
  • Loading branch information
dbaeumer authored Oct 15, 2024
1 parent d266b5b commit 188c2aa
Show file tree
Hide file tree
Showing 3 changed files with 31 additions and 18 deletions.
30 changes: 25 additions & 5 deletions _specifications/lsp/3.18/general/initialize.md
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,18 @@ Where `ClientCapabilities` and `TextDocumentClientCapabilities` are defined as f
*/
export interface TextDocumentClientCapabilities {

/**
* Defines which synchronization capabilities the client supports.
*/
synchronization?: TextDocumentSyncClientCapabilities;

/**
* Defines which filters the client supports.
*
* @since 3.18.0
*/
filters?: TextDocumentFilterClientCapabilities;

/**
* Capabilities specific to the `textDocument/completion` request.
*/
Expand Down Expand Up @@ -292,11 +302,21 @@ export interface TextDocumentClientCapabilities {

/**
* Capabilities specific to the `textDocument/inlineCompletion` request.
*
*
* @since 3.18.0
*/
inlineCompletion?: InlineCompletionClientCapabilities;
}

export interface TextDocumentFilterClientCapabilities {

/**
* The client supports Relative Patterns.
*
* @since 3.18.0
*/
relativePatternSupport?: boolean;
}
```

##### NotebookDocumentClientCapabilities
Expand Down Expand Up @@ -880,26 +900,26 @@ interface ServerCapabilities {

/**
* The server provides inline completions.
*
*
* @since 3.18.0
*/
inlineCompletionProvider?: boolean | InlineCompletionOptions;

/**
* Text document specific server capabilities.
*
*
* @since 3.18.0
*/
textDocument?: {
/**
* Capabilities specific to the diagnostic pull model.
*
*
* @since 3.18.0
*/
diagnostic?: {
/**
* Whether the server supports `MarkupContent` in diagnostic messages.
*
*
* @since 3.18.0
* @proposed
*/
Expand Down
17 changes: 5 additions & 12 deletions _specifications/lsp/3.18/types/documentFilter.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,19 +19,12 @@ export interface DocumentFilter {
scheme?: string;

/**
* A glob pattern, like `*.{ts,js}`.
* A pattern, like `*.{ts,js}` or a pattern relative to a workspace folders.
*
* Glob patterns can have the following syntax:
* - `*` to match one or more characters in a path segment
* - `?` to match on one character in a path segment
* - `**` to match any number of path segments, including none
* - `{}` to group sub patterns into an OR expression. (e.g. `**​/*.{ts,js}`
* matches all TypeScript and JavaScript files)
* - `[]` to declare a range of characters to match in a path segment
* (e.g., `example.[0-9]` to match on `example.0`, `example.1`, …)
* - `[!...]` to negate a range of characters to match in a path segment
* (e.g., `example.[!0-9]` to match on `example.a`, `example.b`, but
* not `example.0`)
* See GlobPattern.
*
* Whether clients support relative patterns depends on the client
* capability `textDocuments.filters.relativePatternSupport`.
*/
pattern?: GlobPattern;
}
Expand Down
2 changes: 1 addition & 1 deletion _specifications/lsp/3.18/types/patterns.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Pattern definitions used in file watchers and document filters.

```typescript
/**
* The glob pattern to watch relative to the base path. Glob patterns can have
* The pattern to watch relative to the base path. Glob patterns can have
* the following syntax:
* - `*` to match one or more characters in a path segment
* - `?` to match on one character in a path segment
Expand Down

0 comments on commit 188c2aa

Please sign in to comment.