Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: implement inlay hint configuration #37

Merged
merged 3 commits into from
Mar 14, 2024

Conversation

Myriad-Dreamin
Copy link
Owner

As discussed in #16, The full configuration items are list following, and some of them are not configurable by users:

pub struct InlayHintConfig {
    // positional arguments group
    pub on_pos_args: bool,
    pub off_single_pos_arg: bool,

    // variadic arguments group
    pub on_variadic_args: bool,
    pub only_first_variadic_args: bool,

    // todo
    // The typst sugar grammar
    pub on_content_block_args: bool,
}

impl InlayHintConfig {
    pub const fn smart() -> Self {
        Self {
            on_pos_args: true,
            off_single_pos_arg: true,

            on_variadic_args: true,
            only_first_variadic_args: true,

            on_content_block_args: true,
        }
    }
}

These configurations are not exposed yet though.

@Myriad-Dreamin Myriad-Dreamin linked an issue Mar 14, 2024 that may be closed by this pull request
@Myriad-Dreamin Myriad-Dreamin merged commit 61be2f7 into main Mar 14, 2024
11 checks passed
@Myriad-Dreamin Myriad-Dreamin deleted the inlay-hint-configuration branch March 14, 2024 16:38
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.

VSCode extension: Useless inlay hints
1 participant