diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2021-05-18 20:20:51 +0100 |
---|---|---|
committer | GitHub <[email protected]> | 2021-05-18 20:20:51 +0100 |
commit | 49a5d6a8d4a5da296ead4c44ac43090b9b0e8034 (patch) | |
tree | ca54a00fe5e9a447ab100ad36905004f0629f655 /docs/dev | |
parent | 16b03d21dcbac48133fa9be1051c78211e83bbe8 (diff) | |
parent | 1f7d2a6c2297de4dedfb42b739e880ad2dd7d5d5 (diff) |
Merge #7698
7698: Add new LSP extension for workspace symbol lookup r=matklad a=alcroito
As well as all symbol types (functions, modules).
Remove outdated documentation regarding symbol lookup filtering.
Closes #4881
Co-authored-by: alcroito <[email protected]>
Diffstat (limited to 'docs/dev')
-rw-r--r-- | docs/dev/lsp-extensions.md | 32 |
1 files changed, 31 insertions, 1 deletions
diff --git a/docs/dev/lsp-extensions.md b/docs/dev/lsp-extensions.md index 8fcd72d5d..2d3787d0f 100644 --- a/docs/dev/lsp-extensions.md +++ b/docs/dev/lsp-extensions.md | |||
@@ -1,5 +1,5 @@ | |||
1 | <!--- | 1 | <!--- |
2 | lsp_ext.rs hash: 6e57fc1b345b00e9 | 2 | lsp_ext.rs hash: 10a8988e6893e6b2 |
3 | 3 | ||
4 | If you need to change the above hash to make the test pass, please check if you | 4 | If you need to change the above hash to make the test pass, please check if you |
5 | need to adjust this doc as well and ping this issue: | 5 | need to adjust this doc as well and ping this issue: |
@@ -650,3 +650,33 @@ export const enum Direction { | |||
650 | Down = "Down" | 650 | Down = "Down" |
651 | } | 651 | } |
652 | ``` | 652 | ``` |
653 | |||
654 | ## Lookup workspace symbol search scope and kind | ||
655 | |||
656 | **Issue:** https://github.com/rust-analyzer/rust-analyzer/pull/7698 | ||
657 | |||
658 | This request is sent from client to server to search for workspace symbols filtered by an | ||
659 | optional search scope and / or an optional symbol kind. | ||
660 | |||
661 | **Method:** `workspace/symbol` | ||
662 | |||
663 | **Request:** `WorkspaceSymbolParams` | ||
664 | |||
665 | **Response:** `SymbolInformation[] | null` | ||
666 | |||
667 | ```typescript | ||
668 | interface lsp_ext.WorkspaceSymbolParams extends WorkspaceSymbolParams { | ||
669 | searchScope?: WorkspaceSymbolSearchScope; | ||
670 | searchKind?: WorkspaceSymbolSearchKind; | ||
671 | } | ||
672 | |||
673 | const enum WorkspaceSymbolSearchScope { | ||
674 | Workspace = "Workspace", | ||
675 | WorkspaceAndDependencies = "WorkspaceAndDependencies" | ||
676 | } | ||
677 | |||
678 | const enum WorkspaceSymbolSearchKind { | ||
679 | OnlyTypes = "OnlyTypes", | ||
680 | AllSymbols = "AllSymbols" | ||
681 | } | ||
682 | ``` | ||