(ctx context.Context, params *lsproto.WorkspaceSymbolParams, reqMsg *lsproto.RequestMessage)
| 1617 | } |
| 1618 | |
| 1619 | func (s *Server) handleWorkspaceSymbol(ctx context.Context, params *lsproto.WorkspaceSymbolParams, reqMsg *lsproto.RequestMessage) (lsproto.WorkspaceSymbolResponse, error) { |
| 1620 | var resp lsproto.WorkspaceSymbolResponse |
| 1621 | var lsErr error |
| 1622 | s.session.WithSnapshotLoadingProjectTree(ctx, nil, func(snapshot *project.Snapshot) { |
| 1623 | defer s.recover(reqMsg) |
| 1624 | programs := core.Map(snapshot.ProjectCollection.Projects(), (*project.Project).GetProgram) |
| 1625 | resp, lsErr = ls.ProvideWorkspaceSymbols( |
| 1626 | ctx, |
| 1627 | programs, |
| 1628 | snapshot.Converters(), |
| 1629 | snapshot.UserPreferences(), |
| 1630 | params.Query, |
| 1631 | ) |
| 1632 | }) |
| 1633 | return resp, lsErr |
| 1634 | } |
| 1635 | |
| 1636 | func (s *Server) handleDocumentSymbol(ctx context.Context, ls *ls.LanguageService, params *lsproto.DocumentSymbolParams) (lsproto.DocumentSymbolResponse, error) { |
| 1637 | return ls.ProvideDocumentSymbols(ctx, params.TextDocument.Uri) |
nothing calls this directly
no test coverage detected