linguist icon indicating copy to clipboard operation
linguist copied to clipboard

Missing additional extensions for systemd INI format style files

Open vorburger opened this issue 1 year ago • 2 comments

Describe the bug

I noticed on my https://github.com/vorburger/vorburger-dotfiles-bin-etc/commit/d6eb521e0e43de7c198b167d05126946c9b56a72 that a (systemd, INI format style) .service had syntax highlighting, but .timer did not:

$ github-linguist systemd/flatpak-update.service
systemd/flatpak-update.service: 6 lines (5 sloc)
  type:      Text
  mime type: text/plain
  language:  desktop

$ github-linguist systemd/flatpak-update.timer
systemd/flatpak-update.timer: 10 lines (8 sloc)
  type:      Text
  mime type: text/plain
  language:

I'll see if it's easy enough to contribute a PR with a proposed fix for this...

vorburger avatar Dec 14 '24 12:12 vorburger

I've found that #5767 for #5750 originally added systemd detection support. But since then this is longer like that; the systemd "language" (for .service, .sys and .dll and .inf) appears to have been removed again at some point.

In #5768 for #5750 the systemd .service detection appears to have been re-added by @Alhadis, and this is currently part of the desktop "language" (together with .desktop and .desktop.in). Ergo I'll propose adding this there.

While I am at it, I'll propose adding a number of other systemd configuration file name extensions which use the same syntax (which is really just an INI file).

vorburger avatar Dec 14 '24 13:12 vorburger

While I am at it, I'll propose adding a number of other systemd configuration file name extensions which use the same syntax

Actually, this works for non-common extensions, but is more debatable for the more common ones...

... after carefully evaluating this more, I have decided NOT to include these extensions:

The remaining ones are proposed in #7163.

vorburger avatar Dec 14 '24 14:12 vorburger