Skip to content

Syntax Reference

rendaw edited this page Sep 22, 2017 · 8 revisions

Introduction

This documentation describes the Lua configuration for .

Some values are typed. Specify types with built-in unary functions which take the value to be typed. For example, to place a dog in field animal, write dog { name = "fido" }. Types are indicated in the documentation as a word in parentheses.

Note that types only need to be specified where indicated.

Also, if a type only has one required field, the field can be filled directly, so:

repeat { count = 4 }

may be shortened to:

repeat 4

Document Root

The root element of the document is:

Types

top

A user specified tag.

field: value

The value of the tag.

Values Any string
Required yes
top

A tag that indicates editor state, such as "modified" when the document has unsaved changes.

field: value

The value of the tag.

Values Any string
Required yes
top

A tag that indicates an atom part type.

field: value

The value of the tag.

Values Any string
Required yes
top

A tag that indicates an atom state, such as "compact".

field: value

The value of the tag.

Values Any string
Required yes
top

A tag that indicates an atom type id.

field: value

The value of the tag.

Values Any string
Required yes
top

field: node

Include the type of the atom.

Values
  • true
  • false
Required no
Default value true

field: part

Include the type of the atom part.

Values
  • true
  • false
Required no
Default value true
top

field: converse_padding

Separation between the symbol and the converse edge of the screen.

Values Any integer
Required no
Default value 0

field: converse_start

If true, show the symbol by the near converse edge of the screen. Otherwise, the far.

Values
  • true
  • false
Required no
Default value true

field: indicators

Show a floating indicator symbol based on the current global and selection tags.

Values

List of:

Required yes

field: transverse_padding

Separation between the symbol and the transverse edge of the screen.

Values Any integer
Required no
Default value 0

field: transverse_start

If true, show the symbols at the start of the gutter. Otherwise, the end.

Values
  • true
  • false
Required no
Default value true
top

field: id

The symbol will have this type tag when shown.

Values Any string
Required yes

field: symbol

The symbol to show.

Values

Any of (specify type):

  • (image)
  • (space)
  • (text)
Required yes

field: tags

Show the symbol when these tags are present.

Values

Set of:

Any of (specify type):

  • (free)
  • (global)
  • (part)
  • (state)
  • (type)
Required yes
top

field: actions

A mapping of action names to Lua functions. Each function takes a single

context
argument and returns a boolean, true if the action modified the application state.
context
is an object with the following functions:
act
.
act
takes a string, the name of another action, and runs it, and returns true if the action modified the application state.
Values

Nested:

Required yes
top

field: states

Values

List of:

Any string
Required yes
top

field: format

Values
Required yes
top

field: free_typing

Text keys that don't match a hotkey are passed to the selected primitive.

Values
  • true
  • false
Required no
Default value true

field: hotkeys

Hotkeys to use when the tags match.

Values

Nested:

List of:

Any of (specify type):

  • (seq)
  • (key)
  • (or)
Required yes

field: with

These tags must be present.

Values

Set of:

Any of (specify type):

  • (free)
  • (global)
  • (part)
  • (state)
  • (type)
Required yes

field: without

These tags must be absent.

Values

Set of:

Any of (specify type):

  • (free)
  • (global)
  • (part)
  • (state)
  • (type)
Required no
top

field: rules

A list of hotkey rules.

Values

List of:

Required no

field: show_details

Show the current input sequence and possible actions when an input is received in an incomplete sequence.

Values
  • true
  • false
Required no
Default value true
top

  • mouse1
  • mouse2
  • mouse3
  • mouse_scroll_up
  • mouse_scroll_down
  • enter
  • backspace
  • tab
  • cancel
  • clear
  • shift
  • control
  • alt
  • pause
  • caps
  • escape
  • space
  • page_up
  • page_down
  • end
  • home
  • left
  • up
  • right
  • down
  • comma
  • minus
  • period
  • slash
  • 0
  • 1
  • 2
  • 3
  • 4
  • 5
  • 6
  • 7
  • 8
  • 9
  • semicolon
  • equals
  • a
  • b
  • c
  • d
  • e
  • f
  • g
  • h
  • i
  • j
  • k
  • l
  • m
  • n
  • o
  • p
  • q
  • r
  • s
  • t
  • u
  • v
  • w
  • x
  • y
  • z
  • open_bracket
  • back_slash
  • close_bracket
  • numpad0
  • numpad1
  • numpad2
  • numpad3
  • numpad4
  • numpad5
  • numpad6
  • numpad7
  • numpad8
  • numpad9
  • multiply
  • add
  • separator
  • subtract
  • decimal
  • divide
  • delete
  • num_lock
  • scroll_lock
  • f1
  • f2
  • f3
  • f4
  • f5
  • f6
  • f7
  • f8
  • f9
  • f10
  • f11
  • f12
  • f13
  • f14
  • f15
  • f16
  • f17
  • f18
  • f19
  • f20
  • f21
  • f22
  • f23
  • f24
  • printscreen
  • insert
  • help
  • meta
  • back_quote
  • quote
  • kp_up
  • kp_down
  • kp_left
  • kp_right
  • dead_grave
  • dead_acute
  • dead_circumflex
  • dead_tilde
  • dead_macron
  • dead_breve
  • dead_abovedot
  • dead_diaeresis
  • dead_abovering
  • dead_doubleacute
  • dead_caron
  • dead_cedilla
  • dead_ogonek
  • dead_iota
  • dead_voiced_sound
  • dead_semivoiced_sound
  • ampersand
  • asterisk
  • quotedbl
  • less
  • greater
  • braceleft
  • braceright
  • at
  • colon
  • circumflex
  • dollar
  • euro_sign
  • exclamation_mark
  • inverted_exclamation_mark
  • left_parenthesis
  • number_sign
  • plus
  • right_parenthesis
  • underscore
  • windows
  • context_menu
  • final
  • convert
  • nonconvert
  • accept
  • modechange
  • kana
  • kanji
  • alphanumeric
  • katakana
  • hiragana
  • full_width
  • half_width
  • roman_characters
  • all_candidates
  • previous_candidate
  • code_input
  • japanese_katakana
  • japanese_hiragana
  • japanese_roman
  • kana_lock
  • input_method_on_off
  • cut
  • copy
  • paste
  • undo
  • again
  • find
  • props
  • stop
  • compose
  • alt_graph
  • begin
  • undefined
  • softkey_0
  • softkey_1
  • softkey_2
  • softkey_3
  • softkey_4
  • softkey_5
  • softkey_6
  • softkey_7
  • softkey_8
  • softkey_9
  • game_a
  • game_b
  • game_c
  • game_d
  • star
  • pound
  • power
  • info
  • colored_key_0
  • colored_key_1
  • colored_key_2
  • colored_key_3
  • eject_toggle
  • play
  • record
  • fast_fwd
  • rewind
  • track_prev
  • track_next
  • channel_up
  • channel_down
  • volume_up
  • volume_down
  • mute
  • command
  • shortcut
top

field: nodes

The list of rules to match in sequence.

Values

List of:

Any of (specify type):

  • (seq)
  • (key)
  • (or)
Required yes
top

field: key

The input that is being pressed or released.

Values
Required yes

field: modifiers

Inputs that must be active for this rule to match.

Values

Set of:

Required no

field: press

True if the input is pressed, false if the input is released.

Values
  • true
  • false
Required no
Default value true
top

field: nodes

All rules that may match.

Values

List of:

Any of (specify type):

  • (seq)
  • (key)
  • (or)
Required yes
top

field: alignments

Values

Nested:

Any of (specify type):

  • (absolute)
  • (concensus)
  • (relative)
Required yes

field: associate_forward

Values
  • true
  • false
Required no
Default value false

field: auto_choose_ambiguity

If this type is a suggestion and there are less than this many choices, auto-choose this type.

Values Any integer
Required no
Default value 1

field: back

This describes the format of the data on disk. Modifiable back parts must have a corresponding middle part.

Values

List of:

Any of (specify type):

  • (array)
  • (data_array)
  • (data_atom)
  • (json_data_float)
  • (json_data_int)
  • (data_key)
  • (data_primitive)
  • (data_record)
  • (root_data_array)
  • (data_type)
  • (json_false)
  • (json_float)
  • (json_int)
  • (json_null)
  • (json_true)
  • (primitive)
  • (record)
  • (type)
Required yes

field: depth_score

When calculating depth for windowing, this is the value the atom increases the depth score by.

Values Any integer
Required no
Default value 0

field: front

This describes how the atom is represented in the editor. Modifiable must have a corresponding middle part.

Values

List of:

Any of (specify type):

  • (array)
  • (atom)
  • (primitive)
  • (com.zarbosoft.merman.syntax.front.FrontDataRootArray)
  • (symbol)
Required yes

field: id

Values Any string
Required yes

field: middle

Values

Nested:

Any of (specify type):

  • (array)
  • (atom)
  • (primitive)
  • (record)
Required yes

field: name

Values Any string
Required yes

field: precedence

When filling a suffix or prefix gap, the resultant atom will be raised up the tree

Values Any integer
Required no
Default value 2147483647

field: tags

Values

Set of:

Any string
Required yes
top

field: prefix

Values

List of:

Required yes

field: suffix

Values

List of:

Required yes

field: tags

Values

Set of:

Any string
Required yes
top

Padding around source content (not banner, details, indicators, etc).

field: converse_end

Pad the converse end by this many pixels.

Values Any integer
Required no
Default value 0

field: converse_start

Pad the converse start by this many pixels.

Values Any integer
Required no
Default value 0

field: transverse_end

Pad the transverse end by this many pixels.

Values Any integer
Required no
Default value 0

field: transverse_start

Pad the transverse start by this many pixels.

Values Any integer
Required no
Default value 0
top

field: infix

Values

List of:

Required no

field: prefix

Values

List of:

Required no

field: suffix

Values

List of:

Required no

field: tags

Values

Set of:

Any string
Required yes
top

field: alignments

Values

Nested:

Any of (specify type):

  • (absolute)
  • (concensus)
  • (relative)
Required yes

field: back

Values

List of:

Any of (specify type):

  • (array)
  • (data_array)
  • (data_atom)
  • (json_data_float)
  • (json_data_int)
  • (data_key)
  • (data_primitive)
  • (data_record)
  • (root_data_array)
  • (data_type)
  • (json_false)
  • (json_float)
  • (json_int)
  • (json_null)
  • (json_true)
  • (primitive)
  • (record)
  • (type)
Required yes

field: front

Values

List of:

Any of (specify type):

  • (array)
  • (atom)
  • (primitive)
  • (com.zarbosoft.merman.syntax.front.FrontDataRootArray)
  • (symbol)
Required yes

field: middle

Values

Nested:

Any of (specify type):

  • (array)
  • (atom)
  • (primitive)
  • (record)
Required yes

field: tags

Values

Set of:

Any string
Required yes
top

field: infix

Values

List of:

Required no

field: prefix

Values

List of:

Required no

field: suffix

Values

List of:

Required no

field: tags

Values

Set of:

Any string
Required yes
top

field: animate_course_placement

Values
  • true
  • false
Required no
Default value false

field: animate_details

Values
  • true
  • false
Required no
Default value false

field: background

The background color of the document.

Values

Any of (specify type):

  • (rgb)
  • (rgba)
Required no

field: banner_pad

Pad the banner pane.

Values
Required no

field: converse_direction

The direction of text flow in a line. For English, this will be RIGHT. Note that values other than RIGHT may not work, since JavaFX has limited text direction support.

Values
Required no
Default value right

field: detail_pad

Pad the detail pane.

Values
Required no

field: detail_span

The max transverse span for details panes, excluding padding.

Values Any integer
Required no
Default value 300

field: ellipsize_threshold

Limit the window to this depth span.

Values Any integer
Required no
Default value 2147483647

field: gap

The gap type is used when editing the document, for new data whose type is not yet known.

Values
Required no

field: gap_choice_style

Style of the gap choice selection box.

Values
Required no

field: gap_placeholder

Placeholder for text in gap choice previews.

Values

Any of (specify type):

  • (image)
  • (space)
  • (text)
Required no

field: groups

Pseudo-types representing groups of types. Group ids can be used anywhere a type id is required.

Values

Nested:

List of:

Any string
Required no

field: lay_brick_batch_size

Generate bricks in this batch size when jumping, scrolling, and editing.

Values Any integer
Required no
Default value 10

field: modules

A list of modules to activate. Listed are modules bundled with this distribution, but addional modules may be installed and used.

Values

List of:

Any of (specify type):

  • (hover_type)
  • (indicators)
  • (lua_actions)
  • (modes)
  • (selection_type)
  • (hotkeys)
Required no

field: pad

Pad the document.

Values
Required no

field: placeholder

Character to substitute for non-printing characters in primitives.

Values Any string
Required no
Default value

field: prefix_gap

The prefix gap type is similar to the gap type, but is used when enclosing an existing atom in a new atom, where the new atom visually precedes the existing atom.

Values
Required no

field: pretty_save

Values
  • true
  • false
Required no
Default value false

field: retry_expand_factor

Retry course expansion when converse deficit has increased by this factor.

Values Any decimal value
Required no
Default value 1.25

field: root

The type of the root array in a document. This is not used when pasting code; in that case the context is used to determine the paste's potential root type.

Values
Required yes

field: scroll_alot_factor

Values Any decimal value
Required no
Default value 0.8

field: scroll_factor

Values Any decimal value
Required no
Default value 0.1

field: start_windowed

Values
  • true
  • false
Required no
Default value false

field: styles

Values

List of:

Required no

field: suffix_gap

The suffix gap type is similar to the gap type, but is used when enclosing an existing atom in a new atom, where the new atom visually succeeds the existing atom.

Values
Required no

field: transverse_direction

The direction of successive lines. For English, this will be DOWN.

Values
Required no
Default value down

field: type

Values
Required no
Default value luxem

field: types

The definitions of all distinct element types in a document.
A type with the id '__gap' and a single middle primitive element named 'value' must exist. This will be used as a placeholder when entering text before it is distinguishable as any other defined element.

Values

List of:

Required yes
top

  • luxemBack parts and source files are in luxem format.
  • jsonBack parts and source files are in JSON format.
top

  • up
  • down
  • left
  • right
top

field: offset

Values Any integer
Required yes
top

This type has no fields.

top

field: base

Values Any string
Required yes

field: offset

Values Any integer
Required yes
top

field: elements

Values

List of:

Any of (specify type):

  • (array)
  • (data_array)
  • (data_atom)
  • (json_data_float)
  • (json_data_int)
  • (data_key)
  • (data_primitive)
  • (data_record)
  • (root_data_array)
  • (data_type)
  • (json_false)
  • (json_float)
  • (json_int)
  • (json_null)
  • (json_true)
  • (primitive)
  • (record)
  • (type)
Required yes

field: name

Values Any string
Required yes
top

field: middle

Values Any string
Required yes
top

field: middle

Values Any string
Required yes
top

field: middle

Values Any string
Required yes
top

field: middle

Values Any string
Required yes
top

field: middle

Values Any string
Required yes
top

field: middle

Values Any string
Required yes
top

field: middle

Values Any string
Required yes
top

field: middle

Values Any string
Required yes
top

field: type

Values Any string
Required yes

field: value

Values

Any of (specify type):

  • (array)
  • (data_array)
  • (data_atom)
  • (json_data_float)
  • (json_data_int)
  • (data_key)
  • (data_primitive)
  • (data_record)
  • (root_data_array)
  • (data_type)
  • (json_false)
  • (json_float)
  • (json_int)
  • (json_null)
  • (json_true)
  • (primitive)
  • (record)
  • (type)
Required yes
top

This type has no fields.

top

field: value

Values Any string
Required yes
top

field: value

Values Any string
Required yes
top

This type has no fields.

top

This type has no fields.

top

field: value

Values Any string
Required yes
top

field: pairs

Values

Nested:

Any of (specify type):

  • (array)
  • (data_array)
  • (data_atom)
  • (json_data_float)
  • (json_data_int)
  • (data_key)
  • (data_primitive)
  • (data_record)
  • (root_data_array)
  • (data_type)
  • (json_false)
  • (json_float)
  • (json_int)
  • (json_null)
  • (json_true)
  • (primitive)
  • (record)
  • (type)
Required yes
top

field: type

Values Any string
Required yes

field: value

Values

Any of (specify type):

  • (array)
  • (data_array)
  • (data_atom)
  • (json_data_float)
  • (json_data_int)
  • (data_key)
  • (data_primitive)
  • (data_record)
  • (root_data_array)
  • (data_type)
  • (json_false)
  • (json_float)
  • (json_int)
  • (json_null)
  • (json_true)
  • (primitive)
  • (record)
  • (type)
Required yes
top

field: elements

Values

List of:

Any of (specify type):

  • (lit)
  • (ref)
Required yes
top

field: value

Values Any string
Required yes
top

field: name

Values Any string
Required yes
top

field: invert

Values
  • true
  • false
Required no
Default value false

field: is

Values
Required yes
top

  • precedentShow if the atom is precedent relative to its parent.
top

field: invert

Values
  • true
  • false
Required no
Default value false

field: is

Values
Required yes

field: middle

Values Any string
Required yes
top

  • emptyShow if the value is empty.
top

field: ellipsis

How to visualize the ellipsis.

Values

Any of (specify type):

  • (image)
  • (space)
  • (text)
Required no

field: middle

Values Any string
Required yes

field: prefix

Values

List of:

Required no

field: separator

Values

List of:

Required no

field: suffix

Values

List of:

Required no

field: tag_first

Values
  • true
  • false
Required no
Default value false

field: tag_last

Values
  • true
  • false
Required no
Default value false

field: tags

Values

Set of:

Any string
Required yes
top

field: ellipsis

How to visualize the ellipsis.

Values

Any of (specify type):

  • (image)
  • (space)
  • (text)
Required no

field: hotkeys

Values

Nested:

Any of (specify type):

  • (seq)
  • (key)
  • (or)
Required no

field: middle

Values Any string
Required yes

field: tags

Values

Set of:

Any string
Required yes
top

field: hotkeys

Values

Nested:

Any of (specify type):

  • (seq)
  • (key)
  • (or)
Required no

field: middle

Values Any string
Required yes

field: tags

Values

Set of:

Any string
Required yes

field: tags

Values

Set of:

Any string
Required yes
top

field: ellipsis

How to visualize the ellipsis.

Values

Any of (specify type):

  • (image)
  • (space)
  • (text)
Required no

field: prefix

Values

List of:

Required no

field: separator

Values

List of:

Required no

field: suffix

Values

List of:

Required no

field: tag_first

Values
  • true
  • false
Required no
Default value false

field: tag_last

Values
  • true
  • false
Required no
Default value false

field: tags

Values

Set of:

Any string
Required yes
top

field: condition

Values

Any of (specify type):

  • (precedential)
  • (value)
Required no

field: gap_key

Use this string as a key for matching the atom when filling a gap. A text symbol by default uses the shown text.

Values Any string
Required no
Default value

field: tags

Values

Set of:

Any string
Required yes

field: type

Values

Any of (specify type):

  • (image)
  • (space)
  • (text)
Required yes
top

field: type

Values Any string
Required yes
top

field: type

Values Any string
Required yes
top

field: pattern

Values

Any of (specify type):

  • (any)
  • (digits)
  • (letters)
  • (maybe)
  • (seq)
  • (string)
  • (union)
  • (rep0)
  • (rep1)
Required no
top

field: type

Values Any string
Required yes
top

This type has no fields.

top

This type has no fields.

top

This type has no fields.

top

field: pattern

Values

Any of (specify type):

  • (any)
  • (digits)
  • (letters)
  • (maybe)
  • (seq)
  • (string)
  • (union)
  • (rep0)
  • (rep1)
Required yes
top

field: children

Values

List of:

Any of (specify type):

  • (any)
  • (digits)
  • (letters)
  • (maybe)
  • (seq)
  • (string)
  • (union)
  • (rep0)
  • (rep1)
Required yes
top

field: string

Values Any string
Required yes
top

field: children

Values

List of:

Any of (specify type):

  • (any)
  • (digits)
  • (letters)
  • (maybe)
  • (seq)
  • (string)
  • (union)
  • (rep0)
  • (rep1)
Required yes
top

field: pattern

Values

Any of (specify type):

  • (any)
  • (digits)
  • (letters)
  • (maybe)
  • (seq)
  • (string)
  • (union)
  • (rep0)
  • (rep1)
Required yes
top

field: pattern

Values

Any of (specify type):

  • (any)
  • (digits)
  • (letters)
  • (maybe)
  • (seq)
  • (string)
  • (union)
  • (rep0)
  • (rep1)
Required yes
top

field: fill

Values
  • true
  • false
Required no

field: fill_color

Values

Any of (specify type):

  • (rgb)
  • (rgba)
Required no

field: line

Values
  • true
  • false
Required no

field: line_color

Values

Any of (specify type):

  • (rgb)
  • (rgba)
Required no

field: line_thickness

Values Any decimal value
Required no

field: pad

Values Any integer
Required no

field: round_end

Values
  • true
  • false
Required no

field: round_outer_edges

Values
  • true
  • false
Required no

field: round_radius

Values Any integer
Required no

field: round_start

Values
  • true
  • false
Required no
top

field: b

Values Any decimal value
Required yes

field: g

Values Any decimal value
Required yes

field: r

Values Any decimal value
Required yes
top

field: a

Values Any decimal value
Required yes

field: b

Values Any decimal value
Required yes

field: g

Values Any decimal value
Required yes

field: r

Values Any decimal value
Required yes
top

field: fill

Values
  • true
  • false
Required no

field: fill_color

Values

Any of (specify type):

  • (rgb)
  • (rgba)
Required no

field: line

Values
  • true
  • false
Required no

field: line_color

Values

Any of (specify type):

  • (rgb)
  • (rgba)
Required no

field: line_thickness

Values Any decimal value
Required no

field: pad

Values Any integer
Required no

field: round_concave

Values
  • true
  • false
Required no

field: round_end

Values
  • true
  • false
Required no

field: round_inner_edges

Values
  • true
  • false
Required no

field: round_outer_edges

Values
  • true
  • false
Required no

field: round_radius

Values Any integer
Required no

field: round_start

Values
  • true
  • false
Required no
top

field: align

Values Any string
Required no

field: box

Values
Required no

field: color

Values

Any of (specify type):

  • (rgb)
  • (rgba)
Required no

field: converse

Values Any integer
Required no

field: font

Values Any string
Required no

field: font_size

Values Any integer
Required no

field: image

Values Any string
Required no

field: obbox

Values
Required no

field: rotate

Values Any integer
Required no

field: space

Values Any integer
Required no

field: space_after

Values Any integer
Required no

field: space_before

Values Any integer
Required no

field: space_transverse_after

Values Any integer
Required no

field: space_transverse_before

Values Any integer
Required no

field: split

Values
  • true
  • false
Required no

field: transverse

Values Any integer
Required no

field: with

These tags must be present.

Values

Set of:

Any of (specify type):

  • (free)
  • (global)
  • (part)
  • (state)
  • (type)
Required yes

field: without

A style will apply to a brick if both the brick and the global tags contain none of these.

Values

Set of:

Any of (specify type):

  • (free)
  • (global)
  • (part)
  • (state)
  • (type)
Required no
top

This type has no fields.

top

This type has no fields.

top

field: text

Values Any string
Required yes