lsp

package
v0.34.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 2, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package lsp implements a tiny Language Server Protocol server for MX Script. It speaks JSON-RPC 2.0 over stdio and exposes:

  • textDocument/didOpen, didChange, didClose, didSave — track buffers
  • textDocument/publishDiagnostics — parse errors as squiggles
  • textDocument/formatting — invoke mx fmt
  • textDocument/hover — minimal "did you mean ___" for builtins

Usage from VS Code (or any LSP client):

{
  "command": "mx",
  "args": ["lsp"],
  "filetypes": ["mxscript"]
}

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(r io.Reader, w io.Writer) error

Run reads JSON-RPC messages from r, replies on w, and only returns when the client closes stdin (or sends `shutdown` + `exit`).

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL