diff --git a/README.md b/README.md
index a32d2afd..62fe8c05 100644
--- a/README.md
+++ b/README.md
@@ -93,6 +93,7 @@ They are ordered by category, and you can make your own.
lazy.nvim
for more info on how to install plugins.
+
@@ -172,19 +173,22 @@ require('user').opts
- **NOTE: This is still a very early WIP.**
-### Check
+
+check
+
+
_**This is the most important utility for this config.**_ Of critical importance.
It provides a table with two
sub-tables. Both used for many conditional checks, aswell as module handling.
+
+
These are the following:
-
-
-value
-
+value
Used for value checking, differentiation and conditional code, aswell as
for optional parameters in functions.
@@ -192,44 +196,52 @@ It can be found in
user/check/value.lua
.
-| function | description | parameter types | return type |
-|:---------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------:|:-----------:|
-| `is_nil` | Checks whether the input values are `nil`
(AKA whether they even exist).
By default it checks for a single value,
but can be told to check for multiple
by setting the 2nd param as `true`. | `var`: `unknown\|table`, `multiple`: `boolean` (default: `false`) | `boolean` |
-| `is_str` | Checks whether the input values are of `string` type.
By default it checks for a single value,
but can be told to check for multiple
by setting the 2nd param as `true`. | _Same as `is_nil`_. | `boolean` |
-| `is_num` | Checks whether the input values are of `number` type.
By default it checks for a single value,
but can be told to check for multiple
by setting the 2nd param as `true`. | _Same as `is_nil`_. | `boolean` |
-| `is_bool` | Checks whether the input values are of `boolean` type.
By default it checks for a single value,
but can be told to check for multiple
by setting the 2nd param as `true`. | _Same as `is_nil`_. | `boolean` |
-| `is_fun` | Checks whether the input values are of `function` type.
By default it checks for a single value,
but can be told to check for multiple
by setting the 2nd param as `true`. | _Same as `is_nil`_. | `boolean` |
-| `is_tbl` | Checks whether the input values are of `table` type.
By default it checks for a single value,
but can be told to check for multiple
by setting the 2nd param as `true`. | _Same as `is_nil`._ | `boolean` |
-| `is_int` | Checks whether the input values are **integers**.
By default it checks for a single value,
but can be told to check for multiple
by setting the 2nd param as `true`. | _Same as `is_nil`._ | `boolean` |
-| `empty` | If input is a string, checks for an empty string.
If input is number, checks for value `0`.
If input is table, checks for an empty table. | `v`: `string\|number\|table` | `boolean` |
+
+
+| function | description | parameter types | return type |
+|:----------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:-----------------------------------------------------------------:|:-----------:|
+| `is_nil` | Checks whether the input values are `nil`
(AKA whether they even exist).
By default it checks for a single value,
but can be told to check for multiple
by setting the 2nd param as `true`. | `var`: `unknown\|table`, `multiple`: `boolean` (default: `false`) | `boolean` |
+| `is_str` | Checks whether the input values are of `string` type.
By default it checks for a single value,
but can be told to check for multiple
by setting the 2nd param as `true`. | _Same as `is_nil`_. | `boolean` |
+| `is_num` | Checks whether the input values are of `number` type.
By default it checks for a single value,
but can be told to check for multiple
by setting the 2nd param as `true`. | _Same as `is_nil`_. | `boolean` |
+| `is_bool` | Checks whether the input values are of `boolean` type.
By default it checks for a single value,
but can be told to check for multiple
by setting the 2nd param as `true`. | _Same as `is_nil`_. | `boolean` |
+| `is_fun` | Checks whether the input values are of `function` type.
By default it checks for a single value,
but can be told to check for multiple
by setting the 2nd param as `true`. | _Same as `is_nil`_. | `boolean` |
+| `is_tbl` | Checks whether the input values are of `table` type.
By default it checks for a single value,
but can be told to check for multiple
by setting the 2nd param as `true`. | _Same as `is_nil`._ | `boolean` |
+| `is_int` | Checks whether the input values are **integers**.
By default it checks for a single value,
but can be told to check for multiple
by setting the 2nd param as `true`. | _Same as `is_nil`._ | `boolean` |
+| `empty` | If input is a string, checks for an empty string.
If input is number, checks for value `0`.
If input is table, checks for an empty table. | `v`: `string\|number\|table` | `boolean` |
-
+
+
+
-
-
-exists
-
+exists
Used for data existance checks, conditional module loading and fallback operations.
It can be found in [`user/check/exists.lua`](/lua/user/check/exists.lua).
-| function | description | parameter types | return type |
-|:--------:|:-----------:|:---------------:|:-----------:|
-| `module` | Checks whether a `require(...)` statement is valid, given the input string.
If 2nd parameter is `true`, attempt to return said statement if the module can be found. | `mod`: `string`, `return_mod`: `boolean` (default: `false`) | `boolean\|unknown` |
-| `modules` | Checks whether multiple `require(...)` statements are valid, given the input strings.
If 2nd parameter is `false` then check for each string, then stop and return false if one is not valid.
If 2nd parameter is `true`, return a dictionary for each key as each input string,
and a boolean as its respective value. | `mod`: `string[]`, `need_all`: `boolean` (default: `false`) | `boolean\|table` |
-| `vim_exists` | Checks whether a string or multiple strings are true statements using the Vimscript `exists()` function.
If a string array is given, check each string and if any string is invalid, return `false`. Otherwise return `true` when finished. | `expr`: `string\|string[]` | `boolean` |
-| `vim_has` | Checks whether a string or multiple are true statements when using the Vimscript `has()` function.
If a string array is given, check each string and if any string is invalid, return `false`. Otherwise return `true` when finished. | `expr`: `string\|string[]` | `boolean` |
-| `vim_isdir` | Checks whether the string is a directory. | `path`: `string` | `boolean` |
-| `executable` | Checks whether one or multiple strings are executables found in `$PATH`.
If a string array is given, check each string and if any string is invalid and the `fallback` parameter is a function then execute the _fallback_ function.
This function will return the result regardless of whether `fallback` has been set or not. | `exe`: `string\|string[]`, `fallback`: `fun()` (default: `nil`) | `boolean` |
+| function | description | parameter types | return type |
+|:------------:|:-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------:|:---------------------------------------------------------------:|:---------------------------------:|
+| `module` | Checks whether a `require(...)` statement is valid, given the input string.
If 2nd parameter is `true`, attempt to return said statement if the module can be found. | `mod`: `string`, `return_mod`: `boolean` (default: `false`) | `boolean\|unknown` |
+| `modules` | Checks whether multiple `require(...)` statements are valid, given the input strings.
If 2nd parameter is `false` then check for each string, then stop and return false if one is not valid.
If 2nd parameter is `true`, return a dictionary for each key as each input string,
and a boolean as its respective value. | `mod`: `string[]`, `need_all`: `boolean` (default: `false`) | `boolean\|table` |
+| `vim_exists` | Checks whether a string or multiple strings are true statements using the Vimscript `exists()` function.
If a string array is given, check each string and if any string is invalid, return `false`. Otherwise return `true` when finished. | `expr`: `string\|string[]` | `boolean` |
+| `vim_has` | Checks whether a string or multiple are true statements when using the Vimscript `has()` function.
If a string array is given, check each string and if any string is invalid, return `false`. Otherwise return `true` when finished. | `expr`: `string\|string[]` | `boolean` |
+| `vim_isdir` | Checks whether the string is a directory. | `path`: `string` | `boolean` |
+| `executable` | Checks whether one or multiple strings are executables found in `$PATH`.
If a string array is given, check each string and if any string is invalid and the `fallback` parameter is a function then execute the _fallback_ function.
This function will return the result regardless of whether `fallback` has been set or not. | `exe`: `string\|string[]`, `fallback`: `fun()` (default: `nil`) | `boolean` |
-
-### Maps
-This module provides keymapping utilities, for each case available.
-
+
+
+
+
+maps
+
+
+This module provides keymapping utilities in a more
+complete, extensible and (hopefully) smarter way for the end user.
+
There are 3 fields which are tables that have the same function names,
but each one follows a specific behaviour:
@@ -271,25 +283,11 @@ maps.kmap.desc(msg, silent, bufnr, noremap, nowait, expr)
```
-
-maps.map.desc
-```lua
---- Returns a `vim.api.keyset.keymap` table
----@param msg: string Defaults do `'Unnamed Key'`
----@param silent? boolean Defaults to `true`
----@param noremap? boolean Defaults to `true`
----@param nowait? boolean Defaults to `true`
----@param expr? boolean Defaults to `false`
----@return vim.api.keyset.keymap
-maps.map.desc(msg, silent, noremap, nowait, expr)
-```
-
-
-maps.buf_map.desc
+maps.map.desc
/ maps.buf_map.desc
@@ -301,15 +299,13 @@ maps.map.desc(msg, silent, noremap, nowait, expr)
---@param nowait? boolean Defaults to `true`
---@param expr? boolean Defaults to `false`
---@return vim.api.keyset.keymap
-maps.buf_map.desc(msg, silent, noremap, nowait, expr)
+maps.map.desc(msg, silent, noremap, nowait, expr)
```
-
-
maps.wk