basex-lsp/README.md
2025-08-04 12:34:23 +01:00

1.4 KiB

Work in progress.

An attempt to write a Language Server Protocol server using XQuery 4.0 and the BaseX websocket feature.

Server

  • webapp/lsp The LSP implementation in XQuery using WebSockets for transport and the JSON-RPC 2.0 API for format.

Sample clients

  • webapp/static/codemirror A test html page using the CodeMirror6 editor that connects to the BaseX LSP instance
  • webapp/static/ace A test html page using the Ace editor that connects to the BaseX LSP instance

Uses

notes

java -cp org.eclipse.lemminx-uber.jar org.eclipse.lemminx.XMLServerSocketLauncher` Using https://github.com/mkslanc/ace-linters https://mkslanc.github.io/ace-linters/

Make a websocket server for lsp on port 3000 https://mkslanc.github.io/ace-linters/websocket.html

http://localhost:3000/exampleServer

c1b317e012/packages/demo/websockets-lsp/server/server.ts

https://www.jsonrpc.org/specification