When showing job progression in the text editors, it is hard to read
"precise" percentage numbers. This patch rounds
WorkDoneProgressBegin.percentage to 2 decimal places to improve readability.
While plugins might have different heuristics on how to display those numbers,
many of them will just show the value server provided and therefore it's easier
to do "formatting" on our side.
Details
- Reviewers
sammccall
Diff Detail
- Repository
- rG LLVM Github Monorepo
Event Timeline
clang-tools-extra/clangd/ClangdLSPServer.cpp | ||
---|---|---|
1409 | Yikes, rounding a float value in the protocol is pretty weird and would deserve more of a comment. Also this seems like a fairly... improbable bug, in that it's trivial to fix in the editor and would usually be visible if the implementer tried the feature even once. Which editors specifically are you seeing bad display in? Can we just send them a PR? |
clang-tools-extra/clangd/ClangdLSPServer.cpp | ||
---|---|---|
1409 | Okay, makes sense. I saw this in coc.nvim and I can just fix it there, but I thought it might also happen in other editors. I also thought we do not care too much about precision here, but I'm OK with fixing it on the editor side. |
Yikes, rounding a float value in the protocol is pretty weird and would deserve more of a comment.
Also this seems like a fairly... improbable bug, in that it's trivial to fix in the editor and would usually be visible if the implementer tried the feature even once.
Which editors specifically are you seeing bad display in? Can we just send them a PR?