Skip to content

Commit

Permalink
Merge branch 'redhat-developer:main' into issue_670
Browse files Browse the repository at this point in the history
  • Loading branch information
SCWells72 authored Dec 10, 2024
2 parents 6b72fa0 + 42c0b46 commit de4ef90
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion docs/LSPSupport.md
Original file line number Diff line number Diff line change
Expand Up @@ -366,10 +366,22 @@ the `lang.foldingBuilder` extension point. By default, LSP4IJ registers the `lan

If you use another language, you will have to declare `lang.foldingBuilder` with your language.

Here is an example with the [Go Language Server](./user-defined-ls/gopls.md) showing folding:
Here is an example with the [TypeScript Language Server](./user-defined-ls/typescript-language-server.md) showing folding:

![textDocument/foldingRange](./images/lsp-support/textDocument_foldingRange.gif)

Additionally LSP4IJ registers the an implementation of the `codeBlockProvider` extension point with
[LSPCodeBlockProvider](https://github.com/redhat-developer/lsp4ij/blob/main/src/main/java/com/redhat/devtools/lsp4ij/features/foldingRange/LSPCodeBlockProvider.java) for `TEXT` and `textmate` languages to provide block brace matching and easy navigation to
the beginning/end of the containing block.

As with `lang.foldingBuilder`, if you use another language, you will have to declare `codeBlockProvider` with your language.

Below is an example with the [TypeScript Language Server](./user-defined-ls/typescript-language-server.md) showing code
block functionality. The IDE's Presentation Assistant shows the default keyboard shortcuts for each supported operating
system to trigger these actions.

![codeBlockProvider](./images/lsp-support/codeBlockProvider.gif)

### Publish Diagnostics

[textDocument/publishDiagnostics](https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#textDocument_publishDiagnostics) is implemented with an `externalAnnotator` extension point. As this extension point supports `any` language, it works out-of-the-box.
Expand Down
Binary file added docs/images/lsp-support/codeBlockProvider.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/images/lsp-support/textDocument_foldingRange.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit de4ef90

Please sign in to comment.