oleg-shilo / codemap.vscode

Code map (syntax tree) of the active document
MIT License
84 stars 28 forks source link

Feature request: hide the indent from script #15

Closed MagTun closed 5 years ago

MagTun commented 5 years ago

That would be great if there was a settings that would allow the user who create a custom mapper to choose if he/she wants the code map to reflect the indent in the file.

Ex: In a script that is indented (ex python, json...), I would like a "title" that has 1 or more indents to be set as level 1 in my code map and thus to not have any indent.

In this image, title 2,3,4 (which are indented in my code) should be at the same level as Title 1 image

Another was of doing it is to let the user have full control over the "prefix" (which is somewhat linked to my request #13 )

(Sorry for opening all those issues/features request at once)

oleg-shilo commented 5 years ago

This would be a good candidate for a custom mapper. You can control the indent by using the "codemap.textModeLevelPrefix": "   ", characters. As in #13.

Though in this case having a dedicated mapper might be even a more flexible choice.

MagTun commented 5 years ago

Yes, you're right. Sorry, I didn't pay attention to the dedicated mapper in the wiki, but this did the trick. As you recommended I use the special char and now I have full control over the indent (cf #13 to get the characters). What a great extension and even more precious, a great support, thanks a lot!