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

Disable inlay hints by default - e.g. parameter names in function invocations #349

Open
powerbroker opened this issue Jun 15, 2024 · 3 comments

Comments

@powerbroker
Copy link

powerbroker commented Jun 15, 2024

there is a function prototype:

int SPI_IO(spi_device_handle_t spiDevice, unsigned char *data, unsigned int rxSize, unsigned int totalSize, bool dropTxPhaseData);

inside LSP editor usage of this function looks:
image

note all these '[0]=', 'spiDevice:', 'data:', 'rxSize:', etc. parameter name hints which are NOT EDITABLE - there is no simple way to get rid of these hints.
they violate (visually) language syntax and are totally in wrong place: it's text editor at the end of all. there could be room for them in e.g. tooltips, but not in the editor area where every character IS EDITABLE.

such dubious, concept-breaking functions muzz be optional and disabled by default

@powerbroker powerbroker changed the title Muzz be possible to disable parameter name hints in function invocations Disable by default parameter name hints in function invocations Jun 15, 2024
@powerbroker powerbroker changed the title Disable by default parameter name hints in function invocations Disable by default parameter name inlay hints in function invocations Jun 15, 2024
@powerbroker powerbroker changed the title Disable by default parameter name inlay hints in function invocations Disable by default inlay hints - e.g. parameter names in function invocations Jun 15, 2024
@powerbroker powerbroker changed the title Disable by default inlay hints - e.g. parameter names in function invocations Disable inlay hints by default - e.g. parameter names in function invocations Jun 15, 2024
@ghentschke
Copy link
Contributor

Hi, thanks for the feedback! Inlay hints should be disabled by default. Which clangd version are u using?
You can disable the inlay hints via this entry in the config.yaml or .clangd file:

InlayHints:
  Enabled: No

The location of the config.yaml depends on your OS. See the clangd config files description
Note: I assume that the settings in the config.yaml overrule the settings in the .clangd file, latter should be located in your project root.

However, I agree that this should be made more user friendly.

@ghentschke
Copy link
Contributor

You may also have to close and reopen the editor

@powerbroker
Copy link
Author

Hi, thanks for the feedback! Inlay hints should be disabled by default. Which clangd version are u using? You can disable the inlay hints via this entry in the config.yaml or .clangd file:

clang version 16.0.1 (https://github.com/espressif/llvm-project.git fe4f10a809705c2ddbed62145616bb9c85c499c0)

gooooogling around i found this, saying they enable inlay hints by default, and this, saying that only future proof way of managing inlay hints at clang level is config files as you described.

as workaround i just prohibited them globally in config.yaml - it works

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

No branches or pull requests

2 participants