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