#compdef elisp

# Zsh completion for elisp (elisprs) — Emacs Lisp on the fusevm bytecode VM.

_elisp() {
  _arguments -s \
    '(- *)'{-V,--version}'[print version and exit]' \
    '(- *)'{-h,--help}'[show usage and exit]' \
    '(- *)--lsp[run the language server over stdio]' \
    '(- *)--dap[run the debug adapter over stdio]' \
    '--aot[ahead-of-time compile to a native object]' \
    '-o[output object path (with --aot)]:output file:_files' \
    {-e,--eval}'[evaluate an expression and print its value]:expression' \
    '*:Emacs Lisp file:_files -g "*.el"'
}

_elisp "$@"
