emacs如何配置一个正常的common lisp编辑器

请教大神们,如何配置,可以希望详细一点的教程,发链接也可以呀

如果单纯只是想在Windows下学习common lisp的话,有一个已经配置好的: GitHub - nakrakiiya/mefcl: My Emacs For Common Lisp 。但是里面的Emacs应该不是最新的。

我几年前下载过mefcl。分享链接: https://drive.google.com/file/d/17jvnOQ3WlqeFb60FRGNBFi7TIcssEEDH/view?usp=sharing

我在liunx下,想用emacs配置下common lisp的环境,只是安装sbcl,和slime就好了吗

Awesome-Emacs: Common Lisp 插件

还有一些写lisp的辅助工具,看我给链接的Lisp Family部分

1 个赞
2 个赞

非常感谢,我现在弄好了,根据emacswiki, (require 'cl-lib) (require 'common-lisp-snippets)

(setq inferior-lisp-program “/usr/bin/sbcl”) (setq sly-contribs’ (sly-fancy))

你的配置不需要安装QuickLisp吗?

quicklisp不是一个load就安装了么

哦,我的是参照这个配置的。Quicklisp beta

关于lsp,common lisp有自己的language server吗?

有人做过,但是完全没有 SLIME/SLY 好用。Common Lisp 开发环境的三大特色,debugger, listener, inspector,需要 UI 上的支持,光靠 lsp 实现不了。而 lsp 主要负责的语法检查和智能补全,实践上写 Common Lisp 基本不需要,也没有针对 CL 的很好的实现。


另外 SLY 的作者同样也是 elgot 的作者,他没有选用 lsp 做实现就很能说明理由了。

I’m Sly’s author. There is CL specific functionality, most notably an inspector, a debugger, and a REPL that are not very well covered by LSP right now. That said:

  1. I’ve heard of an experimental microsof-sponsored DAP (Debugger Adpater Protocol) which is similar to LSP and uses some of its underlying transport mechanics.
  2. I have another Emacs extension, Eglot (GitHub - joaotavora/eglot: A client for Language Server Protocol servers) for LSP. It follows roughly the same implementation patterns as Sly, so if you like one you might like to try the other.

最主要的是,List 用的好好的,为什么要用傻X的 JSON 呢。

有道理,lisp自身的格式已经很完备了。

inspector能简单解释一下吗?

一个用可以来查看,编辑和遍历任意数据结构的辅助程序。

(defclass example () (a b))

(inspect (make-instance 'example))

Lisp Machine:

Command Line

Sly

ClozureCL IDE

2 个赞

好的,谢谢!你已经玩到一定境界了,lisp machine 我还没用过。你用的是模拟器吧?

ruby和nodejs里也有类似inspect的功能。

listener就是监听某个端口的意思?

Listener 是 REPL 的另一种说法。