Summary
Add integration tests for the nemo-lsp server: verify completions for component names, attribute names, and enum values; hover documentation; diagnostics for invalid configs; and go-to-definition for templates and data sources.
Context
The LSP operates over JSON-RPC via stdin/stdout. Integration tests should:
- Start the LSP binary as a child process
- Send
initialize, textDocument/didOpen, and other LSP messages
- Verify the JSON-RPC responses contain expected completion items, diagnostics, hover content, etc.
- Use sample Nemo XML files that exercise all completion and diagnostic scenarios
Acceptance Criteria
Relevant Files
crates/nemo-lsp/ — the LSP server
crates/nemo-config/src/xml_parser.rs — XML parsing used by LSP
crates/nemo-config/src/validator.rs — validation used by diagnostics
Stack Base
Summary
Add integration tests for the
nemo-lspserver: verify completions for component names, attribute names, and enum values; hover documentation; diagnostics for invalid configs; and go-to-definition for templates and data sources.Context
The LSP operates over JSON-RPC via stdin/stdout. Integration tests should:
initialize,textDocument/didOpen, and other LSP messagesAcceptance Criteria
nemo-lspbinary and communicates over stdin/stdout JSON-RPCtextDocument/completionreturns component element names when inside<layout>textDocument/completionreturns attribute names for a known component (button, label)textDocument/completionreturns enum values for constrained string attributes (variant, size)textDocument/hoverreturns property documentation with type and defaulttextDocument/diagnosticreports missing required attributestextDocument/diagnosticreports unknown component typestextDocument/definitionnavigates to template definitionstextDocument/definitionnavigates to data source definitionstemplate="..."returns template names from current filesource="..."in<binding>returns data source namescrates/nemo-lsp/tests/fixtures/covering edge casescargo test -p nemo-lspRelevant Files
crates/nemo-lsp/— the LSP servercrates/nemo-config/src/xml_parser.rs— XML parsing used by LSPcrates/nemo-config/src/validator.rs— validation used by diagnosticsStack Base
mainnemo-lsplanguage server #62 (nemo-lsp language server) — tests are written against the completed LSP