Pure planning for client runtimes: which directory a runtime installs into, the loader a client runs, and the effect plans that install it, remove it, and activate it in clients that are already running.
Every function here is pure. Paths are computed from an explicit :home, so nothing reads the environment; hive-addon.runtime.boundary runs the plans.
A client kind is data (a profile in default-profiles or one a host passes)
plus a loader kind. Rendering is open for extension through the
loader-source and live-commands multimethods, dispatched on the
profile's :profile/loader, so a new client adds methods rather than branches.
Rationale lives in hive memory (KG-linked), not here.
Pure planning for client runtimes: which directory a runtime installs into, the loader a client runs, and the effect plans that install it, remove it, and activate it in clients that are already running. Every function here is pure. Paths are computed from an explicit :home, so nothing reads the environment; hive-addon.runtime.boundary runs the plans. A client kind is data (a profile in `default-profiles` or one a host passes) plus a loader kind. Rendering is open for extension through the `loader-source` and `live-commands` multimethods, dispatched on the profile's :profile/loader, so a new client adds methods rather than branches. Rationale lives in hive memory (KG-linked), not here.
Client kind -> profile. Vim and Neovim both autoload every runtime directory under pack/*/start at startup, and both run the same Vim script loader.
Client kind -> profile. Vim and Neovim both autoload every runtime directory under pack/*/start at startup, and both run the same Vim script loader.
(expand-home path home)PATH with a leading ~/ replaced by HOME.
PATH with a leading ~/ replaced by HOME.
(install-dir profile id home)The directory runtime ID installs into for PROFILE.
The directory runtime ID installs into for PROFILE.
(install-plan profile decl {:keys [home source-dir values]})Effects that install DECL for PROFILE from SOURCE-DIR, with the loader rendered from VALUES. Replaces any previous install of the same runtime.
Returns {:dir d :plan [Effect ...]}, or {:error message} when an on-load command names a binding VALUES lacks.
Effects that install DECL for PROFILE from SOURCE-DIR, with the loader
rendered from VALUES. Replaces any previous install of the same runtime.
Returns {:dir d :plan [Effect ...]}, or {:error message} when an on-load
command names a binding VALUES lacks.Commands that make an already-running client load the runtime installed at DIR (which then runs its own loader). A running client may hold an older version of the same runtime: its autoload scripts are sourced as well when the client can replace them, and the client is told to restart when it cannot (a Vim that loaded them from another directory).
Commands that make an already-running client load the runtime installed at DIR (which then runs its own loader). A running client may hold an older version of the same runtime: its autoload scripts are sourced as well when the client can replace them, and the client is told to restart when it cannot (a Vim that loaded them from another directory).
(live-plan profile dir)Effects that activate the runtime installed at DIR in running clients.
Effects that activate the runtime installed at DIR in running clients.
Source of the loader file that runs COMMANDS once PROFILE's client has loaded runtime ID.
Source of the loader file that runs COMMANDS once PROFILE's client has loaded runtime ID.
(on-load-commands decl values)DECL's on-load commands with VALUES substituted.
DECL's on-load commands with VALUES substituted.
(placeholders s)The binding names S refers to, as keywords.
The binding names S refers to, as keywords.
(substitute s values)S with every {{name}} replaced by (get VALUES :name). Unknown names are left
as written; unbound reports them before a plan is built.
S with every {{name}} replaced by (get VALUES :name). Unknown names are left
as written; `unbound` reports them before a plan is built.(unbound decl values)Binding names DECL's on-load commands use that VALUES does not supply, sorted.
Binding names DECL's on-load commands use that VALUES does not supply, sorted.
(uninstall-plan profile decl home)Effects that remove DECL's install for PROFILE.
Effects that remove DECL's install for PROFILE.
(vim-string s)S as a single-quoted Vim string literal.
S as a single-quoted Vim string literal.
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |