Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Offtopic, formatting related, and always a fun discussion:

The function signature of [1] ...

  ghostty_input_mods_e ghostty_surface_key_translation_mods(ghostty_surface_t,
                                                            ghostty_input_mods_e);
(^^^ probably not readable in small screens)

... is the perfect example of why "align continuation lines to the open bracket" is the absolute worse option versus the simpler, consistent and only logical choice of "align continuation lines with an extra indentation", aka

    AlignAfterOpenBracket: DontAlign
in Clang-Format [2].

[1]: https://github.com/ghostty-org/ghostty/blob/f97518cc10059918...

[2]: https://clang.llvm.org/docs/ClangFormatStyleOptions.html#ali...



Indeed. Also note this isn't the real public C API. This is, as I noted in the blog post as a disclaimer, an internal-only C API so it is admitedly very ugly.

(I assume you know this, just adding context for other readers)


Yep, sorry in my mind I was going to mention it (with "even if it's only me seeing private code like this" or something similar) and later forgot after some edits to fix the formatting...

Anyway, I hope it doesn't get lost that this comment was only meant to be half informative, half public statement, and half a light joke :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: