From 30fac4206a393b05736199873bac87ecdfacd2a0 Mon Sep 17 00:00:00 2001 From: Michael Kwan Date: Mon, 25 Nov 2024 08:57:17 -0500 Subject: [PATCH] fix(java): minisurround jdtls keybind conflict (#4886) ## Description Fixes the keybind conflict with jdtls and mini-surround plugin. When pressing "\" or "\" to start the surround once the java language server starts, it replaces the surround bind with "goto super" and "goto subjects". When pressing "\" quickly, it attempts the command "goto super". When pressing "\" slowly, it brings up "which-key" and the surround bind works. ## Related Issue(s) None ## Screenshots Pressing "\" quickly ![image](https://github.com/user-attachments/assets/8fbaf39f-72cd-4d7d-bcf7-035faa7650e8) Pressing "\" slowly ![image](https://github.com/user-attachments/assets/2ec4d1f3-f900-413c-8351-26cb8a5cbafc) ## Checklist - [x] I've read the [CONTRIBUTING](https://github.com/LazyVim/LazyVim/blob/main/CONTRIBUTING.md) guidelines. --- lua/lazyvim/plugins/extras/lang/java.lua | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lua/lazyvim/plugins/extras/lang/java.lua b/lua/lazyvim/plugins/extras/lang/java.lua index 6b83fe29..9be1ea9c 100644 --- a/lua/lazyvim/plugins/extras/lang/java.lua +++ b/lua/lazyvim/plugins/extras/lang/java.lua @@ -197,8 +197,8 @@ return { { "cx", group = "extract" }, { "cxv", require("jdtls").extract_variable_all, desc = "Extract Variable" }, { "cxc", require("jdtls").extract_constant, desc = "Extract Constant" }, - { "gs", require("jdtls").super_implementation, desc = "Goto Super" }, - { "gS", require("jdtls.tests").goto_subjects, desc = "Goto Subjects" }, + { "cgs", require("jdtls").super_implementation, desc = "Goto Super" }, + { "cgS", require("jdtls.tests").goto_subjects, desc = "Goto Subjects" }, { "co", require("jdtls").organize_imports, desc = "Organize Imports" }, }, })