fix(java): minisurround jdtls keybind conflict (#4886)

## Description

Fixes the keybind conflict with jdtls and mini-surround plugin.

When pressing "\<gs\>" or "\<gS\>" to start the surround once the java
language server starts,
it replaces the surround bind with "goto super" and "goto subjects".

When pressing "\<gs\>" quickly, it attempts the command "goto super".
When pressing "\<gs\>" slowly, it brings up "which-key" and the surround
bind works.

## Related Issue(s)

None

## Screenshots
Pressing "\<gs\>" quickly

![image](https://github.com/user-attachments/assets/8fbaf39f-72cd-4d7d-bcf7-035faa7650e8)

Pressing "\<gs\>" 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.
This commit is contained in:
Michael Kwan 2024-11-25 08:57:17 -05:00 committed by GitHub
parent c979225c37
commit 30fac4206a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -197,8 +197,8 @@ return {
{ "<leader>cx", group = "extract" },
{ "<leader>cxv", require("jdtls").extract_variable_all, desc = "Extract Variable" },
{ "<leader>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" },
{ "<leader>cgs", require("jdtls").super_implementation, desc = "Goto Super" },
{ "<leader>cgS", require("jdtls.tests").goto_subjects, desc = "Goto Subjects" },
{ "<leader>co", require("jdtls").organize_imports, desc = "Organize Imports" },
},
})