refactor: move keymap set to setup()

This commit is contained in:
Chen Asraf
2023-05-15 13:12:19 +03:00
parent e20a0c9c24
commit 25a0735474
2 changed files with 20 additions and 19 deletions

View File

@@ -146,14 +146,4 @@ if should_test then
print(k .. ": " .. "Hello-World" .. " => " .. tst("Hello-World"))
end
end
-- use input from current word in editor
vim.cmd("amenu Transforms.&camelCase :lua ReplaceCurrentWord(CamelCase)<CR>")
vim.cmd("amenu Transforms.&snake_case :lua ReplaceCurrentWord(SnakeCase)<CR>")
vim.cmd("amenu Transforms.&PascalCase :lua ReplaceCurrentWord(PascalCase)<CR>")
vim.cmd("amenu Transforms.&kebab-case :lua ReplaceCurrentWord(KebabCase)<CR>")
vim.cmd("amenu Transforms.&dot\\.case :lua ReplaceCurrentWord(DotCase)<CR>")
vim.cmd("amenu Transforms.&Title\\ Case :lua ReplaceCurrentWord(TitleCase)<CR>")
for kmap in _G.TextTransform.config.keymap do
vim.keymap.set({ "n", "v" }, kmap, "<cmd>popup Transforms<CR>", { silent = true })
end