Ignore:
Timestamp:
Apr 6, 2020, 1:28:00 PM (4 years ago)
Author:
Thierry Delisle <tdelisle@…>
Branches:
ADT, arm-eh, ast-experimental, enum, forall-pointer-decay, jacob/cs343-translation, master, new-ast, new-ast-unique-expr, pthread-emulation, qualifiedEnum
Children:
057298e
Parents:
b52abe0
Message:

Added basic language server which now properly communicates with the client

Location:
tools/vscode/uwaterloo.cforall-0.1.0
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • tools/vscode/uwaterloo.cforall-0.1.0/client/main.js

    rb52abe0 rebe0f0d  
    2323        // Otherwise the run options are used
    2424        let serverOptions = {
    25                 run: { command: 'cfa-ls', transport: vscode_lc.TransportKind.ipc },
     25                run: { command: 'cfa-ls', transport: vscode_lc.TransportKind.stdio },
    2626                debug: {
    2727                        command: 'cfa-ls',
    28                         transport: vscode_lc.TransportKind.ipc,
     28                        transport: vscode_lc.TransportKind.stdio,
    2929                        options: debugOptions
    3030                }
     
    3232
    3333        // Options to control the language client
     34        let selector = [{ scheme: 'file', language: 'cforall' }];
    3435        let clientOptions = {
    35                 // Register the server for plain text documents
    36                 documentSelector: [{ scheme: 'file', language: 'cforall' }]
     36                // Register the server for cforall documents
     37                documentSelector: selector
    3738        };
    3839
    3940        // Create the language client and start the client.
    4041        client = new vscode_lc.LanguageClient(
    41                 'CforallServer',
     42                'cforall',
    4243                'Cforall Language Server',
    4344                serverOptions,
  • tools/vscode/uwaterloo.cforall-0.1.0/package.json

    rb52abe0 rebe0f0d  
    4343                                "path": "./syntaxes/cfa.tmLanguage.json"
    4444                        }
    45                 ]
    46         },
    47         "configuration": {
    48                 "type": "object",
    49                 "title": "Example configuration",
    50                 "properties": {
    51                         "languageServerExample.maxNumberOfProblems": {
    52                                 "scope": "resource",
    53                                 "type": "number",
    54                                 "default": 100,
    55                                 "description": "Controls the maximum number of problems produced by the server."
     45                ],
     46                "configuration": {
     47                        "type": "object",
     48                        "title": "Example configuration",
     49                        "properties": {
     50                                "cforall.maxNumberOfProblems": {
     51                                        "scope": "resource",
     52                                        "type": "number",
     53                                        "default": 100,
     54                                        "description": "Controls the maximum number of problems produced by the server."
     55                                },
     56                                "cforall.trace.server": {
     57                                        "scope": "window",
     58                                        "type": "string",
     59                                        "enum": [
     60                                                "off",
     61                                                "messages",
     62                                                "verbose"
     63                                        ],
     64                                        "default": "off",
     65                                        "description": "Traces the communication between VS Code and the language server."
     66                                }
    5667                        }
    5768                }
Note: See TracChangeset for help on using the changeset viewer.