Sign inSign up

jhonasiv/editor-kit:latest

Manifest digest

sha256:6c02fc056cf8512edf8b1be7229c1567fa384b536f238d3acd7d6ffba6386008

Last pushed

13 days by jhonasiv

Type

Sandbox Kit

Manifest digest

sha256:6c02fc056cf8512edf8b1be7229c1567fa384b536f238d3acd7d6ffba6386008

yaml
schemaVersion: "2"
kind: mixin
name: dotfiles-nvim
version: 0.1.0
displayName: Dotfiles neovim
description: Installs neovim 0.12+, luarocks, and the toolchain nvim needs, symlinks the nvim dotfiles from the workspace into $HOME, and documents the headless test recipe.
sourceURL: https://github.com/jhonasiv/dotfiles
requires:
    agent: pi
licenses:
    - MIT
agentInstructions:
    content: |
        # dotfiles-nvim kit

        This sandbox is for developing the nvim part of the dotfiles repo.

        ## What is installed

        neovim (latest release, /opt, symlinked to /usr/local/bin), luarocks,
        node, npm, ripgrep, fd, gcc, make, unzip, gettext, jj, git. LSPs and
        formatters are installed by mason on first interactive launch; headless
        tests do not trigger mason.

        ## Deployment

        `dotfiles-nvim-link.sh` runs on every sandbox start. It finds the repo
        (WORKSPACE_DIR, else /home/agent/workspace, else /workspace, by looking
        for sbxenv.yaml) and creates:

        - ~/.config/nvim -> <repo>/nvim
        - ~/dev/workwork (cloned from github.com/jhonasiv/workwork, default
          branch, only if missing). lua/plugins/manifest.lua adds workwork to
          vim.pack.add unconditionally via a file:// src, so startup fails
          without the checkout present.

        First nvim startup runs vim.pack.add, which fetches every plugin from
        GitHub. That needs network; it happens once and is cached under
        ~/.local/share/nvim.

        ## Headless tests

        Startup check (first run also fetches all plugins):

            nvim --headless +qa 2>&1 | grep -iE 'error|failed|not resolve'

        Empty-exit check against the real config entry:

            nvim --headless "$HOME/.config/nvim/init.lua" +qa

        ## Known limits

        - The manifest pins workwork to version "snacks-integration", but that
          ref does not exist on the public repo (branches are main, merge, wip).
          vim.pack.add will fail to resolve it until the ref is pushed. Report
          the failure; do not patch the manifest.
        - mason tool installs, treesitter parser installs and rendering need an
          interactive session; they are out of scope here.
permissions:
    network:
        allow:
            - archive.ubuntu.com
            - security.ubuntu.com
            - deb.debian.org
            - security.debian.org
            - github.com
            - api.github.com
            - codeload.github.com
            - raw.githubusercontent.com
            - nodejs.org
            - '*.npmjs.org'
            - pypi.org
            - api.mason-registry.dev
setup:
    install:
        - command: |
            (apt-get update \
            && DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
              git curl ca-certificates luarocks nodejs npm ripgrep fd-find \
              gcc make unzip gettext) 2>&1 | tee /home/agent/editor-log || true
          user: root
          description: Install nvim build and tooling dependencies from apt
        - command: |
            if ! nvim --version 2>/dev/null | head -1 | grep -q '0\.[1-9][0-9]'; then
              rm -rf /opt/nvim-linux-x86_64 \
              && curl -sSfL https://github.com/neovim/neovim/releases/latest/download/nvim-linux-x86_64.tar.gz \
                | tar -xz -C /opt \
              && ln -sf /opt/nvim-linux-x86_64/bin/nvim /usr/local/bin/nvim
            fi
          user: root
          description: Install neovim latest release to /opt
    startup:
        - command:
            - /bin/sh
            - /home/agent/.local/bin/dotfiles-nvim-link.sh
          user: agent
          description: Symlink nvim dotfiles and the workwork checkout into place