# Better Lisp support

**URL:** <https://discuss.kakoune.com/t/better-lisp-support/1998>\
**Category:** Complaints & Improvements\
**Tags:** language, plugins\
**Created:** [February 23, 2022, 4:11pm UTC](https://discuss.kakoune.com/t/better-lisp-support/1998 "2022-02-23T16:11:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![laserswald](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/laserswald/32/1054_2.png) [@laserswald](https://discuss.kakoune.com/u/laserswald)\
**Post date:** [February 23, 2022, 4:11pm UTC](https://discuss.kakoune.com/t/better-lisp-support/1998/1 "2022-02-23T16:11:25Z")

</div>

Hey everyone! Original author of the Scheme highlighter here.

One thing I have noticed is that all the Lispy languages tend to import the Lisp plugin in the default filetypes. Normally, this wouldn’t be a problem, but the default Lisp highlighter is built for Common Lisp with some random Clojure in there. As a bit of a Lisp aficionado, there are quite a few differences between different flavors of Lisp, and having them all import from CL is a bit useless.

So here’s what I propose: we instead have a s-expressions module that does some simple highlighting for S-expression languages. Many Lisps have similar formatting for some basic stuff (Quote is almost universally single quote, except for sometimes, etc.) Also, most lisps are formatted in the same way, so they can all take advantage of an s-expression indenter.

With this, we can also have a more complete Common Lisp highlighter as well in the same vein of Scheme, where almost every construct is highlighted correctly.

Anyways, wanted to get all of your opinions on this. I’ve started some work on better CL keywords as a seperate module from the current lisp module.

---

<div class="post-metadata">

**Author:** ![andreyorst](https://discuss.kakoune.com/user_avatar/discuss.kakoune.com/andreyorst/32/29_2.png) [@andreyorst](https://discuss.kakoune.com/u/andreyorst)\
**Post date:** [April 4, 2022, 4:54pm UTC](https://discuss.kakoune.com/t/better-lisp-support/1998/2 "2022-04-04T16:54:38Z")

</div>

As another Lisp enthusiast I fully agree. This is exactly the same problem people have in Emacs. Emacs has a major-mode (a.k.a. filetype) called `lisp-mode`, and even if it is called just `lisp`, it was made for Common Lisp only (debatable). So every other lisp-like language has to inherit from `prog-mode` instead, which has nothing to do with lisp-specific features, re-implementing a lot of these features that are common between lisps. More recently a more general-purposed `lisp-data-mode` was added, but it’s very bare-bones and doesn’t provide a lot of things, so languages still inherit from `prog-mode`.

So for Kakoune, while it’s still young it would only make sense not to repeat the same mistake that Emacs did - a separate module for dealing with S-expression style data would be a good thing, and then all other Lisp-like languages can reuse it.
