From be888b94a15196c200a1a0042c57aa9f77d26125 Mon Sep 17 00:00:00 2001 From: ray-x Date: Tue, 31 Aug 2021 07:38:34 +1000 Subject: [PATCH] #53 remap for rename --- README.md | 2 +- lua/navigator/rename.lua | 3 ++- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ee8eeae..77dd679 100644 --- a/README.md +++ b/README.md @@ -301,7 +301,7 @@ require'navigator'.setup({ | n | \gT | treesitter symbol for all open buffers | | n | K | hover doc | | n | \ca | code action (when you see 💡 ) | -| n | \la | code lens action (when you see codelens indicator) | +| n | \la | code lens action (when you see a codelens indicator) | | v | \cA | range code action (when you see 💡 ) | | n | \rn | rename with floating window| | n | \re | rename (lsp default)| diff --git a/lua/navigator/rename.lua b/lua/navigator/rename.lua index d2d52ec..820461e 100644 --- a/lua/navigator/rename.lua +++ b/lua/navigator/rename.lua @@ -21,10 +21,11 @@ M.rename = function() border = "single" }) vim.api.nvim_win_set_option(winnr, "winhl", "Normal:Floating") + vim.api.nvim_buf_set_option(bufnr, "filetype", "guihua") util.map("n", "", "bd!", {silent = true, buffer = true}) util.map({"n", "i"}, "", "lua require('navigator.rename').callback()", {silent = true, buffer = true}) - util.map("i", "", "xi", {silent = true, buffer = true}) + util.map({"n", "i"}, "", [["_cl]], {silent = true, buffer = true}) vim.cmd(string.format("normal i%s", current_name)) end