From 34373e04d76e8ac3713033acf48174adb28a6334 Mon Sep 17 00:00:00 2001 From: Randall Winkhart Date: Sat, 14 Jun 2025 10:00:08 -0400 Subject: [PATCH] Embed "ini" support --- syntax_files_todo/ini.yaml => syntax/stxIni.go | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) rename syntax_files_todo/ini.yaml => syntax/stxIni.go (72%) diff --git a/syntax_files_todo/ini.yaml b/syntax/stxIni.go similarity index 72% rename from syntax_files_todo/ini.yaml rename to syntax/stxIni.go index a6ab79a..d3b8ec0 100644 --- a/syntax_files_todo/ini.yaml +++ b/syntax/stxIni.go @@ -1,6 +1,12 @@ -filetype: ini +//go:build stxIni || stxAll -detect: +package syntax + +func init() { + syntaxMap["ini"] = &lazySyntax{init: func() []byte { + return []byte(`filetype: ini + +detect: filename: "\\.(ini|desktop|lfl|override)$|(mimeapps\\.list|pinforc|setup\\.cfg)$|weechat/.+\\.conf$" header: "^\\[[A-Za-z]+\\]$" @@ -12,3 +18,6 @@ rules: - statement: "[=;]" - comment: "(^|[[:space:]])#([^{].*)?$" - constant.string: "\"(\\\\.|[^\"])*\"|'(\\\\.|[^'])*'" +`) + }} +}