Replies: 1 comment 1 reply
-
@anoduck As far as I can tell, Helix has a pre-configured INI section in its default I haven't tried this personally, but you could add the following to your [[language]]
name = "ini"
scope = "source.ini"
file-types = [
"ini",
# Systemd unit files
"service",
"automount",
"device",
"mount",
"path",
"service",
"slice",
"socket",
"swap",
"target",
"timer",
# Podman quadlets
"container",
"volume",
"kube",
"network",
{ glob = ".editorconfig" },
{ glob = "rclone.conf" },
"properties",
"cfg",
"directory",
# === your specific .conf files or all ".conf" files ===
# { glob = "some_file.conf" },
# "conf",
]
injection-regex = "ini"
comment-token = "#"
indent = { tab-width = 4, unit = "\t" }
[[grammar]]
name = "ini"
source = { git = "https://github.com/justinmk/tree-sitter-ini", rev = "87176e524f0a98f5be75fa44f4f0ff5c6eac069c" } (note: I also updated the Tree Sitter grammar to the latest |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
This has to have been tackled before, but the number one most irritating thing about Helix is finding a language syntax that appropriately fits configuration files or "ini" files. I am not talking about the less common variants where
;
,:
, or'
are used to denote comments. I am referring to the most common form, where#
represents a commented line. Neither the ssh-client-config syntax nor the git-config syntax work in this respect.Beta Was this translation helpful? Give feedback.
All reactions