Skip to content

A Miking Language Server Protocol (LSP) implementation

Notifications You must be signed in to change notification settings

miking-lang/miking-lsp

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 

Repository files navigation

Miking-LSP

A Miking Language Server Protocol (LSP) implementation

The goals of the Miking-LSP project are to:

  • Implement the LSP protocol in MCore.

  • Implement an LSP language server for Miking in MCore.

  • Provide IDE features for both the Miking Core language itself and user-created DSLs using the server.

Getting started

To get started, follow the instructions at the main Miking repo to install Miking along with its standard library.

More instructions to come.

Current status

Currently, this repository contains the following:

  • An implementation of the JSON-RPC, which the LSP protocol is built upon, in json-rpc.mc.

  • An architecture for an LSP server, in lsp.mc. In the file, a more detailed description can be found.

  • A dummy server, at main.mc. Currently, all the server does is read messages from stdin, parse them as JSON-RPC and print them out again. To try it, run for instance:

    cat test/msg2.test | mi src/mcore-lsp-server/main.mc
    

    which should output

    {"jsonrpc": "2.0", "method": "shutdown", "params": {}, "id": 3}
    
    FILE "/path/to/miking-lsp/src/lsp/lsp.mc" 55:7-55:38 ERROR: Unexpected end of input
    

    The error is expected as the server should normally keep receiving input until a shutdown message is received.

Also, a few example LSP messages can be found in the test folder.

What is missing is the main part of the protocol's data structures (data types describing the different kinds of requests, notifications and parameters) and a proper server implementation for the Miking system.

The OCaml LSP codebase has been used as a reference for this project.

About

A Miking Language Server Protocol (LSP) implementation

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •