How Liquid works
This document provides a view of how the mechanics of Liquid works, with focus on the details from a user perspective.
Virtual editor in the center
For the scope of this document consider the editor itself a datastructure with related functions.
Almost everything that is done in Liquid is doing actions to the editor:
So Liquid is a virtual editor on which you can act from some input and drag out information for some output.
Apps are just recepies of actions to apply to the editor
When you create an app for Liquid, you just run the functions needed to make Liquid do your apps functionality. The steps for that might be:
(editor/new-buffer "some-name")
{:a do-stuff-on-editor :b do-something-else-on-editor}
(editor/set-keymap my-keymap)
(editor/set-highlighter my-highlighter)
Now the actions in the keymap defines what the app does, when the buffer is in front.
Core is also just an app
When Liquid is started, the -main function in the core namespace is executed. It just does actions to the editor, to make some buffer from the beginning. It sets up input handlers and a view, so there is something from the beginning. How input and output should be done can be configured with input parameters, but you can actually just create your own -main function to set it up exactly as you like.
To do just additions to the default setup add your code to a .liq file in your home folder.