feat(dist): generate completions, editor syntax, man pages, translations
Ports Ghostty's build-data helpers (main_build_data.zig, src/extra/*, build/mdgen) as the ghostty-build-data binary: bash/zsh/fish completions, Vim syntax/ftdetect/ftplugin/compiler, Sublime syntax (also used by bat), terminfo source and ghostty(1)/ghostty(5) markdown. With the version set to the installed 1.3.1-arch2, all generated files are byte-identical to the installed Ghostty's. - `just docs` renders man pages and HTML with pandoc. - po/: Ghostty's 29 translation catalogs; `just locales` compiles them into the com.mitchellh.ghostty gettext domain. - `just install PREFIX FLATPAK SYSTEM_PACKAGE` installs everything incl. terminfo text/termcap outputs and mirrors GhosttyResources.zig install modes (Flatpak D-Bus template without systemd; lib/systemd/user for system packages). - Build metadata (version, tip/stable channel, commit, build mode) is derived at build time like build_config.zig; GTK/libadwaita compile-time versions come from pkg-config instead of constants. Test Plan: - cargo run -p ghostty-build-data -- +bash | diff - \ /usr/share/bash-completion/completions/ghostty (same for zsh/fish/vim) - just install /tmp/prefix
This commit is contained in:
1 parent
b65bfc575c
commit
b192fdb046
56 files changed
+12614
-16
No files matched your search
@@ -0,0 +1,20 @@
|
||||
//! Vim/Neovim plugin files (port of `extra/vim.zig`).
|
||||
|
||||
use std::fmt::Write as _;
|
||||
|
||||
use crate::chunks_vim::{C0, C1, C2, C3, C4};
|
||||
use crate::config_fields;
|
||||
|
||||
pub const FTDETECT: &str = C0;
|
||||
pub const FTPLUGIN: &str = C1;
|
||||
pub const COMPILER: &str = C2;
|
||||
|
||||
#[must_use]
|
||||
pub fn syntax() -> String {
|
||||
let mut w = String::from(C3);
|
||||
for f in config_fields() {
|
||||
let _ = write!(w, "\n\t\\ {}", f.name);
|
||||
}
|
||||
w.push_str(C4);
|
||||
w
|
||||
}
|
||||
Reference in new issue
Block a user