lexical-lsp / lexical

Lexical is a next-generation elixir language server
779 stars 77 forks source link

Document symbols don't include defdelegate macros #724

Closed crbelaus closed 1 month ago

crbelaus commented 2 months ago

As shown in the following screenshot, the document symbols don't include the defdelegate macro. Both the save_changeset and update functions are included, but create is not.

image

I'm not sure if this is intentional or not, as I've tried to create another macro myself and it is not included either.

scohen commented 2 months ago

it's merely overlooked, not a bug per se, defdelegate isn't indexed by the source indexer. Adding an indexer for defdelegate that emits both a function definition (for the current module) and a function reference (for the delegated module's function) will clear this up.

scohen commented 1 month ago

@crbelaus give this a shot and tell me what you think.