replace live-rename with rephrase
This commit is contained in:
parent
6f695cee9f
commit
8b38a13192
2 changed files with 8 additions and 32 deletions
|
|
@ -1,28 +0,0 @@
|
||||||
vim.schedule(function()
|
|
||||||
vim.pack.add({ "https://github.com/saecki/live-rename.nvim" })
|
|
||||||
require("live-rename").setup({
|
|
||||||
prepare_rename = true,
|
|
||||||
request_timeout = 1500,
|
|
||||||
show_other_ocurrences = true,
|
|
||||||
use_patterns = true,
|
|
||||||
scratch_register = "l",
|
|
||||||
keys = {
|
|
||||||
submit = {
|
|
||||||
{ "n", "<cr>" },
|
|
||||||
{ "v", "<cr>" },
|
|
||||||
{ "i", "<cr>" },
|
|
||||||
},
|
|
||||||
cancel = {
|
|
||||||
{ "n", "<esc>" },
|
|
||||||
{ "n", "q" },
|
|
||||||
},
|
|
||||||
},
|
|
||||||
hl = {
|
|
||||||
current = "CurSearch",
|
|
||||||
others = "Search",
|
|
||||||
},
|
|
||||||
})
|
|
||||||
vim.keymap.set("n", "<leader>r", function()
|
|
||||||
require("live-rename").rename({ cursorpos = 0 })
|
|
||||||
end)
|
|
||||||
end)
|
|
||||||
|
|
@ -1,4 +1,8 @@
|
||||||
vim.opt.runtimepath:append("/Users/larssonmartin/dev/git/nvim-rephrase")
|
vim.api.nvim_create_autocmd("LspAttach", {
|
||||||
if pcall(require, "rephrase") then
|
once = true,
|
||||||
require("rephrase").setup({})
|
callback = function()
|
||||||
end
|
vim.pack.add({ "https://github.com/LarssonMartin1998/nvim-rephrase" })
|
||||||
|
require("rephrase").setup({})
|
||||||
|
require("utils").set_keymap_list({ { "<leader>h", "<cmd>Rephrase<cr>" } })
|
||||||
|
end,
|
||||||
|
})
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue