File tree Expand file tree Collapse file tree 1 file changed +17
-0
lines changed
lsp-test/src/Language/LSP Expand file tree Collapse file tree 1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -137,6 +137,10 @@ module Language.LSP.Test (
137
137
-- ** SemanticTokens
138
138
getSemanticTokens ,
139
139
140
+ -- ** Workspace Symbols
141
+ getWorkspaceSymbols ,
142
+ resolveWorkspaceSymbols ,
143
+
140
144
-- ** Capabilities
141
145
getRegisteredCapabilities ,
142
146
) where
@@ -1036,6 +1040,19 @@ getSemanticTokens doc = do
1036
1040
rsp <- request SMethod_TextDocumentSemanticTokensFull params
1037
1041
pure $ getResponseResult rsp
1038
1042
1043
+ {- | Query the workspace and filter by the given 'T.Text'.
1044
+ If empty, this queries the entire workspace.
1045
+ -}
1046
+ getWorkspaceSymbols :: T. Text -> Session ([SymbolInformation ] |? ([WorkspaceSymbol ] |? Null ))
1047
+ getWorkspaceSymbols query = do
1048
+ rsp <- request SMethod_WorkspaceSymbol (WorkspaceSymbolParams Nothing Nothing query)
1049
+ pure $ getResponseResult rsp
1050
+
1051
+ resolveWorkspaceSymbols :: WorkspaceSymbol -> Session WorkspaceSymbol
1052
+ resolveWorkspaceSymbols item = do
1053
+ rsp <- request SMethod_WorkspaceSymbolResolve item
1054
+ pure $ getResponseResult rsp
1055
+
1039
1056
{- | Returns a list of capabilities that the server has requested to /dynamically/
1040
1057
register during the 'Session'.
1041
1058
You can’t perform that action at this time.
0 commit comments