aboutsummaryrefslogtreecommitdiff
path: root/vis-lua.c
AgeCommit message (Collapse)AuthorFilesLines
2017-03-19vis-lua: allow operators to be defined as lua functionsMarc André Tanner1-0/+62
2017-03-19Move :set horizon option implementaiton to luaMarc André Tanner1-5/+3
2017-03-19Move :set theme option implementation to luaMarc André Tanner1-19/+0
2017-03-19Move :set syntax option implementation to luaMarc André Tanner1-55/+1
It is no longer possible to change the used syntax by assigning to the `win.syntax = name` field, instead the function win:set_syntax(name)` should be called. The distinction between filetype and syntax lexer to use should probably be clarified/cleaned up at some point.
2017-03-19vis-lua: make vis.win return nil if no window exists yetMarc André Tanner1-2/+4
This is only the case during editor startup before the first window is created.
2017-03-19vis-lua: expose option_unregister functionMarc André Tanner1-0/+16
2017-03-19vis-lua: expose option_register functionMarc André Tanner1-0/+54
2017-03-14Restructure display codeMarc André Tanner1-0/+5
Use pull instead of push based model for display code. Previously view.c was calling into the ui frontend code, with the new scheme this switches around: the necessary data is fetched by the ui as necessary. The UI independent display code is moved out of view.c/ui-curses.c into vis.c. The cell styles are now directly embedded into the Cell struct. New UI styles are introduced for: - status bar (focused / non-focused) - info message - window separator - EOF symbol You will have to update your color themes. The terminal output code is further abstracted into a generic ui-terminal.c part which keeps track of the whole in-memory cell matrix and #includes ui-terminal-curses.c for the actual terminal output. This architecture currently assumes that there are no overlapping windows. It will also allow non-curses based terminal user interfaces.
2017-03-07vis-lua: remove vis:open methodMarc André Tanner1-20/+0
The same functionality is available using vis:command and :open. If we decide a distinct API is useful, we should probably also provide a corresponding close method.
2017-03-05vis-lua: expose vis:pipe functionMarc André Tanner1-0/+35
2017-03-03vis-lua: add vis:exit functionMarc André Tanner1-0/+21
2017-03-02vis-lua: fix bogus URL in LDoc commentMarc André Tanner1-1/+1
2017-03-01vis-lua: fix invalid LDoc tagMarc André Tanner1-1/+1
2017-03-01vis-lua: make cursor.pos return nil if cursor position is invalidMarc André Tanner1-7/+12
It remains to be seen whether that is a good idea, but at least it will reveal possible bugs.
2017-03-01vis-lua: document cursor behaviorMarc André Tanner1-0/+50
2017-02-28vis-lua: correctly treat return value of input event handlerMarc André Tanner1-1/+1
Returning true from the event handler, indicating that the keys were consumed, should now prevent insertion as mentioned in the documentation. vis.events.subscribe(vis.events.INPUT, function(key) if key == ' ' then -- do something fancy here return true end end)
2017-02-28vis-lua: fix wrong return value when setting vis.countMarc André Tanner1-1/+1
2017-02-27vis-lua: make vis:win assignableAlexandre Rames1-0/+5
2017-02-23vis-lua: use shorter type namesMarc André Tanner1-10/+10
2017-02-23vis-lua: cleanup type checks by using #define'sMarc André Tanner1-68/+80
2017-02-23vis-lua: make vis:count assignableMarc André Tanner1-0/+10
2017-02-22vis-lua: expose current count specifier as vis:countMarc André Tanner1-0/+13
2017-02-22vis-lua: expose type meta tables through vis.typesMarc André Tanner1-5/+25
This should allow the Lua code to add new methods even if it has no existing object references.
2017-02-22lua: expose vis:module_exist method, load lexer and lpeg module during startupMarc André Tanner1-4/+6
2017-02-22vis-lua: check for nil return value of text object callbackMarc André Tanner1-1/+1
2017-02-02update comment and readme about lua pathChristian Hesse1-5/+5
Commit 3570869c removed the lexers sub directory from the Lua search path. Update the comment and readme to reflect this change.
2017-02-02add /etc/vis to lua path for system-wide configuration by administratorChristian Hesse1-0/+3
2017-01-27vis-lua: introduce vis:replace functionMarc André Tanner1-0/+20
2017-01-27vis-lua: introduce vis:insert functionMarc André Tanner1-0/+20
2017-01-15vis-lua: pass pending keys to lua key handling functionsMarc André Tanner1-8/+69
2017-01-14vis-lua: allow mode changes by setting vis.modeMarc André Tanner1-1/+14
2017-01-10vis-lua: expose register names as vis:register_names()Marc André Tanner1-1/+38
2017-01-10vis-lua: expose valid marks as vis:mark_names()Marc André Tanner1-0/+38
2016-12-31vis: allow user registered :-commands to specify a help textMarc André Tanner1-1/+3
2016-12-29vis-lua: allow vis:map to set up key aliases and actionsMarc André Tanner1-15/+51
2016-12-29vis-lua: introduce vis:action_registerMarc André Tanner1-0/+32
2016-12-29vis: cleanup key action lifetime managementMarc André Tanner1-13/+5
2016-12-29vis-lua: simplify lua function reference handlingMarc André Tanner1-31/+17
2016-12-29vis-lua: luaL_checkstring already checks for NULL return valueMarc André Tanner1-7/+6
2016-12-27vis: properly free dynamic key bindingsMarc André Tanner1-5/+5
The handling of :unmap needs to be revisited at some point.
2016-12-22vis-lua: store Vis context in upvalues where neededMarc André Tanner1-5/+8
2016-12-22text: change datatype of Mark to uintptr_tMarc André Tanner1-1/+1
This should avoid undefined pointer comparisons.
2016-12-19vis-lua: implement vis.registers[] arrayMarc André Tanner1-1/+58
Notice that currently only single letter register names/array indices are supported. Register handling needs to be cleaned up at some point.
2016-12-19vis-lua: simplify obj_ref_new error handlingMarc André Tanner1-10/+9
2016-12-19vis-lua: simplify object reference checkingMarc André Tanner1-163/+58
Make obj_ref_check handle invalid object references. The luaL_argerror function throws a Lua error and never returns, hence all return value checks become obsolete.
2016-12-19vis-lua: implement file.marks[] arrayMarc André Tanner1-0/+65
We need to retrieve a pointer to the File struct but can not store it directly in the Lua uservalue because the address is already used for the regular file object (of type vis.file). For now we use file->marks as an address and then use offsetof to retrieve the start of the struct.
2016-12-19vis-lua: implement file:mark_{get,set}Marc André Tanner1-0/+38
2016-12-13build: add configure options for built-in lpeg supportMarc André Tanner1-1/+1
2016-12-12Allow building lpeg into visMichael Forney1-0/+9
If lpeg is built statically, this allows for a completely static vis binary that still supports syntax highlighting.
2016-12-09vis-lua: add generic way to expose C text objects to LuaMarc André Tanner1-1/+41
Expose text_object_word as an example.