-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
Truncation of intellisense inlay hints doesn't respect editor.inlayHints.maximumLength option #13130
Comments
We weren't aware of the new setting. It shouldn't be too big a problem to add support for it. |
@bradphelan Internally we have our own maximum length that we apply (the "..." in the middle). VS Code's setting is applied by VS Code on the result we send it (the other dot dot dot (i.e. \u2026) symbol on the right). The current hardcoded implementation of the "in the middle" truncation is in the |
The same note that I made to the core team. I think truncating in the middle is the wrong place. C++ identifiers are normally from left to right, least specific to most specific. ie: com::microsoft::geometry::linear::cross_product If you were going to truncate it makes more sense to truncate at the left ...ear::cross_product rather than com::.micro...uct |
@bradphelan We use accordion style truncation (inherited from VS), because for scenarios with the std libraries there are cases where the stuff on the right side is like |
This is still pretty random.
is terrible. Either
or
or
but not random truncation in middle of words. In my code base I get stuff like. which is terribly frustrating. In this case it would be surely better to truncate the namespace prefix rather than the important more specific name at the end. There also needs to be more coordination with the base editor so that at minimum when you mouse over a truncated inlay hint you get the full type. This should also work together with a refactoring option on any auto declaration to replace it with the specific type the inlay hint is showing. |
Environment
System Info
canvas_oop_rasterization: enabled_on
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
webnn: disabled_off
Extensions (62)
(5 theme extensions excluded)
A/B Experiments
Bug Summary and Steps to Reproduce
Type: Bug
Using the setting.
with 0 I get
with 1 I get
with 10 I get
with 20 I get
with 40 I get
with 80 I get
This has been setup with the CPP inlay hints configuration to ensure it targets C++. I think for some reason the bug fix in microsoft/vscode#205708 is not working for C++
Configuration and Logs
Other Extensions
No response
Additional context
This issue was ported from the core vs-code team because they claim it is the cpp plugin issue rather than core.
microsoft/vscode#236861 (comment)
The text was updated successfully, but these errors were encountered: