Most applications provide you configuration files that are data / text based. Whether it is toml, JSON, yaml or some other format, you are usually defining values for pre-determined keys and that’s all.

This makes sense for many applications, but involved applications have explored configurations that make use of scripting. For example, vim uses VimScript, neovim uses Lua, but vscode uses json (as far as I remember), and Helix (vim inspired editor) argues editor configurations must be data, not scripting, and uses toml.

many tiling window managers use various programming languages (Qtile uses python, xmonad uses Haskell, Awesome uses Lua) while others stick to data configuration (i3).

Do you think that scriptable configuration is over-engineered and brings weaknesses, or is it warranted and grants the user power in these big applications? What are the benefits of scriptable configurations?

  • Lupec@lemm.ee
    link
    fedilink
    arrow-up
    2
    ·
    edit-2
    9 months ago

    Same here, I avoid using Jinja if at all possible because I just hate blindly poking at stuff like that. I wish the YAML portion had schemas available for autocompletion when editing, at the very least.
    Ansible comes to mind as something in a similar vein, I’ve been messing with it pretty often these days. At least here you do get robust autocomplete support and whatnot that eliminates a lot of the guesswork, although Jinja is always a bit painful lol.

    • hallettj@beehaw.org
      link
      fedilink
      English
      arrow-up
      2
      ·
      9 months ago

      Oh yeah, and with Ansible there is an alternative to point to, Nix, which does configuration better IMO using a scripting language. It’s still not typed so editor LSP support is limited. At least with NixOS modules and with Home Manager modules runtime validation is pretty good.