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

Outline view is not reflecting headers and macros #380

Open
alirana01 opened this issue Nov 18, 2024 · 3 comments
Open

Outline view is not reflecting headers and macros #380

alirana01 opened this issue Nov 18, 2024 · 3 comments

Comments

@alirana01
Copy link

Hi,

It took me a while to get back on the cdt-lsp side. I noticed that the defautl C/C++ editor was generating really nice SymbolModels and the outline view reflected the complete information of the opened file.
image
With the cdt-lsp editor I noticed that the outline is limited to variables and functions only
image
The attached images are from the same file in different editors.

Incase you need a bit more insight to the file I am using it can be found here (https://github.com/espressif/esp-idf/blob/master/examples/bluetooth/blufi/main/blufi_example_main.c)

I am also attaching the clangd console output while debugging my pde project
clangd.log

If my understanding is correct it could also be that clangd is not returning the header and macors as a symbol information. Sadly my understanding of clangd is not strong enough to get to know more about it.

Possibly if you can point me to the correct direction for the code I can take a look at that as well.

@ghentschke
Copy link
Contributor

If my understanding is correct it could also be that clangd is not returning the header and macors as a symbol information. Sadly my understanding of clangd is not strong enough to get to know more about it

Yes, you' re right. I haven't dug very deep yet, but IMO the Language Server Protocol does not support header and macros in its data model, because they are C/C++ language specific.

@alirana01
Copy link
Author

If my understanding is correct it could also be that clangd is not returning the header and macors as a symbol information. Sadly my understanding of clangd is not strong enough to get to know more about it

Yes, you' re right. I haven't dug very deep yet, but IMO the Language Server Protocol does not support header and macros in its data model, because they are C/C++ language specific.

Thanks for the response can you please point me to the file responsible for the request to the clangd server for documentSymbols?

@ghentschke
Copy link
Contributor

Thanks for the response can you please point me to the file responsible for the request to the clangd server for documentSymbols?

It's part of the LPS4J/LSP4E repos. Take a look at https://github.com/eclipse-lsp4j/lsp4j

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