@@ -43,18 +43,6 @@ function JdtlsClient:_init(client)
4343 self .client = client
4444end
4545
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-
5846--- Sends a LSP request
5947--- @param method java-core.JdtlsRequestMethod
6048--- @param params lsp.ExecuteCommandParams
@@ -77,6 +65,16 @@ function JdtlsClient:request(method, params, buffer)
7765 end )
7866end
7967
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+
8078--- Executes a workspace/executeCommand and returns the result
8179--- @param command string workspace command to execute
8280--- @param params ? lsp.LSPAny[]
@@ -90,7 +88,7 @@ function JdtlsClient:workspace_execute_command(command, params, buffer)
9088end
9189
9290--- Returns more information about the object the cursor is on
93- --- @param command jdtls.RequestMethod
91+ --- @param command java-core.JdtlsRequestMethod
9492--- @param params lsp.CodeActionParams
9593--- @param buffer ? number
9694--- @return jdtls.SelectionInfo[]
@@ -158,6 +156,14 @@ function JdtlsClient:get_capability(...)
158156 return capability
159157end
160158
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+
161167--- Returns true if the LS supports the given command
162168--- @param command_name string name of the command
163169--- @return boolean # true if the command is supported
0 commit comments