LunarVim / starter.lvim

🚀 A great starting point for your LunarVim journey!

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

broken keybindings in java-ide

lluccia opened this issue · comments

There are some keybindings in java configuration file ftplugin/java.lua that are not working and breaking the ones configured after them.

map("n", "<leader>Co", jdtls.organize_imports(), "Organize Imports")
map("n", "<leader>Cv", jdtls.extract_variable(), "Extract Variable")
map("n", "<leader>Cc", jdtls.extract_constant(), "Extract Constant")
map("n", "<leader>Ct", jdtls.test_nearest_method(), "Test Method")
map("n", "<leader>CT", jdtls.test_class(), "Test Class")

I was able to fix them removing the parenthesis to pass the function reference to the keybinding function. (I guess that the functions were being executed instead)

 map("n", "<leader>Co", jdtls.organize_imports, "Organize Imports") 
 map("n", "<leader>Cv", jdtls.extract_variable, "Extract Variable") 
 map("n", "<leader>Cc", jdtls.extract_constant, "Extract Constant") 
 map("n", "<leader>Ct", jdtls.test_nearest_method, "Test Method") 
 map("n", "<leader>CT", jdtls.test_class, "Test Class") 

I had a difficult time to investigate that. I did not find any related error messages during the process.
Are there any logs in that scenario that I should have looked that would help?