@@ -43,18 +43,6 @@ function JdtlsClient:_init(client)
43
43
self .client = client
44
44
end
45
45
46
- --- @param args ? { client : LspClient }
47
- --- @return java-core.JdtlsClient
48
- function JdtlsClient :new (args )
49
- local o = {
50
- client = (args or {}).client ,
51
- }
52
-
53
- setmetatable (o , self )
54
- self .__index = self
55
- return o
56
- end
57
-
58
46
--- Sends a LSP request
59
47
--- @param method java-core.JdtlsRequestMethod
60
48
--- @param params lsp.ExecuteCommandParams
@@ -77,6 +65,16 @@ function JdtlsClient:request(method, params, buffer)
77
65
end )
78
66
end
79
67
68
+ --- Sends a notification to LSP
69
+ --- Returns true if the notification sent successfully
70
+ --- @param method string
71
+ --- @param params table
72
+ --- @return boolean
73
+ function JdtlsClient :notify (method , params )
74
+ log .debug (' sending LSP notify: ' .. method )
75
+ return self .client .notify (method , params )
76
+ end
77
+
80
78
--- Executes a workspace/executeCommand and returns the result
81
79
--- @param command string workspace command to execute
82
80
--- @param params ? lsp.LSPAny[]
@@ -90,7 +88,7 @@ function JdtlsClient:workspace_execute_command(command, params, buffer)
90
88
end
91
89
92
90
--- Returns more information about the object the cursor is on
93
- --- @param command jdtls.RequestMethod
91
+ --- @param command java-core.JdtlsRequestMethod
94
92
--- @param params lsp.CodeActionParams
95
93
--- @param buffer ? number
96
94
--- @return jdtls.SelectionInfo[]
@@ -158,6 +156,14 @@ function JdtlsClient:get_capability(...)
158
156
return capability
159
157
end
160
158
159
+ --- comment
160
+ --- @param settings JavaConfigurationSettings
161
+ --- @return boolean
162
+ function JdtlsClient :workspace_did_change_configuration (settings )
163
+ local params = { settings = settings }
164
+ return self :notify (' workspace/didChangeConfiguration' , params )
165
+ end
166
+
161
167
--- Returns true if the LS supports the given command
162
168
--- @param command_name string name of the command
163
169
--- @return boolean # true if the command is supported
0 commit comments