-
-
Notifications
You must be signed in to change notification settings - Fork 83
Expand file tree
/
Copy pathjava.lua
More file actions
30 lines (21 loc) · 938 Bytes
/
java.lua
File metadata and controls
30 lines (21 loc) · 938 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
local java = require('java')
local function c(cmd, callback, opts)
vim.api.nvim_create_user_command(cmd, callback, opts or {})
end
local cmd_map = {
JavaSettingsChangeRuntime = { java.settings.change_runtime },
JavaDapConfig = { java.dap.config_dap },
JavaTestRunCurrentClass = { java.test.run_current_class },
JavaTestDebugCurrentClass = { java.test.debug_current_class },
JavaTestRunCurrentMethod = { java.test.run_current_method },
JavaTestDebugCurrentMethod = { java.test.debug_current_method },
JavaTestViewLastReport = { java.test.view_last_report },
JavaRunnerRunMain = { java.runner.built_in.run_app, { nargs = '?' } },
JavaRunnerStopMain = { java.runner.built_in.stop_app },
JavaRunnerToggleLogs = { java.runner.built_in.toggle_logs },
JavaRunnerSwitchLogs = { java.runner.built_in.switch_app },
JavaProfile = { java.profile.ui },
}
for cmd, details in pairs(cmd_map) do
c(cmd, details[1], details[2])
end