Skip to main content

Crate mq_lsp

Crate mq_lsp 

Source
Expand description

mq-lsp is a Language Server Protocol (LSP) implementation for the mq. It provides various language features such as syntax highlighting, code completion, go-to-definition, and more.

§Features

  • Initialization: Handles the initialization of the LSP server and sets up the server capabilities.
  • Diagnostics: Publishes diagnostics information to the client.
  • 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.
  • Code Actions: Suggests quick fixes, such as adding a missing include for an unresolved standard library function call, or a missing import for an unresolved module::func() qualified access.
  • Refactoring: Extracts a selected expression/pipeline into a variable or function, and inlines a variable or function back into its call sites.
  • Rename: Renames a symbol and all of its references across files.

§Usage

To use this LSP server, you need to integrate it with an LSP client. The server reads from stdin and writes to stdout, making it compatible with various editors and IDEs that support LSP.

Re-exports§

pub use server::start;

Modules§

capabilities
code_action
completions
document_symbol
error
execute_command
folding_range
goto_definition
hover
inlay_hints
refactor
Refactoring code actions: extract-to-variable, extract-to-function, and inline-variable/inline-function.
references
rename
semantic_tokens
server
signature_help
workspace_symbol