lib/solargraph/language_server/host.rb
def prepare directory, name = nil
        # No need to create a library without a directory. The generic library
        # will handle it.
        return if directory.nil?
        logger.info "Preparing library for #{directory}"
        path = ''
        path = normalize_separators(directory) unless directory.nil?
        begin
          lib = Solargraph::Library.load(path, name)
          libraries.push lib
        rescue WorkspaceTooLargeError => e
          send_notification 'window/showMessage', {
            'type' => Solargraph::LanguageServer::MessageTypes::WARNING,
            'message' => e.message
          }
        end
      end
# Prepare a library for the specified directory.
#
# @param directory [String]
# @param name [String, nil]
# @return [void]
Prepare a library for the specified directory.
Prepare a library for the specified directory .
def prepare directory, name = nil
        return if directory.nil?
        logger.info "Preparing library for #{directory}"
        path = ''
        path = normalize_separators(directory) unless directory.nil?
        begin
          lib = Solargraph::Library.load(path, name)
          libraries.push lib
        rescue WorkspaceTooLargeError => e
          send_notification 'window/showMessage', {
            'type' => Solargraph::LanguageServer::MessageTypes::WARNING,
            'message' => e.message
          }
        end
      end
def prepare directory , name = nil return if directory . nil? logger . info "Preparing library for #{directory}" path = '' path = normalize_separators ( directory ) unless directory . nil? begin lib = Solargraph :: Library . load ( path , name ) libraries . push lib rescue WorkspaceTooLargeError => e send_notification 'window/showMessage' , { 'type' => Solargraph :: LanguageServer :: MessageTypes :: WARNING , 'message' => e . message } end end
Prepare a library for the specified directory.
Prepare a library for the specified directory .
# No need to create a library without a directory. The generic library # will handle it.
None
void
directory
name
None