forked from nvim-java/nvim-java
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjava.lua
More file actions
56 lines (42 loc) · 1.71 KB
/
java.lua
File metadata and controls
56 lines (42 loc) · 1.71 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
local decomple_watch = require('java.startup.decompile-watcher')
local mason_dep = require('java.startup.mason-dep')
local nvim_dep = require('java.startup.nvim-dep')
local setup_wrap = require('java.startup.lspconfig-setup-wrap')
local test = require('java.api.test')
local dap = require('java.api.dap')
local global_config = require('java.config')
local M = {}
function M.setup(custom_config)
local config =
vim.tbl_deep_extend('force', global_config, custom_config or {})
nvim_dep.check()
local is_installing = mason_dep.install(config)
if not is_installing then
setup_wrap.setup(config)
decomple_watch.setup()
dap.setup_dap_on_lsp_attach()
end
end
----------------------------------------------------------------------
-- DAP APIs --
----------------------------------------------------------------------
M.dap = {}
M.dap.config_dap = dap.config_dap
----------------------------------------------------------------------
-- Test APIs --
----------------------------------------------------------------------
M.test = {}
M.test.run_current_class = test.run_current_class
M.test.debug_current_class = test.debug_current_class
M.test.run_current_method = test.run_current_method
M.test.debug_current_method = test.debug_current_method
M.test.view_last_report = test.view_last_report
----------------------------------------------------------------------
-- Manipulate --
----------------------------------------------------------------------
M.manipulate = {}
-- M.manipulate.organize_imports = {}
function M.__run()
test.debug_current_method()
end
return M