-local function StartsWith(String,Start)
- String = String:upper()
- Start = Start:upper()
- return string.sub(String,1,string.len(Start))==Start
-end
-
-function complete(input)
- local allCompletions = {"Hello", "World", "Foo", "Bar"}
- local result = {}
-
- for i,v in pairs(allCompletions) do
- if StartsWith(v, input) then
- table.insert(result, v)
- end
- end
- return result
-end
-
-function foo(arg)
- messenger:Message(arg)
-end
-
-MakeCommand("foo", "example.foo", MakeCompletion("example.complete"))
-```
-
-# Default plugins
-
-For examples of plugins, see the default `autoclose` and `linter` plugins
-(stored in the normal micro core repo under `runtime/plugins`) as well as
-any plugins that are stored in the official channel [here](https://github.com/micro-editor/plugin-channel).
-
-# Plugin Manager
-
-Micro also has a built in plugin manager which you can invoke with the `> plugin ...` command.
-
-For the valid commands you can use, see the `command` help topic.
-
-The manager fetches plugins from the channels (which is simply a list of plugin metadata)
-which it knows about. By default, micro only knows about the official channel which is located
-at github.com/micro-editor/plugin-channel but you can add your own third-party channels using
-the `pluginchannels` option and you can directly link third-party plugins to allow installation
-through the plugin manager with the `pluginrepos` option.
-
-If you'd like to publish a plugin you've made as an official plugin, you should upload your
-plugin online (to Github preferably) and add a `repo.json` file. This file will contain the
-metadata for your plugin. Here is an example:
-
-```json
-[{
- "Name": "pluginname",
- "Description": "Here is a nice concise description of my plugin",
- "Tags": ["python", "linting"],
- "Versions": [
- {
- "Version": "1.0.0",
- "Url": "https://github.com/user/plugin/archive/v1.0.0.zip",
- "Require": {
- "micro": ">=1.0.3"
- }
- }
- ]
-}]