29 | Let's get you documenting your code! First up, get a Python or
30 | JavaScript file ready in your editor. Then, click on a function you want
31 | to document!
32 |
33 |
34 | Now, just press
35 | Alt + D or
36 | ⌘ + D
37 | on a Mac.
38 |
39 |
40 | Next, let's configure Autodoc to automatically update your docstrings!
41 | Find the
42 |
43 | trelent.autodoc.mode
44 |
45 | setting in your VS Code configuration, and change it to
46 |
47 | "Maintain Docstrings"
48 |
49 | . Now, whenever we detect a substantial code change, we'll automatically
50 | update your docstrings for you!
51 |
52 |
53 | To find this page again, you may run the
54 | Trelent: Help
55 | command from the Command Palette.
56 |
57 |
58 | We also roughly estimate how much of your code is documented! Just check
59 | out the status bar at the bottom of the editor once you open a supported
60 | file type!
61 |
62 |
70 | Autodoc simplifies code documentation by automatically keeping 71 | docstrings updated, or highlighting the function they belong to when 72 | they become outdated. This helps you easily maintain clear, accurate 73 | documentation. The Autodoc feature has three modes: Highlight 74 | Per-Function, Highlight Globally, and Maintain Docstrings. 75 |
76 | 77 |81 | This mode highlights functions marked with the "@trelent-highlight" tag 82 | that have outdated docstrings. Functions marked with the "@trelent-auto" 83 | tag will have their docstrings automatically updated. 84 |
85 | 86 |88 | This mode highlights all functions with outdated docstrings, except 89 | those with the "@trelent-ignore" tag. Functions marked with the 90 | "@trelent-auto" tag will have their docstrings automatically updated. 91 |
92 | 93 |95 | This mode automatically updates all outdated docstrings, except those 96 | with the "@trelent-ignore" or "@trelent-highlight" tags. 97 |
98 | 99 |100 | You can configure the Autodoc mode and other settings in the VSCode 101 | extension settings. 102 |
103 | 104 |106 | Here are some examples of how to use the Autodoc tags. Note the tags in 107 | green on the same line as the function definition. 108 |
109 |141 | We're continuously working on improving Trelent and adding more 142 | features. Keep an eye on our updates and release notes to stay informed 143 | about the latest enhancements and changes. 144 |
145 |146 | If you have any suggestions or feedback, don't hesitate to reach out to 147 | us. We appreciate your support and are eager to make Trelent the best 148 | documentation tool for developers! 149 |
150 |
184 | Join our{" "}
185 |
186 | Discord community
187 | {" "}
188 | to help shape the future of Trelent!
189 |
190 |
191 | Version:
192 |
193 | {packageData.version}
194 |
195 |