Screen.Recording.2024-05-02.at.12.29.22.mov
mexpr-lsp-demo.mov
code-lens.mov
- VS Code
- Make
- Node
- NPM
To be able to run this, two changes to the Miking codebase is needed:
- Remove custom colored output for Miking errors.
- Remove printing of dots when utests pass.
You can use this branch of Miking
make all
- Press
F5
in VS Code - Open
test.txt
- Try changing float values to integer values to see diagnostics
- The user opens a plaintext file in VS Code.
- The LSP client eventually sends a
textDocument/didChange
notification to the LSP client. - The LSP client forwards the message to the RPC Wrapper.
- The RPC Wrapper strips the RPC header*, and forwards the message to the Miking LSP server.
- The Miking LSP server parses the message, compiles the code, and sends a
textDocument/publishDiagnostics
notification with the results to the RPC Wrapper. - The RPC Wrapper wraps the JSON object with an RPC header, and forwards the message to the LSP client.
- The LSP client forwards the message to VS Code, which displays the diagnostics.
*The RPC header consists of the line Content-Length: <n>
, describing the length of the JSON body.
- The Miking LSP server doesn't support all LSP features, only the ones needed for this demo.