Skip to content

[codex] Use moonbit-lsp binary#46

Draft
tonyfettes wants to merge 1 commit into
mainfrom
codex/use-moonbit-lsp-binary
Draft

[codex] Use moonbit-lsp binary#46
tonyfettes wants to merge 1 commit into
mainfrom
codex/use-moonbit-lsp-binary

Conversation

@tonyfettes

Copy link
Copy Markdown
Collaborator

Summary

  • Prefer $MOON_HOME/bin/moonbit-lsp over the legacy $MOON_HOME/bin/lsp-server.js when starting MoonBit LSP.
  • Reuse the same LSP command resolution for non-moonbit buffers that are attached manually, such as moon.pkg.
  • Add regression coverage for the LSP command selection path.

Root Cause

The Neovim plugin was still probing for the old lsp-server.js entrypoint first. Users with a stale executable there could end up connected to the old language server, while the official VS Code extension now starts moonbit-lsp. When a user's generic LSP format-on-save hook hit that stale server, :w could fail until LSP was disabled.

Validation

env NVIM_LOG_FILE=/private/tmp/moonbit-nvim-tests.log nvim --headless --noplugin -u tests/minimal_init.lua -c "PlenaryBustedDirectory tests/ {minimal_init = 'tests/minimal_init.lua'}"

All existing Plenary tests pass, including the new LSP command selection tests.

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