summaryrefslogtreecommitdiff
path: root/lua/nvim-treesitter/refactor/smart_rename.lua
diff options
context:
space:
mode:
authorStephan Seitz <stephan.seitz@fau.de>2020-07-04 18:28:17 +0200
committerThomas Vigouroux <39092278+vigoux@users.noreply.github.com>2020-07-05 19:21:06 +0200
commit5642507f6a35d2e25b1588a36d8ddfc525f1464d (patch)
treed95ae24b0220deb9ce8674fea83fa6aba0747240 /lua/nvim-treesitter/refactor/smart_rename.lua
parent1ce1c73249cf5620726f9b00fd58cac1747b1e70 (diff)
Make luacheck happy
Diffstat (limited to 'lua/nvim-treesitter/refactor/smart_rename.lua')
-rw-r--r--lua/nvim-treesitter/refactor/smart_rename.lua5
1 files changed, 2 insertions, 3 deletions
diff --git a/lua/nvim-treesitter/refactor/smart_rename.lua b/lua/nvim-treesitter/refactor/smart_rename.lua
index 8aab9538..e5ee37ac 100644
--- a/lua/nvim-treesitter/refactor/smart_rename.lua
+++ b/lua/nvim-treesitter/refactor/smart_rename.lua
@@ -35,7 +35,7 @@ function M.smart_rename(bufnr)
end
for _, node in ipairs(nodes_to_rename) do
- local start_row, start_col, end_row, end_col = node:range()
+ local start_row, start_col, _, end_col = node:range()
local line = api.nvim_buf_get_lines(bufnr, start_row, start_row + 1, false)[1]
if line then
@@ -56,10 +56,9 @@ function M.attach(bufnr)
end
function M.detach(bufnr)
- local buf = bufnr or api.nvim_get_current_buf()
local config = configs.get_module('refactor.smart_rename')
- for fn_name, mapping in pairs(config.keymaps) do
+ for _, mapping in pairs(config.keymaps) do
api.nvim_buf_del_keymap(bufnr, 'n', mapping)
end
end