16 Commits

Author SHA1 Message Date
Zachary Yedidia
e634b4e180 Fix bug with init.lua 2016-08-25 17:29:58 -04:00
Zachary Yedidia
60b84c7aba Minor fixes and update runtime 2016-08-25 15:47:16 -04:00
Zachary Yedidia
0711c29c0a Add onBufferOpen plugin callback 2016-08-24 17:03:02 -07:00
Zachary Yedidia
f9e8a2426b Add support for init.lua file in ~/.config/micro 2016-08-20 10:22:28 -07:00
Zachary Yedidia
d17cc0f628 Add boolean option to actions to disable the lua callback 2016-08-17 14:16:27 -04:00
Zachary Yedidia
899b6a4a24 User plugins should replace default plugins
Fixes #208
2016-08-14 15:29:02 -04:00
Zachary Yedidia
92c28d81b9 Add preAction plugin callbacks which can return false to cancel the action 2016-07-14 13:53:38 -04:00
Zachary Yedidia
6665834cca Add autoclose plugin to handle autoclose for brackets, quotes etc...
The plugin adds an option `autoclose` to configure whether or not you
would like quotes, brackets etc... to be automatically closed. The
option is enabled by default.

Closes #176
2016-06-22 13:54:42 -04:00
Zachary Yedidia
77b6c2c486 Auto prefix for plugin functions
YOu no longer have to prefix all functions in a plugin with the plugin
name (linter_onSave). This will now be done automatically using lua's
setfenv. When passing a function as a callback to a editor function,
make sure to prefix the plugin name (linter.onExit, or go.goimports) so
that micro knows which plugin to call the function from.
2016-06-21 17:49:57 -04:00
Zachary Yedidia
d2277a376a Add support for job control
This commit adds support for job control (running processes
asynchronously from plugins) with the JobStart, JobSend, and JobStop
functions (copying neovim's job control).

This commit also makes the linter plugin work asynchronously, so the
editor won't be frozen while the linter checks your code for errors.
2016-06-15 11:19:00 -04:00
Zachary Yedidia
7adcb13c08 Add support for user-created commands
Plugins can now create their own commands using the `MakeCommand`
function. Plugins can also now create their own keybindings with the
`BindKey` function. See the go plugin for an example of `MakeCommand`.
2016-05-30 13:38:50 -04:00
Zachary Yedidia
68189fd406 Add ability to bind lua functions defined in plugins 2016-05-30 09:12:04 -04:00
Zachary Yedidia
1668e91310 Add linter plugin to easily make linters 2016-05-05 12:53:27 -04:00
Zachary Yedidia
d933efc53d Add hooks for every action that's bindable 2016-05-05 12:53:26 -04:00
Zachary Yedidia
a333f0ade2 Add default plugins, and install go plugin by default 2016-05-05 12:53:26 -04:00
Zachary Yedidia
603cec9d81 Load plugins from ~/.config/micro/plugins 2016-05-05 12:53:07 -04:00