-
Notifications
You must be signed in to change notification settings - Fork 28.7k
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
Outline view + Markdown: Do not display the "#"s #53992
Comments
It would be better to use different icons (not only "[abc]") to show different header levels. |
Maybe the icons could be reserved for a feature which separated different markdown components (links, tables, code blocks, etc...) but having the '#' definitely seems unnecessary. |
I support this feature request: Displaying markdown hashes in the outline view is not only redundant (the tree structure already holds this information), but also distracts from the actual content (the section title). |
we need a custom outline view just for markdown files |
It seems like this was done totally on purpose. Since i cannot estimate the side effects besides the display in the outline i won't file a merge request. But i think we could just remove vscode/extensions/markdown-language-features/src/features/documentSymbolProvider.ts Lines 55 to 74 in 28bf0b1
and then |
I changed the getSymbolName function in resources\app\extensions\markdown-language-features\dist\extension.js to remove '#' char as a workaround. getSymbolName(e){return" ".repeat(e.level)+e.text} |
This is what I've been using for a while. I extended pisces312's idea with the following.
getSymbolName(e){ var symbol = { "1": "⬜", "2": "🟥", "3": "🟧", "4": "🟨", "5": "🟩", "6": "🟦", "7": "🟪", "8": "🟫", }; if (1 <= e.level && e.level <= 8) { return symbol[e.level] + " " + e.text; } return "#".repeat(e.level) + " " + e.text; } Prettier version: getSymbolName(e){
var symbol = {
"1": "⬜",
"2": "🟥",
"3": "🟧",
"4": "🟨",
"5": "🟩",
"6": "🟦",
"7": "🟪",
"8": "🟫",
};
if (1 <= e.level && e.level <= 8) {
return symbol[e.level] + " " + e.text;
}
return "#".repeat(e.level) + " " + e.text;
} |
@pisces312 answer should at least be implemented as a config option. Here's a visual comparison showing how much more "clutter" the unnecessary |
Just ran across this - I wholeheartedly agree that this should be at least a setting; the hash chars don't add anything the indentation doesn't already address. |
|
After some file content search, I found now we need to modify |
I just got the same issue and found you have figured out the solution. :) |
Would also be nice if we could hide syntax like **bold**. It's just more noise if not actively styling text |
Have we solved this problem?It's been many years。。。 |
Related question on Stack Overflow: |
From v1.76.0 file is: |
I agree that the hash chars add unnecessary clutter to the outline view. It would be awesome to have a setting for this |
This is especially frustrating as a Portable Mode user. Having to go in and manually make this change every time I upgrade VSCode is a chore. |
May 2024 and this is still an issue with VSCode 1.89.0. Seems the function has again changed names. It's no longer
and replacing it with:
still applies the fix. |
I'm using 1.92.1 on macOS. What would be the path and file that is equivalent to I've found this path:
Which contains a Do I need to do something else (beyond restarting VSCode) to get the change to register? Or am I editing the wrong file? |
Coincidentally, I just today updated and just now came here to post that the file had again changed location to: However I didn't encounter the same trouble you are reporting. I was able to do a find and replace, finding the same string as previous:
and replacing it with:
Saving and re-opening VSCode applied the fix for me as expected. However, I'm on Windows, maybe that makes a difference somehow? I'm quite befuddled as to why they have not fixed this obvious bug yet. |
The Outline view for Markdown already displays headers and sub-headers in a structured way; there is no need to pollute the view with "#"s to show the header levels.
The text was updated successfully, but these errors were encountered: