ctran / annotate_models

Annotate Rails classes with schema and routes info
Other
4.39k stars 596 forks source link

Support to collapse or fold annotate comments in VSCode #1027

Open mediafinger opened 1 month ago

mediafinger commented 1 month ago

My colleague likes the annotations, I've read they help AI tools, but I'm happy with opening db/schema.rb when I need this information and consider the comments - and all the diffs in the PRs - rather as noise.

So I wonder if you know any existing way to automatically fold the annotate comment when using VSCode?

If not, would it be possible to add a setting, that would add a (configurable) first and last line? There are VSCode extensions that can automatically fold code "regions", when opening a file.

For this a first comment line had to be added in the form of:

# #region Annotate

and a last line with the content:

# #endregion

which would allow the extensions to identify the whole comment and collapse it automagically when opening a file.

Version

drwl commented 3 weeks ago

Perhaps the --wo, --wrapper-open STR and --wc, --wrapper-close STR might be usable here?