Skip to content

Integrate mq-check crate and type checker options#1373

Merged
harehare merged 22 commits intomainfrom
chore/mq-check-integration
Mar 4, 2026
Merged

Integrate mq-check crate and type checker options#1373
harehare merged 22 commits intomainfrom
chore/mq-check-integration

Conversation

@harehare
Copy link
Copy Markdown
Owner

@harehare harehare commented Mar 2, 2026

  • Add mq-check to workspace and dependencies
  • Implement type checker options in mq-check and mq-lsp
  • Pass type checker config from CLI to LSP server
  • Enable type error diagnostics in LSP when type checking is enabled
  • Add and update tests for type checker options in LSP

- Add mq-check to workspace and dependencies
- Implement type checker options in mq-check and mq-lsp
- Pass type checker config from CLI to LSP server
- Enable type error diagnostics in LSP when type checking is enabled
- Add and update tests for type checker options in LSP

Closes #XXX (replace with actual issue if applicable)
Copilot AI review requested due to automatic review settings March 2, 2026 14:18
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR integrates the mq-check type-checking crate into the mq-lsp language server, exposing new CLI options to enable type checking and configure its behavior (strict arrays, tuple mode). When type checking is enabled and there are no parse errors, the LSP server runs the type checker and emits LSP diagnostics for detected type errors. The TypeCheckerOptions struct is also updated to derive Copy to eliminate unnecessary .clone() calls.

Changes:

  • mq-check is added to the workspace and as a dependency of mq-lsp
  • TypeCheckerOptions derives Copy; .clone() calls in mq-check/src/main.rs are replaced with direct copy
  • New CLI flags (-T, --strict-array, --tuple) are added to mq-lsp/src/main.rs; LspConfig::new gains two new parameters and type checking logic is added to the diagnostics method in server.rs

Reviewed changes

Copilot reviewed 6 out of 7 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
Cargo.toml Adds mq-check as a workspace dependency
Cargo.lock Adds mq-check to mq-lsp resolved dependencies
crates/mq-check/src/lib.rs Adds Copy to TypeCheckerOptions derive
crates/mq-check/src/main.rs Replaces .clone() with copy for TypeCheckerOptions
crates/mq-lsp/Cargo.toml Adds mq-check as a dependency
crates/mq-lsp/src/main.rs Adds TypeCheckArgs CLI struct and wires to LspConfig
crates/mq-lsp/src/server.rs Adds config field to Backend, implements type-error diagnostics, adds tests

Copilot AI review requested due to automatic review settings March 2, 2026 14:42
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 8 out of 9 changed files in this pull request and generated 3 comments.

Copilot AI review requested due to automatic review settings March 3, 2026 14:08
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 11 out of 12 changed files in this pull request and generated 5 comments.

Copilot AI review requested due to automatic review settings March 3, 2026 15:14
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 16 changed files in this pull request and generated 6 comments.

Copilot AI review requested due to automatic review settings March 3, 2026 23:22
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 15 out of 16 changed files in this pull request and generated 1 comment.

@harehare
Copy link
Copy Markdown
Owner Author

harehare commented Mar 4, 2026

@copilot
The build is failing with your latest changes. Could you fix it?

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 4, 2026

@harehare I've opened a new pull request, #1383, to work on those changes. Once the pull request is ready, I'll request review from you.

harehare added 3 commits March 4, 2026 09:45
fix(mq-lsp): remove useless `.into()` conversion causing clippy failure
… and Zed

- Neovim: add enable_type_check, strict_array, tuple, and enable_inlay_hints config options
- Neovim: pass type-checking flags to mq-lsp and enable inlay hints on buffer attach
- Zed: read enableTypeCheck/strictArray/tuple from initialization_options to build LSP args
- Zed: support custom binary path via LspSettings
- Zed: add serde_json dependency for parsing initialization options
- Docs: update both editor READMEs with type checking and inlay hints usage examples
Copilot AI review requested due to automatic review settings March 4, 2026 12:16
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 22 out of 23 changed files in this pull request and generated 2 comments.

Copilot AI review requested due to automatic review settings March 4, 2026 12:44
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 25 out of 26 changed files in this pull request and generated 3 comments.

Copilot AI review requested due to automatic review settings March 4, 2026 13:06
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 25 out of 26 changed files in this pull request and generated 5 comments.

Comments suppressed due to low confidence (1)

crates/mq-lsp/src/lib.rs:15

  • The crates/mq-lsp/README.md does not document the new inlay hints capability or the new CLI flags (--enable-type-checking, --strict-array, --tuple). The codebase guidelines require documentation to be updated for new features in the crate README.
//! - **Hover**: Provides hover information for symbols, including type information when type checking is enabled.
//! - **Inlay Hints**: Shows inferred type annotations inline in the editor when type checking is enabled.
//! - **Completion**: Offers code completion suggestions.
//! - **Go To Definition**: Allows navigation to the definition of symbols.
//! - **References**: Finds all references to a symbol.
//! - **Document Symbols**: Lists all symbols in a document.
//! - **Semantic Tokens**: Provides semantic tokens for syntax highlighting.
//! - **Formatting**: Formats the document according to the MDQ language formatting rules.
//!

Copilot AI review requested due to automatic review settings March 4, 2026 13:19
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 25 out of 26 changed files in this pull request and generated 1 comment.

@harehare harehare merged commit 686818d into main Mar 4, 2026
6 checks passed
@harehare harehare deleted the chore/mq-check-integration branch March 4, 2026 13:37
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.

3 participants