MCPcopy Create free account
hub / github.com/arctic-cli/interface / documentSymbol

Function documentSymbol

packages/arctic/src/lsp/index.ts:336–348  ·  view source on GitHub ↗
(uri: string)

Source from the content-addressed store, hash-verified

334 }
335
336 export async function documentSymbol(uri: string) {
337 return run((client) =>
338 client.connection
339 .sendRequest("textDocument/documentSymbol", {
340 textDocument: {
341 uri,
342 },
343 })
344 .catch(() => []),
345 )
346 .then((result) => result.flat() as (LSP.DocumentSymbol | LSP.Symbol)[])
347 .then((result) => result.filter(Boolean))
348 }
349
350 async function run<T>(input: (client: LSPClient.Info) => Promise<T>): Promise<T[]> {
351 const clients = await state().then((x) => x.clients)

Callers

nothing calls this directly

Calls 1

runFunction · 0.70

Tested by

no test coverage detected