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

make variable declaration and parameter name hints separately configurable #1453

Merged
merged 1 commit into from
Sep 22, 2023

Conversation

leecannon
Copy link
Member

@leecannon leecannon commented Sep 20, 2023

Adds "inlay_hints_show_variable_declaration" and "inlay_hints_show_parameter_name" to allow control of what hints are displayed.

@leecannon leecannon changed the title make variable declaration inlay hints configurable make variable declaration hints configurable Sep 20, 2023
@Techatrix
Copy link
Member

how about this?

inlay_hints: enum {
    none,
    only_parameter_names,
    only_types,
    all,
} = .all,

@leecannon
Copy link
Member Author

The problem I have with using an enum is the moment there is one more type of inlay hint we have to go back to using multiple booleans anyway or you only have three choices none, all or just one type of hint.

For example I already want to break the variable declaration hints into separate local variable versus global variable options.

@leecannon leecannon changed the title make variable declaration hints configurable make variable declaration and parameter name hints separately configurable Sep 22, 2023
Copy link
Member

@Techatrix Techatrix left a comment

Choose a reason for hiding this comment

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

We should also update vscode-zig.

@leecannon leecannon merged commit ab0352a into master Sep 22, 2023
6 checks passed
@leecannon leecannon deleted the var_decl_hint_option branch September 22, 2023 18:20
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.

2 participants