Class: PlatformosCheck::LanguageServer::ClientCapabilities

Inherits:
Object
  • Object
show all
Defined in:
lib/platformos_check/language_server/client_capabilities.rb

Instance Method Summary collapse

Constructor Details

#initialize(capabilities) ⇒ ClientCapabilities

Returns a new instance of ClientCapabilities.



6
7
8
# File 'lib/platformos_check/language_server/client_capabilities.rb', line 6

def initialize(capabilities)
  @capabilities = capabilities
end

Instance Method Details

#initialization_option(key) ⇒ Object



22
23
24
# File 'lib/platformos_check/language_server/client_capabilities.rb', line 22

def initialization_option(key)
  @capabilities.dig(:initializationOptions, key)
end

#supports_work_done_progress?Boolean

Returns:

  • (Boolean)


10
11
12
# File 'lib/platformos_check/language_server/client_capabilities.rb', line 10

def supports_work_done_progress?
  @capabilities.dig(:window, :workDoneProgress) || false
end

#supports_workspace_configuration?Boolean

Returns:

  • (Boolean)


14
15
16
# File 'lib/platformos_check/language_server/client_capabilities.rb', line 14

def supports_workspace_configuration?
  @capabilities.dig(:workspace, :configuration) || false
end

#supports_workspace_did_change_configuration_dynamic_registration?Boolean

Returns:

  • (Boolean)


18
19
20
# File 'lib/platformos_check/language_server/client_capabilities.rb', line 18

def supports_workspace_did_change_configuration_dynamic_registration?
  @capabilities.dig(:workspace, :didChangeConfiguration, :dynamicRegistration) || false
end