55 lines
1.2 KiB
Markdown
55 lines
1.2 KiB
Markdown
# 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.
|
|
|
|
```lua
|
|
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: `<leader>n`. If you want a different shortcut, the option
|
|
`switch_shortcut` in the setup can be used.
|
|
|
|
### Basic Setup
|
|
|
|
```lua
|
|
require('SpecSwitcher').setup({
|
|
descend_dirs={
|
|
"include",
|
|
"src"
|
|
},
|
|
extensions={
|
|
{"ads", "adb"},
|
|
{"c", {"h", "H", "hh"}},
|
|
{"C", {"H", "HH"}},
|
|
},
|
|
switch_shortcut="<leader>sw"
|
|
})
|
|
```
|