Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markdown chapters are missing in 'Goto Symbol in Workspace' #46406

Closed
fbehrens opened this issue Mar 23, 2018 · 4 comments
Closed

Markdown chapters are missing in 'Goto Symbol in Workspace' #46406

fbehrens opened this issue Mar 23, 2018 · 4 comments
Assignees
Labels
feature-request Request for new features or functionality markdown Markdown support issues on-testplan
Milestone

Comments

@fbehrens
Copy link

In Code 1.12.1 I created a single-root workspace with two .js and one .md file.

When I Goto Symbol in File it shows me the headings from my markdown.

But in Got Symbol in workspace i only see the javascript functions.

@vscodebot vscodebot bot added the markdown Markdown support issues label Mar 23, 2018
@mjbvz mjbvz added help wanted Issues identified as good community contribution opportunities feature-request Request for new features or functionality labels Mar 23, 2018
@pradeepmurugesan
Copy link
Contributor

@mjbvz Hello.. Need some clarification

This is because the extension markdown-language-features lacks the workspace symbol provider similar to workspace provider for typescript

Am i right or am going in a wrong direction ?

@mjbvz
Copy link
Contributor

mjbvz commented Apr 6, 2018

Yes, the WorkspaceSymbolProvider is what powers this feature. The high level flow of what provideWorkspaceSymbols should do for markdown:

  1. Find all markdown files in the current workspace
  2. For each file, use markdown's TableOfContentsProvider to extract out the basic heading info for each document
  3. Convert the heading info into SymbolInformation

We'll have to see how poorly this performs in a large workspace. We may need cache the table of contents for each file so that we don't have to reparse the files each time

Let me know if you run into any problems looking into this or have any questions

@pradeepmurugesan
Copy link
Contributor

Hi @mjbvz ,

I tried to implement the above and its partially working. The only problem i face is I am using

workspace.textDocuments

which just fetches the opened docs in the current worksapce. Is there a way to fetch all the text documents ?

@mjbvz mjbvz removed the help wanted Issues identified as good community contribution opportunities label Apr 13, 2018
@mjbvz mjbvz added this to the April 2018 milestone Apr 13, 2018
@mjbvz mjbvz added the verification-needed Verification of issue is requested label Apr 13, 2018
mjbvz pushed a commit that referenced this issue Apr 13, 2018
* added the workspace symbol provider for markdown 46406

* fixed the review comments 46406
@mjbvz
Copy link
Contributor

mjbvz commented Apr 13, 2018

Fixed by #47610

@mjbvz mjbvz closed this as completed Apr 13, 2018
@mjbvz mjbvz added on-testplan and removed verification-needed Verification of issue is requested labels Apr 23, 2018
@vscodebot vscodebot bot locked and limited conversation to collaborators May 28, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
feature-request Request for new features or functionality markdown Markdown support issues on-testplan
Projects
None yet
Development

No branches or pull requests

3 participants