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

Tab indentation #418

Open
MrAlias opened this issue Oct 18, 2024 · 5 comments
Open

Tab indentation #418

MrAlias opened this issue Oct 18, 2024 · 5 comments
Labels
enhancement New feature or request

Comments

@MrAlias
Copy link

MrAlias commented Oct 18, 2024

How can I have weaver render my comments with tab indentation?

Currently it will only output with spaces as far as I can tell.

Am I missing something?

@lquerel
Copy link
Contributor

lquerel commented Oct 18, 2024

You should be able to add one or several tab indentations in the weaver config for the header, prefix, footer.

@MrAlias
Copy link
Author

MrAlias commented Oct 18, 2024

Would that mean that all comments are at a static indentation level then?

@MrAlias
Copy link
Author

MrAlias commented Oct 18, 2024

I guess I could have multiple comment format configurations (i.e. go_1tab, go_2tab, go_3tab). That just seems a bit egregious.

@MrAlias
Copy link
Author

MrAlias commented Oct 18, 2024

I guess I could have multiple comment format configurations (i.e. go_1tab, go_2tab, go_3tab). That just seems a bit egregious.

I've given this a try and the rendered file still expands tabs into spaces. Is there a way to preserve tabs?

@jsuereth jsuereth added the enhancement New feature or request label Nov 25, 2024
@jsuereth
Copy link
Contributor

@MrAlias Can you give us some example input + output?

I think I understand where tabs will NOT be generated.

here's some questions I have:

  • Do you need tabs to be evaluated as an configurable number of space for "80 character" line length limit, or should I hardcode tab as taking up 4 characters for that purpose?
  • Do you want tabs to interact with list-indentation in anyway? Today, e.g. go doc requires one space in front of numbered lists and two in front on unordered lists. Should tabs participate in these decisions, or are they only on the "left hand side" of a prefix?
  • Do you want tab to somehow interact with the comment(indent=1) syntax?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

3 participants