Skip to content

feat: register luau-lsp for omp sessions with the tern definitions - #8

Merged
alphastorm merged 1 commit into
mainfrom
feat/omp-luau-lsp
Nov 7, 2026
Merged

alphastorm merged 1 commit into
mainfrom
feat/omp-luau-lsp

Conversation

@alphastorm

Copy link
Copy Markdown
Owner

OMP's built-in Lua server covers only .lua (LuaJIT/Vim settings), so OMP sessions in this repository had no language server for window.luau. .omp/lsp.json registers luau-lsp lsp for .luau files with --definitions=@tern=types/tern.d.luau, languageId: "luau" (OMP maps no language id for .luau), plugin.toml as the root marker, and the standard (non-Roblox) platform with the Rojo sourcemap off. CONTRIBUTING.md names it next to the existing luau-lsp prerequisite.

Proof through OMP 18.18.0's own lsp tool, from the repository root on luau-lsp 1.70.1 (dotfiles-ng scripts/lsp-smoke.ts):

  • hover on tern.plugin.data (window.luau:13): string, "Absolute path of the plugin's data directory (holds kv.json)." from types/tern.d.luau
  • definition of now_ms (window.luau:118) resolves to window.luau:77
  • diagnostics on window.luau: clean, as luau-lsp analyze reports
  • a temporary file calling tern.log.warnx("probe"): TypeError: Key 'warnx' not found in table '{ debug, error, info, warn }' (1002), the same error luau-lsp analyze --definitions=types/tern.d.luau prints; the file was removed afterwards

Go-to-definition on Tern globals (tern, tern.log.warn) returns nothing: luau-lsp 1.70.1 gives definition-file globals no source location, so hover is the navigation for Tern APIs.

Existing checks: python3 -B -m unittest discover -s tests -t . (155 tests, OK, 1 skipped) and luau-lsp analyze --definitions=types/tern.d.luau window.luau (exit 0).

@alphastorm
alphastorm merged commit 14edcd7 into main Nov 7, 2026
6 checks passed
@alphastorm
alphastorm deleted the feat/omp-luau-lsp branch November 7, 2026 03:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant