aboutsummaryrefslogtreecommitdiff
path: root/doc/colorizer.txt
diff options
context:
space:
mode:
authorAkianonymus <anonymus.aki@gmail.com>2022-09-28 11:30:26 +0530
committerAkianonymus <anonymus.aki@gmail.com>2022-09-28 11:32:47 +0530
commit9dd7ecde55b06b5114e1fa67c522433e7e59db8b (patch)
treeee17dae71ec1a7bd2e96481c8de25efba2fca4a1 /doc/colorizer.txt
parentFix detach when setup is called multiple times | #25 (diff)
Generate missing docs for utils.lua
Diffstat (limited to 'doc/colorizer.txt')
-rw-r--r--doc/colorizer.txt122
1 files changed, 122 insertions, 0 deletions
diff --git a/doc/colorizer.txt b/doc/colorizer.txt
index 8dcaa11..0aaf865 100644
--- a/doc/colorizer.txt
+++ b/doc/colorizer.txt
@@ -706,4 +706,126 @@ Trie implementation in luajit.
todo: write documentation
+==============================================================================
+UTILS *colorizer.utils-introduction*
+
+Helper utils
+
+
+==============================================================================
+LUA API *colorizer.utils-lua-api*
+
+Functions: ~
+ |byte_is_alphanumeric| - Obvious.
+
+ |byte_is_hex| - Obvious.
+
+ |byte_is_valid_colorchar| - Valid colorchars are alphanumeric and - (
+ tailwind colors )
+
+ |get_last_modified| - Get last modified time of a file
+
+ |merge| - Merge two tables.
+
+ |parse_hex| - Obvious.
+
+ |percent_or_hex| - Obvious.
+
+ |watch_file| - Watch a file for changes and execute callback
+
+
+byte_is_alphanumeric({byte}) *colorizer.utils.byte_is_alphanumeric*
+ Obvious.
+
+ Parameters: ~
+ {byte} - number
+
+ returns:~
+ boolean
+
+
+
+byte_is_hex({byte}) *colorizer.utils.byte_is_hex*
+ Obvious.
+
+ Parameters: ~
+ {byte} - number
+
+ returns:~
+ boolean
+
+
+
+byte_is_valid_colorchar({byte}) *colorizer.utils.byte_is_valid_colorchar*
+ Valid colorchars are alphanumeric and - ( tailwind colors )
+
+ Parameters: ~
+ {byte} - number
+
+ returns:~
+ boolean
+
+
+
+get_last_modified({path}) *colorizer.utils.get_last_modified*
+ Get last modified time of a file
+
+ Parameters: ~
+ {path} - string: file path
+
+ returns:~
+ number or nil: modified time
+
+
+
+merge({...}) *colorizer.utils.merge*
+ Merge two tables.
+
+
+ todo: Remove this and use `vim.tbl_deep_extend`
+
+
+ Parameters: ~
+ {...} -
+
+ returns:~
+ table
+
+
+
+parse_hex({byte}) *colorizer.utils.parse_hex*
+ Obvious.
+
+ Parameters: ~
+ {byte} - number
+
+ returns:~
+ number
+
+
+
+percent_or_hex({v}) *colorizer.utils.percent_or_hex*
+ Obvious.
+
+ Parameters: ~
+ {v} - string
+
+ returns:~
+ number or nil
+
+
+
+watch_file({path}, {callback}, {...}) *colorizer.utils.watch_file*
+ Watch a file for changes and execute callback
+
+ Parameters: ~
+ {path} - string: File path
+ {callback} - function: Callback to execute
+ {...} - array: params for callback
+
+ returns:~
+ function or nil
+
+
+
vim:tw=80:ts=8:noet:ft=help:norl: