Summary: | [PATCH] Alternative lisp indenter for katepart | ||
---|---|---|---|
Product: | [Applications] kate | Reporter: | Matteo Sasso <matteo.sasso> |
Component: | general | Assignee: | KWrite Developers <kwrite-bugs-null> |
Status: | RESOLVED FIXED | ||
Severity: | wishlist | ||
Priority: | NOR | ||
Version: | unspecified | ||
Target Milestone: | --- | ||
Platform: | unspecified | ||
OS: | Linux | ||
Latest Commit: | Version Fixed In: | ||
Sentry Crash Report: | |||
Attachments: |
The indentation script
The indentation script, v1.1 The indentation script, v1.1 (for real) |
Description
Matteo Sasso
2009-09-10 22:48:56 UTC
Created attachment 36850 [details]
The indentation script
Created attachment 36887 [details]
The indentation script, v1.1
Better behaviour for some Common Lisp special forms (cond, let, ...).
Created attachment 36888 [details]
The indentation script, v1.1 (for real)
Oops, wrong file.
Hi, I once wrote the Lisp indenter but just as a proof of concept. I have no idea whether it's really useful for programming Lisp. Hence, does it make sense to replace it? Or add yours as another "Lisp2" indenter (with a better name)? Well, the part that indented comments was good and in fact I used it. On the other hand, it is not really usable for lisp programmers since it indents everything by a fixed amount. Readable lisp code is a little bit more convoluted since it must convey the structure of the program, thus offsetting the homogeneous syntax. My approach is still a little trivial, but is somewhat usable. Of course opinions of other lisp (or scheme) developers are most welcome. Well, I'd be fine with replacing my indenter then. I doubt other lisp programmers read this thread, so if we want feedback we'd have to ask directly in lisp communities or blog about it. Ah, just stumbled over bug #147693. Can you have a look? Probably we can close that one then. I posted a link to this bug on comp.lang.lisp and on the clojure group. Unfortunately it seems most developers are happy with emacs; I'm not going to blame them. Yes, bug bug #147693 is partially solved by my indenter. Unfortunately there are some technical limitations which make a "perfect" lisp indenter non-trivial. Good improvements would be possible if Kate would call the indent() function (or another callback... unindent() maybe?) in response to an unindent command (backspace or shift+tab). Adding a backspace character to triggerCharacters doesn't seem to have any effect right now. Git commit bc6dcd8ad017908b951fb379c706efd5913f4c31 by Christoph Cullmann. Committed on 12/08/2011 at 15:38. Pushed by cullmann into branch 'master'. add new lisp indenter, feel free to mail further improvements BUG: 207002 M +79 -34 part/script/data/lisp.js http://commits.kde.org/kate/bc6dcd8ad017908b951fb379c706efd5913f4c31 |