alefragnani / vscode-separators

Separators Extension for Visual Studio Code
GNU General Public License v3.0
40 stars 6 forks source link

[FEATURE] - Add extra spacing between line and separator #4

Open alefragnani opened 3 years ago

alefragnani commented 3 years ago

Based on Marketplace review

Awesome response to a github issue raised. A suggested improvement would be to add an extra couple of pixels distance between the separator and the top line of the functions its separating...

burcaka commented 3 years ago

Modifying the settings

"separators.classes.borderWidth": 22 "separators.classes.borderColor": "#EEEEEE"

provides me with the below look, which I find to be a good alternative for the issue.

image

Alexey-Sch commented 3 years ago

Hello. Is it possible to make the separators appear as in the screenshot?

image

alefragnani commented 3 years ago

Hi @Alexey-Sch ,

About the above the comment feature, it has already been requested in #8, and as describe there, the extension uses VS Code/extensions engine to detect the Symbols, but comments aren't Symbols supported by VS Code. So, it would require parsing for each programming language. The user itself closed the issue, but if you think its a high value feature, feel free to upvote there, and I could reopen.

About the centered separators, unless you always have at least one empty line above the Symbol, you would end up with another issue. I mean, the content of the line above would be striked out.

In fact, even the extra spacing requested here, depending on font size and zoom could mess up with the contents of the line above the Symbol, but being a Setting, each user would fine tune the best value.

Hope this helps

TheCarpetMerchant commented 1 year ago

Suggestion : Use the above line to place the separator if it is empty. And place it in the middle. Assuming VSCode permits this, you could get the line number of the function, and check if the line above it is empty or not. If the line is a comment (again, don't know if it's possible to get that info), check above that line again and again until you land on a line that isn't a comment. If it's not empty, go back to putting the separator just above the function or nowhere at all (according to user settings).

Here's how it looks in RAD Studio (quite possibly the only good thing about this IDE lol) : IMG_20230523_134220_455.jpg

IMG_20230523_134224_077.jpg

alefragnani commented 1 year ago

Hi @TheCarpetMerchant ,

Thanks for your suggestion, using the previous empty line is a clever approach, but I wonder how stable it would be, as it requires empty line between symbols. It would work for me, personally, as I tend to organize the source this way, but I'm not sure it would work for every symbol/language. I mean, inline/callback function in JS for instance.

Let's see what other users think about it. Maybe it could be an option/setting for this.

Thank you

alefragnani commented 1 year ago

@TheCarpetMerchant the separator above comment behavior, on the other hand, is being tracked in #21. These are different features..

TheCarpetMerchant commented 1 year ago

Hi @TheCarpetMerchant ,

Thanks for your suggestion, using the previous empty line is a clever approach, but I wonder how stable it would be, as it requires empty line between symbols. It would work for me, personally, as I tend to organize the source this way, but I'm not sure it would work for every symbol/language. I mean, inline/callback function in JS for instance.

Let's see what other users think about it. Maybe it could be an option/setting for this.

Thank you

Oh yeah, it should be an option that defaults to false, I think. It should also default to the separator as it is now if it cannot find an empty line as this will probably be the case for inline functions. Although a setting to not show any separator in such a case would be nice (ie what's on my second screenshot).