Skip to content

Commit

Permalink
feat: Add a description for mappings
Browse files Browse the repository at this point in the history
  • Loading branch information
smoka7 authored and theHamsta committed Mar 20, 2023
1 parent 75f5895 commit dae2878
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lua/nvim-treesitter-refactor/navigation.lua
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ function M.attach(bufnr)
for fn_name, mapping in pairs(config.keymaps) do
local cmd = string.format([[:lua require'nvim-treesitter-refactor.navigation'.%s(%d)<CR>]], fn_name, bufnr)

api.nvim_buf_set_keymap(bufnr, "n", mapping, cmd, { silent = true, noremap = true })
api.nvim_buf_set_keymap(bufnr, "n", mapping, cmd, { silent = true, noremap = true, desc = fn_name })
end
end

Expand Down
2 changes: 1 addition & 1 deletion lua/nvim-treesitter-refactor/smart_rename.lua
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ function M.attach(bufnr)

for fn_name, mapping in pairs(config.keymaps) do
local cmd = string.format([[:lua require'nvim-treesitter-refactor.smart_rename'.%s(%d)<CR>]], fn_name, bufnr)
api.nvim_buf_set_keymap(bufnr, "n", mapping, cmd, { silent = true, noremap = true })
api.nvim_buf_set_keymap(bufnr, "n", mapping, cmd, { silent = true, noremap = true, desc = fn_name })
end
end

Expand Down

0 comments on commit dae2878

Please sign in to comment.