arnoson / monaco-lua-example

An example setup using sumneko's Lua Language Server and JohnnyMorganz's StyLua together with Monaco Editor.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Note A lot of dependencies have changed and I don't have the capcity to keep this repo up to date. Maybe it will still be useful as a starting point.

Monaco Lua Example

An example setup using sumneko's Lua Language Server and JohnnyMorganz's StyLua together with Monaco Editor.

Features

  • ✨ Syntax Highlighting
  • 🚀 Autocompletion
  • 🌝 EmmyLua
  • ✔️ Linting
  • 🦀 Formatting (via wasm)
  • ⚡ Vite based client

Info

  • Right now I've tested the lua language server only on linux.
  • The language server uses port 8080, so make sure this port is free or change the port in client/src/main.ts and server/src/main.ts
  • This is an npm workspaces setup, so you can run alle npm scripts inside the repository's root folder.

Get started

Clone this repository and run run npm install.

Development

Run npm run dev and visit localhost:3000.

Production

Run npm run build. To start the language server run npm run server-start.

Credits

About

An example setup using sumneko's Lua Language Server and JohnnyMorganz's StyLua together with Monaco Editor.


Languages

Language:Lua 99.8%Language:TypeScript 0.2%Language:HTML 0.0%Language:JavaScript 0.0%Language:C++ 0.0%