dev: refactor tasks (#411)

* dev: improve export task

* aba aba

* dev: less indent

* dev: reorder

* dev: reduce some clone

* dev: improve format task

* fix: documentation links

* dev: doesn't rely on hash entry state
This commit is contained in:
Myriad-Dreamin 2024-07-14 17:40:01 +08:00 committed by GitHub
parent 69c50fef4a
commit 6a142dca01
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 276 additions and 308 deletions

View file

@ -18,8 +18,9 @@ use crate::prelude::*;
/// This request was introduced in specification version 3.6.0.
///
/// This request has no special capabilities and registration options since it
/// is sent as a resolve request for the
/// [`textDocument/documentColor`](Self::document_color) request.
/// is sent as a resolve request for the [`textDocument/documentColor`] request.
///
/// [`textDocument/documentColor`]: https://microsoft.github.io/language-server-protocol/specification#textDocument_documentColor
#[derive(Debug, Clone)]
pub struct ColorPresentationRequest {
/// The path of the document to request color presentations for.

View file

@ -5,9 +5,9 @@ use crate::{prelude::*, SyntaxRequest};
/// The [`experimental/onEnter`] request is sent from client to server to handle
/// the <kbd>Enter</kbd> key press.
///
/// - kbd:[Enter] inside triple-slash comments automatically inserts `///`
/// - kbd:[Enter] in the middle or after a trailing space in `//` inserts `//`
/// - kbd:[Enter] inside `//!` doc comments automatically inserts `//!`
/// - `kbd:Enter` inside triple-slash comments automatically inserts `///`
/// - `kbd:Enter` in the middle or after a trailing space in `//` inserts `//`
/// - `kbd:Enter` inside `//!` doc comments automatically inserts `//!`
///
/// [`experimental/onEnter`]: https://github.com/rust-lang/rust-analyzer/blob/master/docs/dev/lsp-extensions.md#on-enter
///

View file

@ -15,8 +15,9 @@ pub struct ModuleDependency {
/// Construct the module dependencies of the given context.
///
/// It will scan all the files in the context, using [`AnalysisContext::files`],
/// and find the dependencies and dependents of each file.
/// It will scan all the files in the context, using
/// [`AnalysisContext::source_files`], and find the dependencies and dependents
/// of each file.
pub fn construct_module_dependencies(
ctx: &mut AnalysisContext,
) -> HashMap<TypstFileId, ModuleDependency> {