summaryrefslogtreecommitdiff
path: root/vis-lua.c
AgeCommit message (Collapse)Author
2016-04-20vis-lua: load files from directory specified with ./configure --sharedir=DIRMarc André Tanner
Close #231
2016-04-20vis-lua: trigger start event after ui has been initializedMarc André Tanner
2016-04-18vis-lua: strip relative paths from package.{path,cpath}Marc André Tanner
Allthough the default paths should take precedence we do not want to execute arbitrary code from the current working directory.
2016-04-18vis-lua: cleanup lua package.path handlingMarc André Tanner
2016-04-16vis-lua: add vis.mode propertyMarc André Tanner
2016-04-16vis-lua: add cursor.selection propertyMarc André Tanner
2016-04-16vis-lua: add window.cursors[] arrayMarc André Tanner
2016-04-16vis-lua: add window.cursors_iterator functionMarc André Tanner
2016-04-16vis-lua: add cursor.number propertyMarc André Tanner
2016-04-15vis-lua: change cursor object implementationMarc André Tanner
2016-04-15vis-lua: add file.size to return file size in bytesMarc André Tanner
2016-04-15vis-lua: add file.newlines to detect type of new linesMarc André Tanner
2016-03-21vis: also lookup Lua support files relative to the binary locationMarc André Tanner
This simplifies deployment of vis on remote systems without root access. The idea is to extract a statically linked binary together with the lexer syntax files into some directory, adjust $PATH to include it and have everything just work. For now this uses /proc/self/exe and thus only works on Linux based systems.
2016-03-12vis-lua: allow to set window.syntax = nilMarc André Tanner
This will load the default lua color theme.
2016-02-18vis-lua: add file:content(pos, len) functionMarc André Tanner
2016-02-18vis-lua: expose vis:textobject_registerMarc André Tanner
2016-02-18vis-lua: expose vis:textobject(id)Marc André Tanner
2016-02-18vis-lua: add vis:motion_register functionMarc André Tanner
It registers a lua function which will be called whenever the motion is used.
2016-02-18vis-lua: expose vis_motion to luaMarc André Tanner
2016-02-18vis-lua: expose mode constants to luaMarc André Tanner
2016-02-18vis-lua: expose win.syntaxMarc André Tanner
2016-02-18vis-lua: expose cursor:to(line, col)Marc André Tanner
2016-02-18vis-lua: promote vis to a real objectMarc André Tanner
That is from now on use vis:method instead of vis.method
2016-02-18vis: add possibility to bind keys to lua functionsMarc André Tanner
2016-01-30Improve Lua error reportingMarc André Tanner
Display Lua errors in a dedicated window/file. A typo or missing dependency (e.g. lpeg) in visrc.lua will no longer silently fail without any indication. The Lua integration in view.h is not yet converted.
2015-12-31vis-lua: implement vis.events.{start,quit} eventsMarc André Tanner
2015-12-31vis-lua: implement window.cursor.{line, col, pos}Marc André Tanner
These are currently read-only properties.
2015-12-31vis-lua: implement vis.lines[..] arrayMarc André Tanner
This allows access to specific lines of a file, array indicies/line numbers are 1 based. Read access is supported for [1, #lines] while assigning to the 0 element will insert a new line at the beginning of the file. Similarly assigning to lines[#lines+1] will add a new line at the end of the file. The returned lines will not contain any line termination characters.
2015-12-31vis-lua: implement vis.open(filename)Marc André Tanner
2015-12-31vis-lua: rename a few functionsMarc André Tanner
2015-12-31vis-lua: remove unnecessary castsMarc André Tanner
2015-12-29vis: fix default lua package.path and support $XDG_CONFIG_HOMEMarc André Tanner
The ordered list of paths for startup and lexer files is: - $VIS_PATH/{,lexers} - $XDG_CONFIG_HOME/vis/{,lexers} (defaulting to $HOME/.config/vis/{,lexers}) - /usr/local/share/vis/{,lexers} - /usr/share/vis/{,lexers} - package.path (standard lua search path)
2015-12-26vis: change Lua package.path to also include vis base directoryMarc André Tanner
2015-12-26vis: refactor Lua integrationMarc André Tanner
Lua support can now be disabled at compile time using: $ make CONFIG_LUA=0 This commit also adds an initial Lua API and provides a few default hooks. We now also require Lua >= 5.2 due to the uservalue constructs. In principle the same functionality could be implemented using function environments from Lua 5.1.