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
includefor an unresolved standard library function call, or a missingimportfor an unresolvedmodule::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