Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DocCommand ¶ added in v1.18.0
DocCommand creates the "doc" cobra command with optional embedder configuration. Embedders can pass WithEnv to supply a fully configured environment (preferred) or WithRegistry to merge Go-registered packages into the default doc environment.
func Execute ¶
func Execute()
Execute adds all child commands to the root command and sets flags appropriately. This is called by main.main(). It only needs to happen once to the rootCmd.
func LintCommand ¶ added in v1.18.0
LintCommand creates the "lint" cobra command with optional embedder configuration. Embedders can pass WithRegistry or WithEnv to inject Go-registered symbols for semantic analysis.
Types ¶
type Option ¶ added in v1.18.0
type Option func(*cmdConfig)
Option configures an exported command factory (LintCommand, DocCommand).
func WithEnv ¶ added in v1.18.0
WithEnv injects a fully configured LEnv. For the doc command this is the environment used for documentation queries. For the lint command the env's Runtime.Registry is used for semantic analysis.
func WithRegistry ¶ added in v1.18.0
func WithRegistry(reg *lisp.PackageRegistry) Option
WithRegistry injects a PackageRegistry for semantic analysis. The registry's Go-registered builtins, special ops, and macros are merged with stdlib symbols so that the linter recognises embedder-provided functions.