sublimelsp / LSP-clangd

C/C++ support for Sublime's LSP plugin provided through clangd.
MIT License
42 stars 1 forks source link

Unhelpful return type decoding in tooltip #18

Closed Protoster closed 1 year ago

Protoster commented 1 year ago

When hovering over a function identifier in a C source file, the tooltip will sometimes decode the typedefs of a return type and NOT show the declared type: Screenshot 2023-09-11 143734 (LSP is able to find the definition with no problems, where it is declared as size_t, not unsigned long long)

In other cases, it shows (in this function I declared) both the declared type and the decoded typedef: Screenshot 2023-09-11 143908

When I'm looking up a declaration of a function, I'd like to see the declared type, rather than the typedef that's specific for my system. I think it should work as shown in the second screenshot.

rwols commented 1 year ago

This sounds like you want the language server to change behavior, in which case I recommend to make a feature request at https://github.com/clangd/clangd/issues

Protoster commented 1 year ago

I see. This might be a problem because I don't know the internals of this plugin, so I won't be able to express the issue in terms of the clangd project. If I show them screenshots from the LSP-clangd plugin, they are likely to kindly tell me to open an issue here 😅

rchl commented 1 year ago

This output is coming from clang. If you show them those screenshots they will know that this package or the editor has nothing to do with the output.