goto
goto copied to clipboard
Parse headings in markdown as symbols
I thought it would be handy to offer the headings in a markdown file as headings. It’s certainly useful when using the “File Symbol” command.
On the other hand, that means headers in markdown files in your project will get lumped in with code symbols when using the “Project Symbol” command.
Thoughts? I’ve implemented it locally and could publish it on a branch or make a PR if you wanted to give it a try.
It will clog up , the goto symbol for project . But i want to see if we can do Grouped List: Example :
C Symbols
- list of symbols from c sources
Python Symbols
- list of symbols from python sources
MarkDown Symbols
- List of symbols from markdown
What do you think ?
That makes a lot of sense to me. It’s always seemed strange in the Project Symbol list to have, say, Python functions from a couple different files with CSS selectors listed in between.
Another way to help with this problem could be to have a command called something like “Goto: Project Symbols For Current Grammar”, and then restrict the list to symbols from files with matching grammar to the active TextEditor. I noticed today, testing the command with a larger project, that it took around 60 seconds to build the project symbols index. The project I had open is a theme, stuffed with css, js, scss, tpls, php, etc., and it would’ve been several times faster to index just a particular file type. Still would take too long, though.
Yeah that makes sense!.
Another way to help with this problem could be to have a command called something like “Goto: Project Symbols For Current Grammar”, and then restrict the list to symbols from files with matching grammar to the active TextEditor.
That would be quite easier to implement that first .