vim-elisp
Vim / Neovim support for Emacs Lisp, targeting
elisprs —
an Emacs Lisp implementation written in Rust that lowers .el to the
fusevm
bytecode VM with a three-tier Cranelift JIT.
Feature matrix
| Capability | Mechanism |
|---|---|
| Filetype detection | *.el, .emacs, _emacs, elisp shebang |
| Syntax highlighting | standalone syntax/elisp.vim (special forms + subrs) |
| Indentation | Vim built-in lisp indenter + lispwords |
Run / :make | elisp % (evaluate the file) |
| Language server | vim-lsp / coc.nvim via elisp --lsp |
| Debug adapter | nvim-dap via elisp --dap |
Install
" vim-plug
Plug 'MenkeTechnologies/vim-elisp'
# backend binary
brew install menketechnologies/menketech/elisprs
Syntax token categories
- Comments (
;), shebang, TODO / FIXME markers - Strings, char literals (
?a,?\C-x), keyword symbols (:foo) - Quote sugar:
'`,,@#' - Numbers, including
#x/#o/#bradices and floats - The 18 special forms (
defun,let,cond,lambda, …) - The built-in subr set exposed by the elisp LSP corpus
- Names introduced by
defun/defmacro/defvar/defconst
Run, lint, and language server
:ElispRun " evaluate the current file via elisp
:make " same, into the quickfix list
elisprs has no separate lint mode — evaluating a file with
elisp FILE.el surfaces both parse and runtime errors.
Live diagnostics come from the language server (elisp --lsp),
registered automatically with vim-lsp.
Debug adapter
local dap = require('dap')
dap.adapters.elisp = { type = 'executable', command = 'elisp', args = { '--dap' } }
dap.configurations.elisp = {
{ type = 'elisp', request = 'launch', name = 'Run Emacs Lisp program', program = '${file}' },
}