cogentcore / core

A free and open source framework for building powerful, fast, elegant 2D and 3D apps that run on macOS, Windows, Linux, iOS, Android, and the web with a single Go codebase, allowing you to Code Once, Run Everywhere.
http://cogentcore.org/core
BSD 3-Clause "New" or "Revised" License
1.75k stars 83 forks source link

fileinfo, filetree, and Cogent Code should properly identify, treat generated files. #1238

Open rcoreilly opened 1 month ago

rcoreilly commented 1 month ago

Describe the feature

per https://github.com/golang/go/issues/13560 generated files are identified by a standard comment. fileinfo should check for this comment in .go files and set a "Generated" flag. Then filetree can style such files with an appropriate lighter text color (we use this for non-vcs files -- probably just re-use same and you can look at the file info to see which is which). Finally, Cogent Code will open such files with the texteditor set to read only, unless you open using the Edit filetree command.

Relevant code

No response

kkoreilly commented 1 month ago

To me it seems a little risky to use the same indicator for generated files and untracked files, since one of the main use cases of such an indicator would be to determine if a generated file is erroneously checked in or not checked in depending on your intention. "Look at the file info" is not really a great solution.

rcoreilly commented 1 month ago

Yeah, suggestion for appropriate distinct styling?

kkoreilly commented 1 month ago

Some kind of icon? Or just some other text color such as yellow?

rcoreilly commented 3 weeks ago

this is all implemented within the goal pr where it is essential.