update some commands for jdtls

This commit is contained in:
christianchiarulli 2021-07-10 00:09:33 -04:00
parent 25b3334ba3
commit 92f6b59cda

View file

@ -18,11 +18,24 @@ if O.lang.java.java_tools.active then
cmd = { JAVA_LS_EXECUTABLE, WORKSPACE_PATH .. vim.fn.fnamemodify(vim.fn.getcwd(), ":p:h:t") },
}
vim.api.nvim_set_keymap(
"n",
"<leader>la",
":lua require('jdtls').code_action()<CR>",
{ noremap = true, silent = true }
)
vim.api.nvim_set_keymap(
"n",
"<leader>lR",
":lua require('jdtls').code_action(false, 'refactor')<CR>",
{ noremap = true, silent = true }
)
vim.cmd "command! -buffer JdtCompile lua require('jdtls').compile()"
vim.cmd "command! -buffer JdtUpdateConfig lua require('jdtls').update_project_config()"
vim.cmd "command! -buffer JdtJol lua require('jdtls').jol()"
-- vim.cmd "command! -buffer JdtJol lua require('jdtls').jol()"
vim.cmd "command! -buffer JdtBytecode lua require('jdtls').javap()"
vim.cmd "command! -buffer JdtJshell lua require('jdtls').jshell()"
-- vim.cmd "command! -buffer JdtJshell lua require('jdtls').jshell()"
else
local util = require "lspconfig/util"