diff options
| author | Steven Sojka <steelsojka@users.noreply.github.com> | 2020-08-22 09:10:28 -0500 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2020-08-22 09:10:28 -0500 |
| commit | 3b2cb65d4cfc6e86026f8cc6bf63c180d271ebe3 (patch) | |
| tree | 462836d0e88a0672ccf538d81ddf80011493d56b /lua/nvim-treesitter/refactor | |
| parent | 53fda90be0ae56b6b8b47af1f8a86733447532c5 (diff) | |
| parent | 3fe8bbcf9c238c70ffd7a01982d98981b346984e (diff) | |
Merge pull request #330 from steelsojka/fix-do-not-reattach
fix(modules): do not reattach if already attached
Diffstat (limited to 'lua/nvim-treesitter/refactor')
4 files changed, 0 insertions, 7 deletions
diff --git a/lua/nvim-treesitter/refactor/highlight_current_scope.lua b/lua/nvim-treesitter/refactor/highlight_current_scope.lua index 8b785ef8..ef695f7b 100644 --- a/lua/nvim-treesitter/refactor/highlight_current_scope.lua +++ b/lua/nvim-treesitter/refactor/highlight_current_scope.lua @@ -27,8 +27,6 @@ function M.clear_highlights(bufnr) end function M.attach(bufnr) - local bufnr = bufnr or api.nvim_get_current_buf() - cmd(string.format('augroup NvimTreesitterCurrentScope_%d', bufnr)) cmd 'au!' -- luacheck: push ignore 631 diff --git a/lua/nvim-treesitter/refactor/highlight_definitions.lua b/lua/nvim-treesitter/refactor/highlight_definitions.lua index 8a75980d..d430d38a 100644 --- a/lua/nvim-treesitter/refactor/highlight_definitions.lua +++ b/lua/nvim-treesitter/refactor/highlight_definitions.lua @@ -39,8 +39,6 @@ function M.clear_usage_highlights(bufnr) end function M.attach(bufnr) - local bufnr = bufnr or api.nvim_get_current_buf() - cmd(string.format('augroup NvimTreesitterUsages_%d', bufnr)) cmd 'au!' -- luacheck: push ignore 631 diff --git a/lua/nvim-treesitter/refactor/navigation.lua b/lua/nvim-treesitter/refactor/navigation.lua index 5f5eebd5..185cce89 100644 --- a/lua/nvim-treesitter/refactor/navigation.lua +++ b/lua/nvim-treesitter/refactor/navigation.lua @@ -49,8 +49,6 @@ function M.list_definitions(bufnr) end function M.attach(bufnr) - local bufnr = bufnr or api.nvim_get_current_buf() - local config = configs.get_module('refactor.navigation') for fn_name, mapping in pairs(config.keymaps) do diff --git a/lua/nvim-treesitter/refactor/smart_rename.lua b/lua/nvim-treesitter/refactor/smart_rename.lua index 877da44e..711ab993 100644 --- a/lua/nvim-treesitter/refactor/smart_rename.lua +++ b/lua/nvim-treesitter/refactor/smart_rename.lua @@ -46,7 +46,6 @@ function M.smart_rename(bufnr) end function M.attach(bufnr) - local bufnr = bufnr or api.nvim_get_current_buf() local config = configs.get_module('refactor.smart_rename') for fn_name, mapping in pairs(config.keymaps) do |
