aboutsummaryrefslogtreecommitdiff
path: root/vis-lua.h
AgeCommit message (Collapse)AuthorFilesLines
2024-04-29Emit an event (ui_draw) immediately before drawing the screenRudy Dellomas III1-0/+1
This allows better control over styling, as well as potential for entirely new UI elements implemented entirely using the Lua API.
2023-08-24Implementation of the non-blocking process running Lua APIxomachine1-0/+4
Rationale A modern text editor usually includes tools for helping user to avoid mistakes in texts. Those tools include spell checkers and programming language integrations. Though vis explicitly states that the full featured IDE is not a goal, implementing some of the tools might be achieved using its Lua API. Unfortunatelly the API misses the ability to start a process and to perform a communication with it without completely blocking the editor UI, which is crucial for any tool that performs background tracking of the inserted text (e. g. language servers). Implementation details New feature introduces new API method: communicate. The method start a new process and returns a handle to communicate with the process instantly. The patch inserts stderr and stdout file descriptors of the process to the pselect call of the main loop used for reading user input to track the process state without blocking the main loop until the process is finished. Any changes in the process state cause the iteration of the main loop and are being exposed to the Lua API as new event: PROCESS_RESPONSE.
2020-09-17Pass up terminal CSI as events to Lua.Ez Diy1-0/+1
2017-03-24vis-lua: removed unused function declarationMarc André Tanner1-1/+0
2017-03-19Move :set horizon option implementaiton to luaMarc André Tanner1-1/+1
2016-12-09vis-lua: expose input key event in insert and replace modesMarc André Tanner1-0/+7
2016-11-22vis-lua: introduce pre-save hookMarc André Tanner1-0/+1
The first argument is the file object while the second argument denotes the full path to which it will be written. Path might be `nil` if the file is going to be written to stdout. The Lua function is expected to return a boolean value indicating whether the write operation should proceed or be aborted.
2016-11-22vis-lua: pass path as second argument to file_save_post event hookMarc André Tanner1-1/+1
The passed path can be different from file.name for instance when opening a file `a` and then doing `:w b` where file.name will be the former and path the latter.
2016-11-21vis-lua: rename file_save event to file_save_postMarc André Tanner1-1/+1
Indicating that the event is triggered *after* a successfull write.
2016-11-05vis: display Lua package.cpath in :help outputMarc André Tanner1-2/+4
These paths are used to load the Lua LPeg module (lpeg.so) and are thus helpful when diagnosing setup problems in case syntax highlighting does not work.
2016-05-22vis: refactor status line handlingMarc André Tanner1-0/+1
Make window status bar content configurable via Lua.
2016-05-22vis: consider :set horizon setting when syntax highlightingMarc André Tanner1-1/+1
2016-05-22vis: move syntax highlighting to pure Lua codeMarc André Tanner1-0/+2
2016-04-23vis: display lua search paths in :help outputMarc André Tanner1-0/+6
2016-04-20vis-lua: trigger start event after ui has been initializedMarc André Tanner1-0/+1
2016-01-13Add -pedantic to debug CFLAGS and fix resulting warningsMarc André Tanner1-1/+1
2015-12-26vis: refactor Lua integrationMarc André Tanner1-0/+22
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.