Skip to content

LuaLS as language server for Monaco editor#1470

Open
SukuWc wants to merge 67 commits into
stablefrom
kkerti-luaLS
Open

LuaLS as language server for Monaco editor#1470
SukuWc wants to merge 67 commits into
stablefrom
kkerti-luaLS

Conversation

@SukuWc

@SukuWc SukuWc commented Apr 2, 2026

Copy link
Copy Markdown
Member

Summary

  • Integrates LuaLS (Lua Language Server) with the Monaco editor via a WebSocket bridge
  • Spawns LuaLS as a child process on the main thread, bridges stdio ↔ WebSocket for LSP JSON-RPC in the renderer
  • Adds ---@meta annotations for the Grid Lua API (build-assets/lua-annotations/grid-api.lua) enabling completions, hover, signature help, and semantic tokens

Test plan

  • Verify completions appear for Grid API globals in the Monaco editor
  • Verify hover and signature help work on function calls
  • Verify LuaLS binary downloads correctly via postinstall on all platforms (macOS arm64/x64, Windows, Linux)
  • Verify app builds and packages correctly with LuaLS binaries in extraResources
  • Verify CI build matrix includes the LuaLS download step

🤖 Generated with Claude Code

kkerti and others added 30 commits March 5, 2026 21:47
…g luaLS, try to have feature parity with previous implementation
LuaLS runs as a process in Electron main and bridges over ws://localhost:8089.
In the web-only CI environment there is no backend, so suggestions never appear
and these tests always fail.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@kkerti

kkerti commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

code editor on element no language server Screenshot 2026-07-01 at 12 33 47

Now lua language server should be initialized.

@kkerti

kkerti commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator
  • Overflow is now allowed for the monaco widgets
  • LineEditor has the same context awareness as CodeEditor
  • Hover and Suggestions are not disabled, instead the widget overflow helps in visualization
  • Added extra context check for right hand variable declaration in VariableManager

Action blocks impacted:

  • Self
  • Local
  • Global
  • If
  • Else If
  • CodeBlock (inline)
  • CodeBlock (modal)

@kkerti kkerti moved this from In Progress to Ready for QA in Editor Roadmap Jul 3, 2026
@Greg-Orca Greg-Orca moved this from Ready for QA to Done in Editor Roadmap Jul 3, 2026
@Greg-Orca Greg-Orca moved this from Done to QA in progress in Editor Roadmap Jul 3, 2026
@Greg-Orca

Greg-Orca commented Jul 3, 2026

Copy link
Copy Markdown
Contributor

command+S save
Screenshot 2026-07-03 at 14 27 18
Screenshot 2026-07-03 at 14 28 38
Screenshot 2026-07-03 at 14 30 08

@kkerti

kkerti commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

command+S save Screenshot 2026-07-03 at 14 27 18 Screenshot 2026-07-03 at 14 28 38 Screenshot 2026-07-03 at 14 30 08

  1. Regression since vscode-api handled save differently
  2. added lualsExpressionOnly flag
  3. extended openEditorContext with self. typings

kkerti added 2 commits July 3, 2026 15:37
…animationend events, but it broke monaco hover. we don't use these anyway, so just go with transition 0.
@kkerti

kkerti commented Jul 3, 2026

Copy link
Copy Markdown
Collaborator

Fixed animation lifecycle, so hover info works properly and doesn't do an invalid size calculation between transition frames.

@Greg-Orca Greg-Orca moved this from QA in progress to In Progress in Editor Roadmap Jul 6, 2026
@Greg-Orca

Greg-Orca commented Jul 6, 2026

Copy link
Copy Markdown
Contributor
  • cloud be nice if we disable Global variable check ---@diagnostic disable: undefined-global

  • resize bug:

Screenshot 2026-07-06 at 12 39 46
  • no element suggestion
Screenshot 2026-07-06 at 12 40 13
  • after self. gives suggestion:
Screenshot 2026-07-06 at 12 40 36

@kkerti

kkerti commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

fixed:

  • global diagnostics are disabled now, until we figure out how code contexts work well with Grid
  • undefined inject-field diagnostic is disabled, same story as with global
  • regression fix: element suggestions work now
  • regression fix: icons are shown next to suggestions
  • regression fix: monaco resize works now

won't fix:

The valid suggestions are rendered first, and then the invalid ones later.

Not valid suggestions by suggestion provider and provideDefinition for self. and self: (dot and colon) will be reworked with the completion provider in separate PR, possibly with the context extension work.

@kkerti kkerti moved this from In Progress to Ready for QA in Editor Roadmap Jul 6, 2026
@kkerti

kkerti commented Jul 6, 2026

Copy link
Copy Markdown
Collaborator

Regression to fix: file manager panel should load luals or fallback server on init.

@kkerti kkerti moved this from Ready for QA to In Progress in Editor Roadmap Jul 6, 2026
Greg-Orca and others added 6 commits July 6, 2026 21:01
- New LegacyCompletionNotification.svelte shown when LuaLS fails to start
- Shows warning with Troubleshooting and Dismiss buttons
- Guarded by userLevelMinimalist (only shown in advanced mode)
- Configuration key DOCUMENTATION_LUALS_TROUBLESHOOTING_URL added
- Monaco fallback path sets legacyCompletionActive flag in appSettings
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

3 participants