From c03828e03235a83918d907cf9b3a59928bd825b2 Mon Sep 17 00:00:00 2001 From: Anund Date: Tue, 7 Jan 2025 17:56:21 +1100 Subject: [PATCH] vim: work with theme config files --- src/config/vim.zig | 21 ++++++++++++++++++--- 1 file changed, 18 insertions(+), 3 deletions(-) diff --git a/src/config/vim.zig b/src/config/vim.zig index 62255bd79..ab487f9f9 100644 --- a/src/config/vim.zig +++ b/src/config/vim.zig @@ -3,7 +3,16 @@ const Config = @import("Config.zig"); /// This is the associated Vim file as named by the variable. pub const syntax = comptimeGenSyntax(); -pub const ftdetect = "au BufRead,BufNewFile */ghostty/config set ft=ghostty\n"; +pub const ftdetect = + \\" Vim filetype detect file + \\" Language: Ghostty config file + \\" Maintainer: Ghostty + \\" + \\" THIS FILE IS AUTO-GENERATED + \\ + \\au BufRead,BufNewFile */ghostty/config,*/ghostty/themes/* set ft=ghostty + \\ +; pub const ftplugin = \\" Vim filetype plugin file \\" Language: Ghostty config file @@ -31,13 +40,19 @@ pub const ftplugin = \\ ; pub const compiler = + \\" Vim compiler file + \\" Language: Ghostty config file + \\" Maintainer: Ghostty + \\" + \\" THIS FILE IS AUTO-GENERATED + \\ \\if exists("current_compiler") \\ finish \\endif \\let current_compiler = "ghostty" \\ - \\CompilerSet makeprg=ghostty\ +validate-config - \\CompilerSet errorformat=%f:%l:%m + \\CompilerSet makeprg=ghostty\ +validate-config\ --config-file=%:S + \\CompilerSet errorformat=%f:%l:%m,%m \\ ;