diff --git a/src/lsp/__init__.py b/lsp/__init__.py similarity index 100% rename from src/lsp/__init__.py rename to lsp/__init__.py diff --git a/src/lsp/json_rpc_client.py b/lsp/json_rpc_client.py similarity index 100% rename from src/lsp/json_rpc_client.py rename to lsp/json_rpc_client.py diff --git a/src/lsp/lsp_structs.py b/lsp/lsp_structs.py similarity index 100% rename from src/lsp/lsp_structs.py rename to lsp/lsp_structs.py diff --git a/src/lsp/json_rpc_strcuts.py b/src/lsp/json_rpc_strcuts.py deleted file mode 100644 index c20ab37..0000000 --- a/src/lsp/json_rpc_strcuts.py +++ /dev/null @@ -1,113 +0,0 @@ -class Message(object): - """ - JSON RPC Base message class - """ - def __init__(self, jsonrpc): - """ - Constructs a new Message instance. - - :param string jsonrpc: jsonrpc version. Should be 2.0 - """ - super(Message, self) - self.jsonrpc = jsonrpc - - -class RequestMessage(Message): - ''' - JSON RPC Request message class - ''' - def __init__(self, jsonrpc, request_id, method, params): - ''' - Constructs a new RequestMessage instance. - - :param string jsonrpc: jsonrpc version. Should be 2.0 - :param int request_id: The request id. - :param string method: The method to be invoked. - :param list params: The method's params. - ''' - super(RequestMessage, self).__init__(jsonrpc) - self.id = request_id - self.method = method - self.params = params - - -class ResponseMessage(Message): - ''' - JSON RPC Response message class - ''' - def __init__(self, jsonrpc, request_id, result, error): - ''' - Constructs a new ResponseMessage instance. - - :param string jsonrpc: jsonrpc version. Should be 2.0 - :param int request_id: The request id. - :param result: The result of a request. This can be omitted in the case of an error. - :param ResponseError error: The error object in case a request fails. - ''' - super(ResponseMessage, self).__init__(jsonrpc) - self.id = request_id - self.result = result - self.error = error - - -class ResponseError(object): - ''' - ''' - def __init__(self, code, message, data): - ''' - Constructs a new ResponseError instance. - - :param int code: A number indicating the error type that occurred. - :param string message: A string providing a short description of the error. - :param data: A Primitive or Structured value that contains additional information about the error. Can be omitted. - ''' - super(ResponseError, self).__init__() - self.code = code - self.message = message - self.data = data - - -class ErrorCodes(object): - ''' - ''' - # Defined by JSON RPC - ParseError= -32700 - InvalidRequest = -32600 - MethodNotFound = -32601 - InvalidParams = -32602 - InternalError = -32603 - serverErrorStart = -32099 - serverErrorEnd = -32000 - ServerNotInitialized = -32002 - UnknownErrorCode = -32001 - - # Defined by the protocol. - RequestCancelled= -32800 - - -class NotificationMessage(Message): - ''' - ''' - def __init__(self, jsonrpc, method, params): - ''' - Constructs a new NotificationMessage instance. - - :param string jsonrpc: jsonrpc version. Should be 2.0 - :param string method: The method to be invoked. - :param list ResponseError params: The notification's params. - ''' - super(NotificationMessage, self).__init__(jsonrpc) - self.method = method - self.params = params - - -class CancelParams(object): - ''' - ''' - def __init__(self, request_id): - ''' - Constructs a new CancelParams instance. - - :param int request_id: The request id to cancel. - ''' - self.id = request_id diff --git a/src/lsp/lsp_client.py b/src/lsp/lsp_client.py deleted file mode 100644 index fffe1ac..0000000 --- a/src/lsp/lsp_client.py +++ /dev/null @@ -1,8 +0,0 @@ - - - -class LspClient(object): - def __init__(self, callbacks): - pass - - def initialize \ No newline at end of file