feat(opencode): configure formatters and provide them on PATH
Add formatter entries for nix, prettier (md/yaml/json/web), shell, python, toml and lua, and install the matching tools via the opencode home module so they are available wherever opencode runs. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
7641bab17f
commit
d0c58a5c9d
2 changed files with 37 additions and 0 deletions
|
|
@ -1,6 +1,7 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
pkgs,
|
||||
inputs,
|
||||
...
|
||||
}:
|
||||
|
|
@ -29,6 +30,16 @@ in
|
|||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
# Formatters referenced by config/opencode/config.json; keep them on PATH for opencode.
|
||||
home.packages = [
|
||||
pkgs.nixfmt-rfc-style
|
||||
pkgs.nodePackages.prettier
|
||||
pkgs.shfmt
|
||||
pkgs.ruff
|
||||
pkgs.taplo
|
||||
pkgs.stylua
|
||||
];
|
||||
|
||||
xdg.configFile."opencode" = {
|
||||
source = ../../../../config/opencode;
|
||||
recursive = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue