Search Unity

  1. We would like to hear your feedback about Unity and our products. Click here for more information.
    Dismiss Notice

Visual Studio external documentation highlighter?

Discussion in 'General Discussion' started by kit64486, Apr 4, 2019.

  1. kit64486

    kit64486

    Joined:
    Mar 16, 2019
    Posts:
    12
    Right now I add
    <summary>
    to nearly every variable just to make sure its documented enough, but it's actually cluttering everything in sight.

    But instead of having a nice:
    Code (CSharp):
    1. private int some;
    2. private string something;
    3. private bool onemore;
    4. private Vector3 rushmore;
    I have this:
    Code (CSharp):
    1. /// <summary> OKOASDKOKASD </summary>
    2. private int some;
    3.  
    4. /// <summary> OKOASDKOKASD </summary>
    5. private string something;
    6.  
    7. /// <summary> OKOASDKOKASD </summary>
    8. private bool onemore;
    9.  
    10. /// <summary> OKOASDKOKASD </summary>
    11. private Vector3 rushmore;
    12.  
    And yes, for very many of those variables, those explanations are crucial.
    I am not looking for a documentation renderer that would turn all my code and parse it into HTML/CSS file.
    But if someone opens my project I would like to add comments and clarifications for methods, variables and classes (the way
    <summary>
    does). I need to be able to fill my files with solid readable documentation (of ever-changing application) without cluttering my view. 20 variables in a row look way nicer, than 50 rows (20 lines of code, 20 lines of
    <summary>
    and a space between each not to lose my mind and keep it readable).

    Note: I have barely any experience with functionality of Visual Studio itself, so please spare hate if there's a simple switch.

    P.S.: Heck, maybe you know a fantastic documentation plugin that you would say totally smashes the one of Visual Studio, that'd be great to hear too.
     
    Last edited: Apr 4, 2019
  2. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,766
    You can make your own extension to customize the code view or find a ready one that works th way you like the most
     
  3. APSchmidt

    APSchmidt

    Joined:
    Aug 8, 2016
    Posts:
    1,994
    Could you elaborate on that, please? Thank you.
     
  4. kit64486

    kit64486

    Joined:
    Mar 16, 2019
    Posts:
    12
    Making extension is like making server apps, sounds easy, until you get sweaty.

    I tried Googling for documentations but all of them were relating to ready HTML/CSS documentations, and I want this one to be as I'm developing as I command it to render in Editor (or in an external window). Obviously Google didn't bring me any real results, and even though I installed those ready docs renderers, I still didn't know how to run them as I got some errors, which I won't even bother fixing as these apps don't fulfill my needs.
     
  5. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,766
    https://docs.microsoft.com/en-us/vi...develop-visual-studio-extensions?view=vs-2019
    I don't know what were you searching for but literally the first result is an extension to hide comments and for C#

    upload_2019-4-4_18-27-0.png
     
  6. kit64486

    kit64486

    Joined:
    Mar 16, 2019
    Posts:
    12
  7. Ostwind

    Ostwind

    Joined:
    Mar 22, 2011
    Posts:
    2,766
    Not at all what you asked? based on your original post it's very close to what you wanted and that was just the first result. Anyways like I said you can make exactly the like you want via custom code and github and net is flooded with code examples. Good luck.
     
  8. kit64486

    kit64486

    Joined:
    Mar 16, 2019
    Posts:
    12
    Well, not quite. It doesn't get rid of the space between each line (the text is replaced with a bubble). The comment and the space still take their space. All this extension did was replace comment with an icon, but factually my code didn't become smaller out of it. So I still end up with a two line gap.