Skip to content
This repository was archived by the owner on Mar 25, 2020. It is now read-only.
This repository was archived by the owner on Mar 25, 2020. It is now read-only.

Testing with the OCaml language server #10

Open

Description

This is a follow up from the discussion in the Reason editorsupport channel about using the language server for reason. I have moved the server out into a separate package at ocaml-language-server and the vscode reason client now uses this too.

The README describes the different ways to launch it. You should just be able to start it with ocaml-language-server --stdio if you want to run it over stdio.

Let me know if you try it and run into problems. There are some custom requests used that I have not documented yet but you can find most of them here.

Activity

  1. tjdevries commented on Nov 22, 2016

    @tjdevries
    Owner

    Awesome! I will try that out over this week. That seems very straightforward. Thanks for your help!

  2. prabirshrestha commented on Nov 23, 2016

    @prabirshrestha
    Contributor

    Seems like having a doc section for all list of languages would be great

  3. tjdevries commented on Nov 23, 2016

    @tjdevries
    Owner

    I should point them to here: https://github.com/Microsoft/language-server-protocol/wiki/Protocol-Implementations

    I will add this to the docs.

  4. tjdevries commented on Nov 23, 2016

    @tjdevries
    Owner

    @freebroccolo Any idea why I would be getting this message?

    debug: Sending request: 158,
    {'id': 1, 
      'jsonrpc': '2.0', 
      'method': 'initialize', 
      'params': {'capabilities': {}, 'rootPath': 'file:///home/user/test/example-ocaml-merlin'}
    }
    
    Message was: {
      "response": {
        "id": 1,
        "jsonrpc": "2.0",
        "error": {
          "code": -32603,
          "message": "Request initialize failed with message: Cannot read property \"\"path\"\" of undefined"
        }
      },
      "request": {
        "id": 1,
        "jsonrpc": "2.0",
        "method": "initialize",
        "params": {
          "capabilities": {
            
          },
          "rootPath": "file:\/\/\/home\/user\/test\/example-ocaml-merlin"
        }
      }
    }
    error: Could not connect to: 158
    
  5. tjdevries commented on Nov 23, 2016

    @tjdevries
    Owner

    (I can post an issue, but I'm guess I'm just not setting something up correctly)

  6. tjdevries commented on Nov 26, 2016

    @tjdevries
    Owner

    So I'm trying to figure out how to respond to a few of your internal requests, and I'm not sure exactly what the response should look like.
    I have this situation currently:

    # I receive this and I'm not sure how to respond.
    info: ( 62:     on_request): {'request': {'id': 0, 'jsonrpc': '2.0', 'method': 'reason.client.giveWordAtPosition', 'params': {'uri': 'file:///home/tj/Downloads/example-ocaml-merlin/src/main.ml', 'position': {'character': 9, 'line': 6}}}}
    
  7. tjdevries commented on Nov 27, 2016

    @tjdevries
    Owner

    Do I just send the string directly or do I need to format it into a langserver message? I have it currently sending a langserver request, but it doesn't seem to be doing anything.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions