]> git.lizzy.rs Git - micro.git/blobdiff - runtime/help/plugins.md
Merge pull request #998 from JoshuaRLi/select-line-action
[micro.git] / runtime / help / plugins.md
index 763f015c91b416a4d064b2e81117568205152806..c890b971e7594fc09805ce9a4e2f7d24a32a7fc6 100644 (file)
@@ -45,6 +45,8 @@ view is passed in. This is useful for setting local options based on the
 filetype, for example turning off `tabstospaces` only for Go files when they are
 opened.
 
+Similar to `onViewOpen(view)` there is also `onBufferOpen(buf)`.
+
 ---
 
 There are a number of functions and variables that are available to you in order
@@ -199,7 +201,7 @@ standard library.
 Simply import the package you'd like and then you can use it. For example:
 
 ```lua
-local ioutil = import("ioutil")
+local ioutil = import("io/ioutil")
 local fmt = import("fmt")
 
 local data, err = ioutil.ReadFile("SomeFile.txt")
@@ -216,10 +218,30 @@ else
 end
 ```
 
-For a full list of which packages and functions from the standard library you
-can access, look at `lua.go` in the source code (it shouldn't be too hard to
-look through).
+Here are the packages from the Go standard library that you can access.
+Nearly all functions from these packages are supported. For an exact
+list of which functions are supported you can look through `lua.go`
+(which should be easy to understand).
+
+```
+fmt
+io
+io/ioutil
+net
+math
+math/rand
+os
+runtime
+path
+filepath
+strings
+regexp
+errors
+time
+```
 
+For documentation for each of these functions, you can simply look
+through the Go standard library documentation.
 
 ## Adding help files, syntax files, or colorschemes in your plugin