1.5 KiB
Specification Switcher
TOC
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: <leader>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="<leader>sw",
open_in_new_tab=true
})
Roadmap
Rewriting path.lua into a pathlib equivalent
Plenary.nvim already creates a path library in lua equivalent to the
python Pathlib library. The plenary.nvim library is still based on
a string path, and I would like to see a more array based internal
representation.