Skip to content

Commit

Permalink
feat: map <leader>r to Incremental LSP rename command
Browse files Browse the repository at this point in the history
  • Loading branch information
ttys3 committed Jun 4, 2022
1 parent 2d3a653 commit 27b4bb9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 3 deletions.
1 change: 0 additions & 1 deletion lua/config/nvim-lspconfig.lua
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ nnoremap { "<Leader>wa", "<cmd>lua vim.lsp.buf.add_workspace_folder()<CR>", sile
nnoremap { "<Leader>wr", "<cmd>lua vim.lsp.buf.remove_workspace_folder()<CR>", silent = true }
nnoremap { "<Leader>wl", "<cmd>lua print(vim.inspect(vim.lsp.buf.list_workspace_folders()))<CR>", silent = true }
nnoremap { "<Leader>D", "<cmd>lua vim.lsp.buf.type_definition()<CR>", silent = true }
nnoremap { "<Leader>rn", "<cmd>lua vim.lsp.buf.rename()<CR>", silent = true }
nnoremap { "<F2>", "<cmd>lua vim.lsp.buf.rename()<CR>", silent = true }
-- lspsaga currently can not popup with current name of the symbol in the popup
-- https://github.com/glepnir/lspsaga.nvim/issues/186
Expand Down
2 changes: 0 additions & 2 deletions lua/config/nvim-tree.lua
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
map { "<F4>", ":NvimTreeToggle<CR>" }
nnoremap { "<leader>f", ":NvimTreeToggle<CR>" }
nnoremap { "<leader>r", ":NvimTreeRefresh<CR>" }
nnoremap { "<leader>ff", ":NvimTreeFindFile<CR>" }
-- NvimTreeOpen and NvimTreeClose are also available if you need them
-- a list of groups can be found at `:help nvim_tree_highlight`
-- vim.cmd [[highlight NvimTreeFolderIcon guifg=#1b95e0]]
Expand Down
7 changes: 7 additions & 0 deletions lua/plugins.lua
Original file line number Diff line number Diff line change
Expand Up @@ -134,6 +134,13 @@ return require("packer").startup {
config = [[require('config.nvim-lspconfig')]],
}

use {
"smjonas/inc-rename.nvim",
config = function()
require("inc_rename").setup()
vim.keymap.set("n", "<leader>r", ":IncRename ")
end,
}
-- https://github.com/j-hui/fidget.nvim/blob/main/doc/fidget.md
-- Standalone UI for nvim-lsp progress
-- see https://github.com/j-hui/fidget.nvim/blob/main/lua/fidget/spinners.lua for predefined spinners
Expand Down

0 comments on commit 27b4bb9

Please sign in to comment.