Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Register systemd files as ini #7592

Merged
merged 1 commit into from Jul 12, 2023
Merged

Register systemd files as ini #7592

merged 1 commit into from Jul 12, 2023

Conversation

Arian-D
Copy link
Contributor

@Arian-D Arian-D commented Jul 10, 2023

Howdy yall,
I edit a lot of systemd files, which are the INI format, and upon opening helix I constantly have to :set-language. I was wondering if it would be okay to add them to the ini file types.

languages.toml Outdated
@@ -2233,7 +2233,7 @@ grammar = "bash"
[[language]]
name = "ini"
scope = "source.ini"
file-types = ["ini"]
file-types = ["ini", ".service", ".container", ".volume", ".kube", ".network"]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The leading .s can all be removed here

@jn64
Copy link

jn64 commented Jul 11, 2023

These are possible extensions for systemd unit files:

automount
device
mount
path
service
slice
socket
swap
target
timer

Note not all systemd unit suffixes mentioned in systemd.unit(5) can be actual files (e.g. .scope units are not files):

The unit type suffix must be one of ".service", ".socket", ".device", ".mount", ".automount", ".swap", ".target", ".path", ".timer", ".slice", or ".scope".

So I determined the list by searching the man pages:

zgrep 'A unit configuration file whose name ends in' /usr/share/man/*/systemd.*

@archseer archseer merged commit a5f7190 into helix-editor:master Jul 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants