lib/solargraph/language_server/host.rb
# Register the methods as capabilities with the client.
# This method will avoid duplicating registrations and ignore methods
# that were not flagged for dynamic registration by the client.
#
# @param methods [Array<String>] The methods to register
# @return [void]
Register the methods as capabilities with the client.
This method will avoid duplicating registrations and ignore methods
that were not flagged for dynamic registration by the client.
Register the methods as capabilities with the client . This method will avoid duplicating registrations and ignore methods that were not flagged for dynamic registration by the client .
def register_capabilities methods
        logger.debug "Registering capabilities: #{methods}"
        @register_semaphore.synchronize do
          send_request 'client/registerCapability', {
            registrations: methods.select{|m| can_register?(m) and !registered?(m)}.map { |m|
              @registered_capabilities.add m
              {
                id: m,
                method: m,
                registerOptions: dynamic_capability_options[m]
              }
            }
          }
        end
      end
def register_capabilities methods logger . debug "Registering capabilities: #{methods}" @register_semaphore . synchronize do send_request 'client/registerCapability' , { registrations : methods . select { | m | can_register? ( m ) and ! registered? ( m ) } . map { | m | @registered_capabilities . add m { id : m , method : m , registerOptions : dynamic_capability_options [ m ] } } } end end
Register the methods as capabilities with the client.
Register the methods as capabilities with the client .
None
void
methods
The methods to register
The methods to register