A standard module containing utility functions.
Make your code more explicit and meaningful.
Note that this library is a bit useless outside of Neovim since some functions require Neovim functions. It should be usable with any recent version of Neovim though.
At the moment, this plugin is under construction. Expect changes to the way it is structured.
Using Vim plug:
Plug 'Curs3W4ll/neokit'
Using Packer:
use "Curs3W4ll/neokit"
Using Lazy:
require("lazy").setup({
"Curs3W4ll/NeoKit",
})
Use it like any Lua module
local neokit = require("neokit")
print(neokit.str.ensureLastChar("Hello", "!")) -- Hello!
-- OR
local str = require("neokit.str")
print(str.ensureLastChar("Hello", "!")) -- Hello!
You can find more details about modules at https://curs3w4ll.github.io/NeoKit/
Help is welcome!
You are encouraged to submit new issues and pull requests to improve this plugin.
Please read the contribution guidelines first.
To ease interactions with the project, you can use the project's Makefile.
This Makefile defines a set of rules running commands for you.
You can execute make help
to get more details about Makefile rules defined for the project.
With the Makefile, you can run tests, linter, formatter, and generate documentation...
You can use make test
to run the project's unit test.
Test files are located under the tests/
directory.
Note that this will run every test of the project.
If you want to run a specific test, you can run only one test file by defining the TEST_FILE
argument.
make test TEST_FILE=arrray_spec.lua
To ease the unit tests development and the use of TDD method,
Important
These watchers are available for UNIX users only.
There are currently two watchers, one to run the linter, and one to run unit tests.
These watchers will execute the command again each time the code is modified.
make watch-lint
make watch-test
Note
You can use the TEST_FILE
argument with the watcher too
Some things are automatically done by the Github workflow made for the project.
Each time new code is pushed on the main
branch, the formatter will be launched automatically and the new version of the formatted code will be pushed.
Each time new code is pushed on the main
branch, the workflow will automatically generate a new version of the HTML documentation and publish it here.
Some checks (that are mandatory to merge a PR) are automatically done by workflow too.
Each time a new PR is created or updated, the workflow will automatically check if:
- Unit tests are passing
- Linter does not yell any warning