libera/#shirakumo - IRC Chatlog
Search
18:20:59
scymtym
Shinmera: thanks for adding the builtin indentation. i'm going to add trivial-indent to the dependencies of the alloy-code-editor system. SLIME/SWANK have the additional fallback behavior of getting the lambda list of macros and turning that into an indentation specification on-the-fly. is that something you want?
18:24:07
Colleen
<shinmera> but in the editor case, the remote lisp system needs to send over the rules it knows to the editor anyway
18:24:28
Colleen
<shinmera> so just having a table of rules you can plug in would be fine as well, without the dependency
18:25:08
Colleen
<shinmera> the dependency alone also won't be sufficient for indentation since it excludes some important stuff
18:30:36
scymtym
at the moment, i need to obtain indentation rules so that i can test the indentation logic. getting the rules from the "local" image is fine for that. i see the point that the rules will ultimately have to come from the remote image, though
18:31:21
Colleen
<shinmera> trivial-indent is about as lightweight of a dependency as you can get anyway, so it's no big deal
18:31:34
scymtym
should i have the editor just call something like (alloy:indentation SYMBOL) and plug in the local stuff for now?
18:32:39
Colleen
<shinmera> well, probably better to do something like (alloy-code-editor:indent editor operator expression) so it can be customised arbitrarily, with a default fallback that queries trivial-indent:indentation
18:33:18
Colleen
<shinmera> or whatever, idk what you got hooked up, but essentially (I guess) I'm wondering how to handle the more complicated things that don't fit into the slime syntax
18:33:40
scymtym
yes, that exists, but it bottoms out to looking up the indentation for a symbol at some point
18:34:26
scymtym
i guess there is the question of caching and also who triggers the transmission of rules from the remote image to the local image and when
18:35:48
scymtym
right. the fallback i described above could be tricky since it would need re-transmission when the macro lambda list changes
18:36:41
scymtym
i suspect the fallback is important since most user-defined macros don't have indentation hints
18:37:40
scymtym
i mean SLIME's strategy of analyzing macro lambda lists if there is no explicit indentation rule
18:41:27
scymtym
presumably. i have looked only at the lambda list parsing part so far. but i have seen some cache and also big batches of macro lambda list parsing. so worst case could be flushing and re-analyzing everything quite often
18:46:10
Colleen
<shinmera> I'll probably add a custom message type to fetch the arglist (and docstring) of something
18:47:51
scymtym
looks like the swank side (re)computes the indentation rules for everything or for everything in a given package and syncs changes to slime
18:51:12
scymtym
(defvar *configure-emacs-indentation* t "When true, automatically send indentation information to Emacs after each command.")
18:54:57
scymtym
yes. i will just add the function to the editor and hook something up that helps with testing for now