Nvim: restructure all plugins configuration
This commit is contained in:
67
.config/nvim/after/available/other.rc.lua
Normal file
67
.config/nvim/after/available/other.rc.lua
Normal file
@@ -0,0 +1,67 @@
|
||||
-- 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
|
||||
},
|
||||
})
|
||||
|
||||
vim.api.nvim_set_keymap("n", "<leader>ll", "<cmd>:Other<CR>", { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<leader>lp", "<cmd>:OtherSplit<CR>", { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<leader>lv", "<cmd>:OtherVSplit<CR>", { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<leader>lc", "<cmd>:OtherClear<CR>", { noremap = true, silent = true })
|
||||
|
||||
-- Context specific bindings
|
||||
vim.api.nvim_set_keymap("n", "<leader>lt", "<cmd>:Other test<CR>", { noremap = true, silent = true })
|
||||
vim.api.nvim_set_keymap("n", "<leader>ls", "<cmd>:Other scss<CR>", { noremap = true, silent = true })
|
||||
Reference in New Issue
Block a user