-
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathclasspath.lua
More file actions
16 lines (16 loc) · 765 Bytes
/
classpath.lua
File metadata and controls
16 lines (16 loc) · 765 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
local M = {}
M.register_classpath_service = function(client)
client.handlers["sts/addClasspathListener"] = function(_, result)
local callbackCommandId = result.callbackCommandId
vim.lsp.commands[callbackCommandId] = function(param, _)
return require("spring_boot.util").boot_execute_command(callbackCommandId, param)
end
return require("spring_boot.jdtls").execute_command("sts.java.addClasspathListener", { callbackCommandId })
end
client.handlers["sts/removeClasspathListener"] = function(_, result)
local callbackCommandId = result.callbackCommandId
vim.lsp.commands[callbackCommandId] = nil
return require("spring_boot.jdtls").execute_command("sts.java.removeClasspathListener", { callbackCommandId })
end
end
return M