microsoft / microsoft/vscode-cpptools
Option to Show Hex Values of Variables & Enums on Hover (IntelliSense)
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 6.2k
- Forks
- 1.7k
- Avg merge
- 14h 46m
- Merged PRs (30d)
- 61
Description
Type: LanguageService
Describe the bug
- OS and Version: Win10
- VS Code Version: 1.55.0
- C/C++ Extension Version: 1.3.0-insiders3
- Other extensions you installed (and if the issue persists after disabling them): N/A
- Does this issue involve using SSH remote to run the extension on a remote machine?: No
- A clear and concise description of what the bug is, including information about the workspace (i.e. is the workspace a single project or multiple projects, size of the project, etc). Not a bug. It's a feature.
Steps to reproduce
N/A
Expected behavior
Add a workspace/settings option to be able to show the hex values of variables upon hovering over them, using IntelliSense. Likewise have an option for when hovering over enum values. This is especially useful when dealing with enum values that intentionally enumerate over specific hex ranges for things like different protocols' message/arbitration IDs, etc.
Sometimes when I hover over hex enum values, the hex value will flicker in the tooltip before being replaced by a decimal value, so the extension is definitely capable of at least showing hex values "as declared", which is usually more useful behavior than showing their decimal equivalents anyway.
Logs
N/A
Screenshots
N/A
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by locating the TypeScript LanguageService implementation responsible for IntelliSense hover results and the related tests. Trace how variable and enum values are formatted, then determine where a workspace setting would be read. Done means hover tooltips can optionally preserve hexadecimal values for both variables and enum members, with coverage for the setting and display behavior.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp, typescript, vscode
- Domain
- developer-experience, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 42/100