diff --git a/README.md b/README.md index e69de29..537f195 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,54 @@ +# Specification Switcher + +## TOC + +1. [Installation](#-Installation) +2. [Getting Started](#-Getting-Started) + +## Installation + +`SpecSwitcher` is not yet hosted on Github, so installing the plugin may +need some additional steps. Additionaly, the minimum version for each +API call hasn't been tracked yet so for now the official supported neovim +version is v0.10+ + +### Install using packer + +`Packer` allows the use of a complete URL, which can then be renamed for +ease of use. + +``` +use { + 'https://git.folkert-kevelam.nl/folkert/Neovim-SpecSwitcher.git', + as = 'SpecSwitcher' +} +``` + +## Getting Started + +The plugin consists of two public functions: `setup()` and `Switch()`. +`setup()` is required since it sets the extension mapping and allowed +descend directories. + +### Quick Note + +As of the moment of writing, the `setup()` functions already sets a keymap +for the switch: `n`. If you want a different shortcut, the option +`switch_shortcut` in the setup can be used. + +### Basic Setup + +``` +require('SpecSwitcher').setup({ + descend_dirs={ + "include", + "src" + }, + extensions={ + {"ads", "adb"}, + {"c", {"h", "H", "hh"}}, + {"C", {"H", "HH"}}, + }, + switch_shortcut="sw" +}) +```