diff --git a/darwin_build.sh b/darwin_build.sh deleted file mode 100755 index a4e02c2977c..00000000000 --- a/darwin_build.sh +++ /dev/null @@ -1 +0,0 @@ -/bin/bash -c "crystal build src/scry.cr --release -o build/darwin/x64/scry" diff --git a/src/scry/initialize.cr b/src/scry/initialize.cr deleted file mode 100644 index 4f450989b4b..00000000000 --- a/src/scry/initialize.cr +++ /dev/null @@ -1,28 +0,0 @@ -require "./workspace" - -module Scry - - class Initialize - - private getter workspace : Workspace - - def initialize(params : InitializeParams, @msg_id : Int32) - @workspace = Workspace.new( - root_path: params.root_path, - process_id: params.process_id, - max_number_of_problems: 100 - ) - ENV["CRYSTAL_PATH"] = %(#{@workspace.root_path}/lib:#{ENV["CRYSTAL_PATH"]}) - end - - def run - { @workspace, response } - end - - private def response - ServerCapabilities.new(@msg_id) - end - - end - -end diff --git a/src/scry/protocol/did_op_on_text_document_params.cr b/src/scry/protocol/did_op_on_text_document_params.cr deleted file mode 100644 index 9b1f420be50..00000000000 --- a/src/scry/protocol/did_op_on_text_document_params.cr +++ /dev/null @@ -1,12 +0,0 @@ -require "json" -require "./text_document_identifier" - -module Scry - - struct DidOpOnTextDocumentParams - JSON.mapping({ - text_document: { type: TextDocumentIdentifier, key: "textDocument" } - }) - end - -end \ No newline at end of file diff --git a/src/scry/protocol/ide_customizations.cr b/src/scry/protocol/ide_customizations.cr deleted file mode 100644 index d298ddaec0d..00000000000 --- a/src/scry/protocol/ide_customizations.cr +++ /dev/null @@ -1,15 +0,0 @@ -require "json" - -module Scry - - struct IDECustomizations - JSON.mapping({ - max_number_of_problems: { type: Int32, key: "maxNumberOfProblems" }, - backend: String, - custom_command: { type: String, key: "customCommand" }, - custom_command_args: { type: Array(String), key: "customCommandArgs" }, - log_level: { type: String, key: "logLevel" } - }, true) - end - -end diff --git a/src/scry/protocol/message.cr b/src/scry/protocol/message.cr deleted file mode 100644 index b63070e3955..00000000000 --- a/src/scry/protocol/message.cr +++ /dev/null @@ -1,68 +0,0 @@ -require "json" -require "./did_change_configuration_params" -require "./did_open_text_document_params" -require "./did_change_text_document_params" -require "./did_op_on_text_document_params" -require "./did_change_watched_files_params" -require "./initialize_params" - -module Scry - - struct RequestMessageNoParams - JSON.mapping({ - jsonrpc: String, - id: Int32, - method: String - }, true) - end - - struct RequestMessage - JSON.mapping({ - jsonrpc: String, - id: Int32, - method: String, - params: InitializeParams - }, true) - end - - struct Trace - JSON.mapping( - value: String - ) - end - - struct NotificationMessage - JSON.mapping({ - jsonrpc: String, - method: String, - params: ( - DidChangeConfigurationParams | - DidOpenTextDocumentParams | - DidChangeTextDocumentParams | - DidOpOnTextDocumentParams | - DidChangeWatchedFilesParams | - Trace - ) - }, true) - end - - class InvalidContentError < Exception; end - - MessageType = RequestMessage | NotificationMessage | RequestMessageNoParams - - struct Message - - def initialize(@json : String) - end - - def initialize(@json : Nil) - raise InvalidContentError.new("Expected procedure content") - end - - def parse - MessageType.from_json(@json || "") - end - - end - -end diff --git a/src/scry/protocol/notification.cr b/src/scry/protocol/notification.cr deleted file mode 100644 index 91720914503..00000000000 --- a/src/scry/protocol/notification.cr +++ /dev/null @@ -1,24 +0,0 @@ -module Scry - struct DiagnosticParams - JSON.mapping( - uri: String, - diagnostics: Array(Diagnostic) - ) - def initialize(@uri, @diagnostics) - end - end - - abstract struct Notification - JSON.mapping( - jsonrpc: String, - method: String, - params: DiagnosticParams - ) - - def initialize(@method, uri : String, diagnostics : Array(Diagnostic)) - @jsonrpc = "2.0" - @params = DiagnosticParams.new(uri, diagnostics) - end - - end -end diff --git a/src/scry/protocol/publish_diagnostics_notification.cr b/src/scry/protocol/publish_diagnostics_notification.cr deleted file mode 100644 index 8cc0ff1ffea..00000000000 --- a/src/scry/protocol/publish_diagnostics_notification.cr +++ /dev/null @@ -1,26 +0,0 @@ -require "json" -require "./notification" -require "./diagnostic" - -module Scry - struct PublishDiagnosticsNotification < Notification - @uri : String - @diagnostics : Array(Diagnostic) - - private property :uri - private property :diagnostics - - def self.empty(uri) - new(uri, [] of Diagnostic) - end - - def initialize(@uri, @diagnostics) - super("textDocument/publishDiagnostics", @uri, @diagnostics) - end - - - def empty? - diagnostics.empty? - end - end -end