purescript-language-server icon indicating copy to clipboard operation
purescript-language-server copied to clipboard

Fix command-only code action serialization

Open Arunsiva003 opened this issue 6 months ago • 0 comments

What changed

  • Represent CodeAction edit and command as undefined-or-present fields instead of nullable fields.
  • Keep command-only code actions serializing without an edit property.
  • Add a regression test for the sort imports code action wire shape.

Why it changed

Neovim treats edit: null as an invalid LSP code action response because edit is optional, not nullable. Omitting the field keeps the response aligned with the LSP shape while preserving the command.

Fixes #219

Tests run

  • XDG_CACHE_HOME=/tmp /Users/arunkumar.a/.nvm/versions/node/v16.20.2/bin/spago test
  • XDG_CACHE_HOME=/tmp npm run build

Arunsiva003 avatar May 25 '26 13:05 Arunsiva003