58 lines
1.5 KiB
Lua
58 lines
1.5 KiB
Lua
-- Plug 'rgroli/other.nvim'
|
|
require("other-nvim").setup({
|
|
mappings = {
|
|
-- custom mapping
|
|
{
|
|
pattern = "/src/(.*).cpp$",
|
|
target = "/include/%1.hpp",
|
|
transformer = "lowercase",
|
|
context = "header"
|
|
},
|
|
{
|
|
pattern = "/src/(.*).cpp$",
|
|
target = "/include/%1.h",
|
|
transformer = "lowercase",
|
|
context = "header"
|
|
},
|
|
{
|
|
pattern = "/src/(.*).hpp$",
|
|
target = "/include/%1.cpp",
|
|
transformer = "lowercase",
|
|
context = "source"
|
|
},
|
|
{
|
|
pattern = "/include/(.*).hpp$",
|
|
target = "/src/%1.cpp",
|
|
transformer = "lowercase",
|
|
context = "source"
|
|
},
|
|
{
|
|
pattern = "/include/(.*).h$",
|
|
target = "/src/%1.cpp",
|
|
transformer = "lowercase",
|
|
context = "source"
|
|
}
|
|
},
|
|
transformers = {
|
|
-- defining a custom transformer
|
|
lowercase = function (inputString)
|
|
return inputString:lower()
|
|
end
|
|
},
|
|
style = {
|
|
-- How the plugin paints its window borders
|
|
-- Allowed values are none, single, double, rounded, solid and shadow
|
|
border = "solid",
|
|
|
|
-- Column seperator for the window
|
|
seperator = "|",
|
|
|
|
-- width of the window in percent. e.g. 0.5 is 50%, is 100%
|
|
width = 0.7,
|
|
|
|
-- min height in rows.
|
|
-- when more columns are needed this value is extended automatically
|
|
minHeight = 2
|
|
},
|
|
})
|